-
Bug
-
Resolution: Fixed
-
Critical
-
4.0, 4.1.1
This was found while testing MDL-74255.
To reproduce:
- Create a truefalse question in the question bank for a course. (Question type not important.)
- Create a quiz, and add the truefalse question.
- Go to the question bank, and change the state of version 1 of the question to draft.
Actual results:
- When you go back to Quiz -> Questions page, you get a fatal error Exception - Argument 1 passed to mod_quiz\question\bank\qbank_helper::get_version_options() must be of the type int, string given, called in [dirroot]/mod/quiz/classes/structure.php on line 680
- If you try to Attempt or preview the quiz, you get Coding error detected, it must be fixed by a programmer: This question is of a type that is not installed on your system. No processing is possible.
Expected result:
- If there teacher has got their quiz into a state where it cannot work, then at least the error message should make the real cause of the problem clear, with a hit about how to recover the situation.
(A bit like the "'The number of random questions required is more than are still available in the category!'" warning if you get the setup of random questions wrong - although that message is not brilliant.)
Note: a question can only be added to a quiz if at least one non-draft version exists when the question is added, so hopefully it will be rare for teachers to get themselves into this state.
- Discovered while testing
-
MDL-74255 Quiz 4.0: 'Always latest' version for a question in a quiz should mean 'latest ready version'
-
- Closed
-
- has been marked as being related by
-
MDL-76843 Quiz statistics task invalid input syntax for type bigint: "s178604" errors
-
- Closed
-
- is duplicated by
-
MDL-75219 Changing Question Status to Draft from the Question Bank page can break Question Bank and Quizzes
-
- Closed
-