When creating a quiz you can add a limited number of random questions from a category in the question bank. However, there is nothing to stop you from doing this repeatedly.
Replication steps:
- Create a category in the question bank
- Add four questions
- Create a quiz and add the four questions using the "Add random questions from category" functionality
- Repeat the previous step
- Preview the quiz
Expected result: You should not be able to add more random questions than exist in the category
Actual result: You can add more questions than the number in the category, and when you preview the quiz, the following error is shown...
There are not enough questions in category 12 to create the question Random (New category 1 and sub-categories) (31).
|
|
More information about this error
|
Debug info:
|
Error code: notenoughrandomquestions
|
Stack trace:
|
|
line 192 of /mod/quiz/startattempt.php: moodle_exception thrown
|
- blocks
-
MDLQA-4770 CLONE - A teacher can add random questions to a quiz
- Passed
- duplicates
-
MDL-6103 Give a warning if, because of random questions, a quiz may require more questions from a category than are there
-
- Open
-
- has a non-specific relationship to
-
MDL-6103 Give a warning if, because of random questions, a quiz may require more questions from a category than are there
-
- Open
-