-
Bug
-
Resolution: Fixed
-
Minor
-
4.2
-
MOODLE_402_STABLE
-
MOODLE_402_STABLE
-
- Covered by automated tests (Behat)
Hi,
in a quiz, when adding a user override, if you click on the button "Save and enter another override", Moodle generate the following exception:
Exception - core_availability\info_module::__construct(): Argument #1 ($cm) must be of type cm_info, stdClass given, called in [dirroot]/mod/quiz/classes/form/edit_override_form.php on line 169 |
The user override is correctly created because the exception is triggered after page reload. For this reason, if you save the override with the Save button everything works fine.
These are the steps to reproduce the error:
- Create a course with at least 1 student
- Create a quiz (questions are not needed)
- Go to the Overrides page (secondary menu: More -> Overrides)
- Click on the Add user override button
- Select a student, override any quiz setting (ie. Time limit) and save using the Save and enter another override button.
You can easily reproduce this error using the Sandbox Demo platform (https://sandbox.moodledemo.net/).
Thanks,
Giorgio