Description
When I preview a quiz that has randomly shuffled questions Moodle generates this exception:
Coding error detected, it must be fixed by a programmer: Unknown question type (no definition) randomsamatch
More information about this error
Debug info:
Error code: codingerror
Stack trace:
line 237 of /question/engine/bank.php: coding_exception thrown
line 659 of /question/type/questiontypebase.php: call to question_bank::load_question_definition_classes()
line 646 of /question/type/questiontypebase.php: call to question_type->make_question_instance()
line 278 of /question/engine/bank.php: call to question_type->make_question()
line 186 of /mod/quiz/startattempt.php: call to question_bank::make_question()
To recreate:
Test Pre-requisites:
A quiz with Question order set to: "Shuffled randomly" and "New page" set to "Every 2 questions".
Test Steps:
1. Navigate to the quiz and select the [Show] link adjacent to "Question bank contents". Check that the question bank is shown.
2. Create a question of each type.
3. Click the "Select all" checkbox in the questions bank and click "< Add to quiz". Verify that all of the questions are moved to pages, two per page.
4. Preview the quiz twice and verify that the second time that the questions are in a different order to the first.
Expected result:
I can preview the quiz any number of times.
Actual result:
When I try to preview the quiz Moodle throws the above exception.
Attachments
Issue Links
- blocks
-
MDLQA-2120 CLONE - A teacher can set questions to appear randomly in a quiz
- Passed
- duplicates
-
MDL-27414 Upgrade the randomsamatch question type to the new question engine
-
- Closed
-