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

Quiz attempt finish time is not recorded correctly when grace period used

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.11.6, 4.0
    • 3.11.7, 4.0.1
    • Quiz
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74543_311
    • MDL-74543_400
    • Hide

      The new unit test is probably a sufficient test.

      I am going to write manual testing instructions mostly because it helps to explain the problem for anyone trying to understand in future. I am not sure that it is really useful for a tester to work through this manually.

      These steps use quite a short time limit, to make testing more efficient. If you cannot work this fast double all the times.

      Some of the settings referred to here may be hidden behind 'Show more...' links.

      Quiz setup as teacher or admin

      1. Create a quiz with these settings
        • (You will need to give it a name).
        • Time limit: 5 minutes.
        • When time expires: there is a grace period ...
        • Grace period: 5 minutes.
      2. Go to the Questins (Edit quiz) page an add one True/fase question.

      As student

      1. Start an attempt at the quiz. (Note the time)
      2. Input an answer to the question and click Next.
      3. Don't submit. Instead, navigate away from the quiz attempt (e.g. back to the course page).
      4. Wait until 8 minutes after the time you stared the quiz. (I think anything more than 7 mins and less than 10 mins is OK).
      5. Go back to the quiz.
      6. Verify: Your attempt should show as overdue. (This is existing behaviour, has not changed.)
      7. Click Continue attempt - this will take you to the summary page.
      8. Click the button to submit the attempt - this will take you to the Review attempt page.
      9. Verify: that the end time of the attempt is shown as now (not the time 5 mins after the attempt started, when time expired - that is the buggy value that used to be shown.)
      Show
      The new unit test is probably a sufficient test. I am going to write manual testing instructions mostly because it helps to explain the problem for anyone trying to understand in future. I am not sure that it is really useful for a tester to work through this manually. These steps use quite a short time limit, to make testing more efficient. If you cannot work this fast double all the times. Some of the settings referred to here may be hidden behind 'Show more...' links. Quiz setup as teacher or admin Create a quiz with these settings (You will need to give it a name). Time limit: 5 minutes. When time expires: there is a grace period ... Grace period: 5 minutes. Go to the Questins (Edit quiz) page an add one True/fase question. As student Start an attempt at the quiz. (Note the time) Input an answer to the question and click Next. Don't submit. Instead, navigate away from the quiz attempt (e.g. back to the course page). Wait until 8 minutes after the time you stared the quiz. (I think anything more than 7 mins and less than 10 mins is OK). Go back to the quiz. Verify : Your attempt should show as overdue. (This is existing behaviour, has not changed.) Click Continue attempt - this will take you to the summary page. Click the button to submit the attempt - this will take you to the Review attempt page. Verify : that the end time of the attempt is shown as now (not the time 5 mins after the attempt started, when time expired - that is the buggy value that used to be shown.)

    Description

      This is a regression caused by MDL-54907 (sorry).

      When the quiz "when time expires" setting is "There is a grace period when open attempts can be submitted, but no more questions answered", then the time when the student submits is not getting properly recorded. (It is being handled as if the student is offline at the time.)

      Attachments

        1. Step 6.PNG
          Step 6.PNG
          45 kB
        2. Step 9.PNG
          Step 9.PNG
          54 kB

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Mahmoud Kassaei Mahmoud Kassaei
              Jun Pataleta Jun Pataleta
              Gladys Basiana Gladys Basiana
              Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/May/22

                Time Tracking

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