Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.6.1, 3.7, 3.8
-
Component/s: Quiz
-
Testing Instructions:
-
Affected Branches:MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
Fixed Branches:MOODLE_36_STABLE, MOODLE_37_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-64340-master -
Pull Master Diff URL:
-
Sprint:Internationals - 3.8 Sprint 2
Description
Edit/override the teacher role so that it only has moodle/question:usemine, but not moodle/question:useall.
On the edit quiz page, choose Add -> a random questions.
Actual result:
Error code: codingerror
- line 770 of /lib/dml/moodle_database.php: coding_exception thrown
- line 1311 of /lib/questionlib.php: call to moodle_database->get_in_or_equal()
- line 58 of /mod/quiz/addrandomform.php: call to question_get_top_categories_for_contexts()
- line 204 of /lib/formslib.php: call to quiz_add_random_form->definition()
- line 2504 of /mod/quiz/lib.php: call to moodleform->__construct()
- line 7775 of /lib/moodlelib.php: call to mod_quiz_output_fragment_add_random_question_form()
- line 415 of /lib/external/externallib.php: call to component_callback()
- line 244 of /lib/externallib.php: call to core_external::get_fragment()
- line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
Expected result: ... well, either the menu option should not appear in this case, or the pop-up needs to show a user-friendly message about why you can't do it.