Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Better handling of overdue quiz attempts

From MoodleDocs

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Handling of overdue quiz attempts
Project state Proposal
Tracker issue MDL-3030, MDL-4309
Discussion Quiz forum
Assignee [User:Tim Hunt

Moodle 2.3


There is a tricky issue to do with what happens exactly when time runs on on a quiz. On the one hand, we want to let students use every second of time. On the other hand, the end of a quiz is often a time of high server load, and so Moodle is likely to responding slowly. Therefore, we have to prevent students from cheating on the time-limit while still processing their last-minute submission even if the server is heavily loaded.

There is also the problem of what happens if the student just logs out and does not submit at all. At the moment the attempt goes into a sort of limbo where Moodle can't really do anything with it.


What happens at the moment

At the moment, there are only really two states a quiz attempt can be in, and they are distinguished by whether quiz_attempts.timefinish is 0 or contains a time-stamp.

Quiz attempt states now.png

After time expires, (either because the time limit runs out, or the close date passes) the attempt is in a weird state. Well, not really, the attempt is still considered to be in-progress, but the student is no longer allowed to access it, so there is no way to get at the Submit all and finish button to submit it.

The known work-around is, as teacher, to:

  1. edit quiz settings to allow more time;
  2. login-as the student and submit the quiz;
  3. set the time-limit or close data back to what it should be.

This is a real pain.

New state diagram

Quiz attempt states.png


Summary of UI and DB changes

Rough work break-down

See also