We have two courses. Both courses have the same question categories at the course context level (50.
In one course, we create a quiz module and move the categories to that context level (70). When we backup this module and restore it in the other course, we get an error when trying to view the question category for the random question on the mod/quiz/edit.php page.
This quiz functions as expected when previewing.
Replication Steps
- Create Course Category A
- Create Course A
- In question bank, create question category (with question) on course level category
- Create course category B
- Copy course A into course B in category B
- In Course A, create a quiz module with a random question using the created question category
- Visit quiz module > Question bank > Categories
- Move the created question category to the quiz module level category
- Visit quiz module > Questions
- Create a random question using the moved question category
- Backup this quiz module
- In Course B, restore this quiz module
- Visit the restored quiz module > Questions tab
- Edit the random question (pencil icon)
- See error