danmarsden / moodle-local_recompletion

Allows course recompletion
29 stars 46 forks source link

Setting recompletionnotify has invalid default and causes core unit test failure #203

Open micaherne opened 1 week ago

micaherne commented 1 week ago

The setting recompletionnotify has default "range" but this isn't in the list of options.

This causes the core Moodle unit test adminlib_test::test_admin_apply_default_settings to fail:

There was 1 failure:

1) core\adminlib_test::test_admin_apply_default_settings Failed asserting that two arrays are identical. --- Expected +++ Actual @@ @@ -Array &0 () +Array &0 (

  • 'local_recompletion/recompletionnotify' => 'range' +)

/var/www/html/lib/tests/adminlib_test.php:174 /var/www/html/lib/phpunit/classes/advanced_testcase.php:81

This appears to be a new issue affecting version 2024090300 - version 2024071103 was fine.

danmarsden commented 15 hours ago

extra white space at the end of line 69 - hard to see the actual failure with all the other noise in there.

Feel free to fix up otherwise I'll try to get to this sometime next week!


FILE: /home/runner/work/moodle-local_recompletion/moodle-local_recompletion/moodle/local/recompletion/settings.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 69 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)