Development:States of a quiz attempt
This page relates to the problem of the following scenario:
- Student starts an attempt at a timed quiz.
- Student logs out and goes away.
- Quiz time limit expires.
- Student (or teacher) comes back. They now cannot continue (or review, or complete) the quiz attempt. They are stuck.
Different people have different desires for how this is handled. The aim of this page is to collect together all the things that different people might want, so we can try to design a solution that makes everyone happy.
Currently this page is just a random dump of things Tim remembered, please feel free to add to, or edit it.
What currently happens
The states a quiz attempt can be in
- {before the attempt is started}. Not sure if this really exists. Before the attempt has been started, it does not exist!
- During the quiz attempt (Quiz attempt open). This is distinguished by $attempt->timefinish being 0.
- After the attempt is finished. This is distinguished by $attempt->timefinish being non-zero.
Behaviour
- A user can have at most one quiz attempt open at any time.
- If the user is attempting the quiz when the time expires, and if they have JavaScript on, then the quiz is automatically submitted for them.
- If the student is not attempting the quiz when the time expires, then their attempt is not submitted, and neither the student nor the teacher can submit it.
- Time can expire either because of $quiz->timelimit, or $quiz->timeclose.
- There is a capability mod/quiz:ingoretimelimit for accessibility reasons. This causes $quiz->timelimit, but not $quiz->timeclose, to be ignored.
- After the attempt is submitted, studnets may, or may not be able to review, depending on the quiz review settings and whether $quiz->timeclose has passed.
- In addition to the only one open attempt rule, there may also be a delay between the end of one quiz attempt and the start of the next ($quiz->delay1/2).
What we would like to happen
The states we need to distinguish
- {before the attempt is started}
- Quiz attempt open, time has not expired.
- Quiz attempt open, time has expired.
- Quiz attempt submitted, some questions need manual grading.
- Quiz attempt submitted, all questions graded.
Might we also want/need to distinguish the states 'results not visible yet', and 'results released to student', for a submitted quiz. These two are orthogonal to whether any questions need manual grading, so that actually leads to four sub-states under submitted.
Behaviour
- Teacher should have the option to submit an attempt when the student forgot.
- Student should have the option to submit an attempt late (but not answer any more questions) when they forgot.
- But other people like the current behaviour: the student must submit on time, and if they don't they don't get a grade, and it is tough luck.
- Alternatively, the quiz may have an option set to automatically submit any quiz attempt the moment time has expired.
- May want an option where, if the student is allowed to submit late, we do process any updated answers, but a penalty is applied to their score.
- May want an option for a teacher to un-submit a quiz attempt, for those situations where a student (claims to) have clicked Submit all and Finish too early, by mistake.
- Teachers can delete any quiz attempt (open or submitted) at any time.
- ... please add more ideas here ...
Changes to the code
- New capability mod/quiz:submitlateattempt - can apply to students, and/or teachers, but with slightly different meaning. (Teacher here is probably defined by mod/quiz:grade, or mod/quiz:viewreports. Or perhaps it is clearly to have separate capabilities mod/quiz:submitmylateattempt and mod/quiz:submitanylateattempt.)
- New database column quiz_attempt.state, to make the current state clear.
- Code on cron, or when the attempt is accessed, to update the attempt state if, for example, time has expired since it was last changed.
- Possibly new column quiz_attempt.finishedby, to record the userid of the user who submitted the attempt, so we know if the teacher has submitted a later attempt for the student. Could be NULL, if late attempts are submitted automatically.
- New quiz settings to configure these behaviours.
See also
Discussion
- Please discuss this in this Quiz forum thread.
Relevant tracker issues
- MDL-3030 Late quiz attempts should be closed automatically
- MDL-3452 Use saved answers when marking late submissions
- MDL-4309 Ability for late quizzes (with penalty)
- MDL-20956 Student can't start new attempt if a quiz has timle limit between attempts and time limit for a quiz, and he doesn't submit previous attempt closing browser window instead
- ... please add other relevant tracker issues here.