-
Sub-task
-
Resolution: Fixed
-
Blocker
-
2.4.3
-
MOODLE_24_STABLE
-
MOODLE_25_STABLE
-
MDL-38538_clean -
This extends the work started in MDL-38537.
As well as saving the data on the student's computer, we will also save it on the Moodle sever.
Because this add extra load on the server, I think we need an option to control it, and I think this should be a site-wide admin setting
Auto save quiz attempt data: No / Every minute / Every 2 minutes / Every 5 minutes
When this option is on, the client-side JavaScript will automatically make an Ajax call to save the current state of the quiz attempt form with that frequency (if the student has changed any data since the last save).
The Ajax call will go to a new script mod/quiz/autosave.php.
This will call new code in the question engine: question_usage::auto_save(...) -> question_attempt::auto_save(...) -> question_behaviour_base::auto_save(...) which does the actual work.
A question_attempt comprises a list of question_attempt_steps, each step has a state. During the attempt there are three states used: todo, complete and invalid. We will add a 4th state 'autosaved'. A step with that state will not be a real step, it will just hold the auto-saved data.
We need to consider the following new cases:
- During an attempt which up until now has been 'normal' we get an auto-save action.
- With one auto-save on record, a second auto-save happens.
- With an auto-save on record, we then reveive a 'proper' submission, which should be processed as if the auto-saves had never happened.
- When displaying a quiz attempt, we find auto-save data on record which was never overwritten by a 'proper' submission.
- Discovered while testing
-
MDL-38935 Quiz autosave does not save Essay responses
- Closed
-
MDLSITE-2181 Coding style checks should ignore minified/built JS files
- Closed
- has a QA test
-
MDLQA-9249 Quiz user attempt should be autosaved after specified time
- Open
-
MDLQA-15270 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-15859 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-16505 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-17121 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-17711 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-18216 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-18710 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
-
MDLQA-19173 CLONE - Quiz user attempt should be autosaved after specified time
- Passed
- has been marked as being related by
-
MDL-38537 Quiz client-side auto-save
- Open
-
MDL-42504 If the quiz auto-save detects that the connection to the server has been lost, we should warn students
- Closed
-
MDL-34640 Question types using uploaded files in responses cannot be automatically graded
- Closed