- Set "Auto-save delay" to 10 seconds (under Site administration ► Plugins ► Activity modules ► Quiz)
- Open Network tab to ensure autosave ajax call works as expected.
Test steps (should be repeated in Firefox, Chrome, IE, Safari)
- As a teacher create a quiz with one of each sort of question in (within reason).
- Attempt the quiz as a student.
- Do some input into one or more of the questions. After the configured delay after your first change, there should be an Ajax request to the server, to save your changes.
- Navigate away from the quiz by clicking the 'Home' link, and then clicking 'Leave page' in the warning dialogue. (Or, if you prefer, kill your web browser)
- Really you need to repeat 4. for each type of input (text box, HTML editor, radio button, checkbox, dropdown menu, drag-and-drop)
- Navigate back to the quiz and continue attempt. Verify that the data that was autosaved is still there.
- Change some input again, and then click next, either before or after the autosave happens. In both cases it should just work as it has always worked before autosave was implemented.
- Change some data, and try to click next during the gap between the 'Doing a save' and 'Save completed' log messages. Go back to the page you were on, and verify that the outcome of that is sensible.
- Set a time-limit on your quiz. Wait until time has nearly expired and change something. It should not be auto-saved. (More specifically, if you set autosaveperiod to 10 seconds as recommended above, then there should be no auto-saves during the last 20 seconds.)
- is a QA test written for
MDL-38538 Quiz server-side autosave