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

Quiz: after 'Try another question like this one' the second re-grade of an in-progress attempt errors

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-77464_401
    • Hide

      The added automated tests are sufficient to verify the fix for this specific issue.

      [Given the number of recent issues there have been with Quiz re-grading, and 'Try another question like this one' feature, if any tester wanted to do some exploratory testing in this area, that would be great, but I don't think that belongs in this specific bug fix.]

      Show
      The added automated tests are sufficient to verify the fix for this specific issue. [Given the number of recent issues there have been with Quiz re-grading, and 'Try another question like this one' feature, if any tester wanted to do some exploratory testing in this area, that would be great, but I don't think that belongs in this specific bug fix.]

      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 True and click 'Check'
      7. Click 'Try another question like this one' but don't answer the question.
      8. As teacher
      9. Go to the quiz reports
      10. Click 'Regrade all' (it works)
      11. Click 'Continue'.
      12. Click 'Regrade all'.

      Expected result: It works again

      Actual result: Error, becuase the first attempt has corrupted the data a bit.

      Warning: Undefined array key 2 in /var/www/html/moodle/mod/quiz/report/overview/report.php on line 435

      Warning: Attempt to read property "qtype" on null in /var/www/html/moodle/mod/quiz/report/overview/report.php on line 435

      Warning: Undefined array key 2 in /var/www/html/moodle/mod/quiz/report/overview/report.php on line 437

      Warning: Attempt to read property "questionid" on null in /var/www/html/moodle/mod/quiz/report/overview/report.php on line 437

      Can't find data record in database.

            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:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

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