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

There must be a way to get a "Never submitted" quiz attempt back to the "In progress" state

    XMLWordPrintable

Details

    • MOODLE_23_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_402_STABLE
    • Hide

      The automated tests cover quite well.

      Since there is new UI, it might be good to get some manual testing, but the setup is a pain, because of the need to get an attempts into the 'Never submitted' state.

      Quiz setup.

      1. As teacher (or admin)
      2. Create a new quiz. Key settings
        • When time expires: Attempts must be submitted before time expires, or they are not counted
        • Time limit: 1 minute (That is, something short enough that you don't mind waiting for it, but long enough that you can do the steps below before it runs out.)
      3. On the Questions page, just add one question to the quiz. (Type does not matter, True-false is quickest.)
      4. Make sure there is a suitable Student account enrolled in the course where the quiz is.

      Attempt setup.

      1. As student
      2. Start an attempt at the quiz.
      3. Then, log out, before the time on the quiz expires.
      4. Wait until after the time has run out, and then an extra 1 minute.
      5. Then, after that, make sure that cron has run (in particular, the \mod_quiz\task\update_overdue_attempts task.
      6. As Teacher.
      7. Go to the reports for this quiz.
      8. You should see that the Student's attempt is in the 'Never submitted' state.

      (Another way to get to this point is to run the scenario 'Re-opening an attempt can be cancelled and then nothing happens' from mod/quiz/report/overview/tests/behat/reopen_attempt.feature.)

      The test (happy path)

      1. As Teacher.
      2. Go to the reports for this quiz.
      3. Click the button 'Re-open' next to where it says the state of the attempt is 'Never submitted'.
      4. Verify the message in the pop-up makes sense.
      5. Click the 'Re-open' button in the pop-up.
      6. Verify the report now shows this attempt as 'Finished'.
      7. Click the 'Review attempt' link.
      8. Verify the review looks OK. (If you strictly followed the instructions above, the single TF question have zero marks because you left the answer blank.)

      Given the setup pain, I suggest leaving it to Behat and PHPunit test test the other cases!

      Show
      The automated tests cover quite well. Since there is new UI, it might be good to get some manual testing, but the setup is a pain, because of the need to get an attempts into the 'Never submitted' state. Quiz setup. As teacher (or admin) Create a new quiz. Key settings When time expires: Attempts must be submitted before time expires, or they are not counted Time limit: 1 minute (That is, something short enough that you don't mind waiting for it, but long enough that you can do the steps below before it runs out.) On the Questions page, just add one question to the quiz. (Type does not matter, True-false is quickest.) Make sure there is a suitable Student account enrolled in the course where the quiz is. Attempt setup. As student Start an attempt at the quiz. Then, log out, before the time on the quiz expires. Wait until after the time has run out, and then an extra 1 minute. Then, after that, make sure that cron has run (in particular, the \mod_quiz\task\update_overdue_attempts task. As Teacher. Go to the reports for this quiz. You should see that the Student's attempt is in the 'Never submitted' state. (Another way to get to this point is to run the scenario 'Re-opening an attempt can be cancelled and then nothing happens' from mod/quiz/report/overview/tests/behat/reopen_attempt.feature.) The test (happy path) As Teacher. Go to the reports for this quiz. Click the button 'Re-open' next to where it says the state of the attempt is 'Never submitted'. Verify the message in the pop-up makes sense. Click the 'Re-open' button in the pop-up. Verify the report now shows this attempt as 'Finished'. Click the 'Review attempt' link. Verify the review looks OK. (If you strictly followed the instructions above, the single TF question have zero marks because you left the answer blank.) Given the setup pain, I suggest leaving it to Behat and PHPunit test test the other cases!

    Description

      This was intentionally ruled out of scope when the MDL-3030 work was done, but from various recent threads in the quiz forum, it seems this is functionality that people really need.

      Technically, this is very easy to implement. We just need to set quiz_attempts.state back to 'inprogress'. That is, the opposite of what process_abandon in attemptlib.php does. Of course, we should also consider firing an event at that point.

      This is the interface I have implemented:

      1. In the quiz reports, if an attempt has not been submitted, then in the 'State' column, after the text 'Never submitted', there is now a 'Re-open' button.
      2. If you click on that button, you get an "Are you sure?" pop-up.
      3. If you click Cancel there, nothing happens.
      4. If you cick the 'Re-open' button in the pop-up, then the attempt is re-opened, and the report page reloads.
      5. When I say the attempt is re-opened, there are two cases. If the student does not have any time left (which might well be the case, since the attempt was in the 'Never submitted' state. Then the attempt is immediately graded, and ends up in the 'Submitted' state.
      6. Alternatively, if the student now has time left (perhaps because the teacher changed th quiz settings, or added an override for this user) then the quiz is back in the 'In progress' state, and the student can continue.

      From the original description: The question is, what UI should trigger this. Options include:

      1. Do it automatically (cron) when teachers edit the quiz settings, or a group or use override, or add a user to a group with an override, or ... That rapidly gets very complex, but cron already has to deal with it, particularly after we fix MDL-35717.

      2. Add a new button at the bottom of Results / Grades report, next to "Regrade selected attempts" and "Delete selected attempts", we could add "Re-open selected attempts". (Of course, it makes no sense to let teachers re-open an attempt if cron will just move it back to Never submitted very soon.)

      3. We could make a special new report for re-opening Never submitted attempts, and/or submitting open attempts on behalf of the student, which only shows the applicable buttons for each attempt.

      I am not really sure which of these ideas would work best.

      Relevant forum threads include http://moodle.org/mod/forum/discuss.php?d=212819

      Attachments

        Issue Links

          Activity

            People

              Votes:
              76 Vote for this issue
              Watchers:
              69 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 44 minutes
                  1d 3h 44m

                  Clockify

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