Testing quiz caching in Moodle
This blog post will show you how to create a quiz using the Moodle system that will restore the users inputted answers in case communication with the server is interrupted by a faulty Internet connection. This is especially useful in the Distance Learning environment where Internet connections are oftentimes unreliable.
Question asked when the user disconnected:
Quiz attempt in progress when the user returns:
Confirmation before submitting the quiz attempt:
Review your attempt:
Restore auto-saved content button
We’ve enabled a button to restore the content a user has entered into a text area after he/she has lost the connection or communication is interrupted between his or her location and the moodle server. The way it works is that when the user comes back after communication with the server has been interrupted the user can restore the previously entered text by clicking the “Restore auto-saved content” button.
This functionality saves the users´ every keystroke so no timer has to be set up.
How to enable the button (Moodle 2.4):
Open file lib/editor/tinymce/lib.php
Look up for $params variable around line 137.
In the ‘plugins’ item of the array add “,autosave” at the end and without quotes.
As moodle administrator go to: Site administration >> Plugins >> Text editors >> TinyMCE HTML editor >> General settings
In the Editor toolbar add “restoredraft” wherever you want the restore button to appear.
If you don’t see the button appear on a text area after this try clearing the browser’s cache.
Confirmation before submitting the quiz caching Moodle attempt: