Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77440

Quiz: 'Try another question like this one' can lead to errors while reviewing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0.7, 4.1.2
    • 4.0.6, 4.1.1
    • Quiz

      Steps to reproduce:

      1. As teacher
      2. Create a quiz with these settings:
        • How questions behave: immediate feedback.
        • Allow redo within an attempt: Yes ... (this is hidden behind 'Show more...'
      3. Add one true-false question to the quiz, correct answer true.
      4. As a student
      5. Start a quiz attempt
      6. Input the answer False and click 'Check'
      7. Click 'Try another question like this one'
      8. Don't answer the question, just click Finish attempt ... then Submit all and finish.
      9. You should now be on the review page. Click Finish review.
      10. Click 'Re-attempt quiz'
      11. Input the answer True, and click Check.
      12. As teacher
      13. Go to the quiz reports, and review the students first attempt.
      14. Click the '1' link where it says 'Other questions attempted here:'
      15. 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()

            timhunt Tim Hunt
            timhunt Tim Hunt
            Anupama Sarjoshi Anupama Sarjoshi
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 56 minutes
                56m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.