-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.6, 4.1.1
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-77440_401 -
Steps to reproduce:
- As teacher
- Create a quiz with these settings:
- How questions behave: immediate feedback.
- Allow redo within an attempt: Yes ... (this is hidden behind 'Show more...'
- Add one true-false question to the quiz, correct answer true.
- As a student
- Start a quiz attempt
- Input the answer False and click 'Check'
- Click 'Try another question like this one'
- Don't answer the question, just click Finish attempt ... then Submit all and finish.
- You should now be on the review page. Click Finish review.
- Click 'Re-attempt quiz'
- Input the answer True, and click Check.
- As teacher
- Go to the quiz reports, and review the students first attempt.
- Click the '1' link where it says 'Other questions attempted here:'
- In the pop-up that opens, and the top where it says 'Attempts', click the '2' link to see this question in the second attempt.
Expected result: You swich to the review of this question in the second attempt.
Actual result:
Coding error detected, it must be fixed by a programmer: There is no question_attempt number 2 in this attempt.
Stack trace:
- line 265 of /question/engine/questionusage.php: coding_exception thrown
- line 279 of /question/engine/questionusage.php: call to question_usage_by_activity->check_slot()
- line 226 of /question/engine/questionusage.php: call to question_usage_by_activity->get_question_attempt()
- line 1399 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->get_question()
- line 56 of /mod/quiz/reviewquestion.php: call to quiz_attempt->get_question_name()