-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.9.9, 3.10.6, 3.11.2
-
None
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
Steps to reproduce:
- Create a quiz (you can leave all settings default, just give it a name).
- Edit quiz.
- Add -> Random question -> From new category, call the category 'Q1 variants'.
- Click '(See questions)' link (easiest to open in a new tab).
- Add a true-false question. (Qtype does not matter, but for TF you only need to type name and question text.)
- Start a Preview of the quiz (easiest back in the first tab).
- In the question bank, delete the TF question you created.
- In the browser window where you have the preview open, reload the page.
Actual result: Cryptic error which is hard to recover from.
Expected result: Obviously it cannot work, because the question is gone (correctly - previews should not prevent questions from being deleted) however, the error message should make sense, in the style of MDL-61033.
Two ways to achive this I can think of:
A) Custom exception handling for this case.
B) Use an event handler, so that when a question is deleted, the preview is automatically deleted.
Or, it may be that the question bank 4.0 work (MDL-70329) means that this stops being an issue.