-
Bug
-
Resolution: Fixed
-
Minor
-
5.0
-
MOODLE_500_STABLE
-
MOODLE_500_STABLE
-
MDL-84037_main -
-
-
Steps to reproduce:
- Create 2 courses: "Course 1" and "Course 2"
- Go to Course 1 > Question banks and create a default question bank for the course.
- Create a true/false question in the question bank.
- Create a quiz, "Test quiz" on the course.
- Go to "Test quiz" > Questions, click "Add question" > "add from question bank".
- Switch to the course's default question bank and select the question you created.
- Confirm that the question is shown in with a "Course 1 question bank" badge.
- Back up the quiz.
- Restore the backup to "Course 2".
- Go to "Course 2" > "Test quiz" > "Questions"
- Confirm that the restored quiz contains the question from the original quiz.
- Click on the edit icon next to the question name
- Expected: the edit form is shown
- Actual: An exception is shown "Coding error detected, it must be fixed by a programmer: Invalid context id specified context::instance_by_id()". This is due to it trying to load the question category from a course context, which is no longer a valid context for questions.
- caused a regression
-
MDL-85556 restore_move_module_questions_categories changes existing question references
-
- Closed
-