-
Bug
-
Resolution: Fixed
-
Critical
-
4.1.4, 4.1.10, 4.2.2, 4.3.4
-
MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-78902_403 -
It appears that if a quiz from 3.9 with random questions in default quiz categories and subcategories gets restored into 4.1, an error is displayed when clicking the (see questions) link in the quiz questions page.
Steps to replicate:
3.9.22+ (Build: 20230721)'
- Create a course.
- Add a quiz and leave it for now.
- Go to the question bank
- Add questions under Default course category.
- Create a subcategory under Default course category and add questions onto it.
- Go back to the quiz
- Add a new question to the quiz (this is to populate the Default for quiz category)
- Go back to the question bank and under the category Default for quiz category, add a subcategory and then add questions onto it too.
- Go back to the quiz and then click questions.
- Add Random questions from the Default for quiz category
- Add Random questions from the subcategory under the Default for quiz category
- Add Random questions from the Default for quiz and its subcategories.
- Create a backup of that quiz and download it.
Using 4.1 4.1.4+ (Build: 20230728), restore the backup quiz into a course.
Visit the quiz and click Questions.
Click the (see questions) for questions 6, 7, or 8. Note that the other questions are not affected.
RESULT
Error will be displayed.
question/invalidcategoryMore information about this error |
Debug info:
|
Error code: invalidcategory
|
$a contents:
|
|
Stack trace: line 395 of /question/editlib.php: moodle_exception thrownline 219 of /question/editlib.php: call to question_build_edit_resources()line 30 of /question/edit.php: call to question_edit_setup() |
Note. I have added the backup MBZ file for reference. I added screenshots for reference of the question bank format and quiz questions layout for 3.9 and the questions layout for 4.1.
- has been marked as being related by
-
MDL-81317 Moodle 4.1 upgrade results in broken random questions
-
- Development in progress
-
- is duplicated by
-
MDL-81181 Exception Error "question/invalidcategory" When Viewing Questions in Quizzes with Updated Random Question Categories After Upgrading to Moodle 4.3.0 & 4.3.3
-
- Closed
-
- will be (partly) resolved by
-
MDL-80466 Random questions restored from 3.9 backup shows error in the edit quiz screen
-
- Open
-