bdecentgmbh / moodle-mod_videotime

The Video Time product family is a set of plugins to integrate videos into moodle courses.
http://bdecent.de/videotime
Other
10 stars 5 forks source link

null is not a valid default for global settings #33

Closed davosmith closed 2 years ago

davosmith commented 2 years ago

Several of the global settings in settings.php have invalid null defaults - this results in Behat tests being broken across the entire site (because the first time an admin logs in, for a test with Javascript disabled, they get a page asking them to supply a value for those settings)

The settings affected at:

davosmith commented 2 years ago

Also videotime/columns and videotime/preview_picture have defaults of 0, which doesn't match any of the available options for those settings, causing similar issues to the above.

stefanscholz commented 2 years ago

Hi @davosmith,

Thanks for reporting this issue! Which version/branch are you reviewing?

Thanks Stefan

davosmith commented 2 years ago

I can see the issue on the master branch: https://github.com/bdecentgmbh/moodle-mod_videotime/blob/master/settings.php#L99 (and the lines below).

The second set can be seen here: https://github.com/bdecentgmbh/moodle-mod_videotime/blob/master/settings.php#L269 (options are 1,2,3,4 - but the default is 0; options are PREVIEW_PICTURE_BIG, etc., but the default is 0)

stefanscholz commented 2 years ago

Hi Davo,

this should be fixed now on the master branch.

Best Stefan

davosmith commented 2 years ago

Great - that looks much better.