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

Regrade of an in-progress attempt with interactive behaviour messes up the tries count

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0.7, 4.1.2
    • 4.0.6, 4.1.1
    • Questions
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-77090_401
    • Hide

      To understand this test, it might be good to first reproduce the bug on an un-fixed version of Moodle.

      1. Create a Quiz with Question behaviour -> How questions behave: Interactive with multiple tries.
      2. Add a matching question to the quiz.
      3. Log in as student, and start an attempt at the quiz.
      4. Note that the question state is shown as 'Tries remaining: 1'
      5. As admin (perhaps in a different browser), go to the Quiz -> Results and click 'Regrade all'.
      6. Back as student, reload the page.
      7. Verify that the question state is still shown as 'Tries remaining: 1'.
      Show
      To understand this test, it might be good to first reproduce the bug on an un-fixed version of Moodle. Create a Quiz with Question behaviour -> How questions behave: Interactive with multiple tries. Add a matching question to the quiz. Log in as student, and start an attempt at the quiz. Note that the question state is shown as 'Tries remaining: 1' As admin (perhaps in a different browser), go to the Quiz -> Results and click 'Regrade all'. Back as student, reload the page. Verify that the question state is still shown as 'Tries remaining: 1'.

      Steps to reproduce:

      1. Create a quiz containing one matching question with two hints, and using Interactive with multiple tries behaviour.
      2. As a student, start an attempt at the quiz. Note that the question state is shown as 'Tries remaining: 3'
      3. As admin, regrade the quiz.
      4. As student, resume your attempt.

      Expected result: No visible change to the question.

      Actual result.

      5. It now shows ‘Tries remaining {$a}’ instead of 'Tries remaining 3'.
      6. If you submit incorrect or partially correct answers as many time as you like without limit. (Tries remaining goes -1, -2, -3, …)

      I suspect that the underlying bug in the regrade code has been present for a long time, but lay dormant until MDL-72890 was implemented.

        1. (I) Passed -- (400)MDL-77090.png
          56 kB
          Kim Jared Lucas
        2. (I) Passed -- (401)MDL-77090.png
          49 kB
          Kim Jared Lucas
        3. (I) Passed -- (Master)MDL-77090.png
          65 kB
          Kim Jared Lucas
        4. Screenshot_2023-02-02 Quiz (MDL-77090).png
          14 kB
          Paul Holden

            timhunt Tim Hunt
            timhunt Tim Hunt
            Anupama Sarjoshi Anupama Sarjoshi
            Paul Holden Paul Holden
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 49 minutes
                4h 49m

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