Quiz access rules: Quiz fault-tolerant mode

quizaccess_offlinemode
Maintained by Tim at Lone Pine Koala SanctuaryTim Hunt
This plugin is designed to allow, as far as possible, a student to continue working on a deferred-feedback quiz attempt even if the network connection goes down.
235 sites
182 downloads
25 fans

This plugin can be turned on for particular quizzes in your Moodle site, providing they user How questions behave: Deferred feedback. The goal is to make sure that students never lose any work, even if the network or Moodle server is a bit dodgy.

With this plugin enabled, when the quiz is attempted:

  • All the questions are downloaded at the start, so that you can instantly switch between pages of the attempt with no further contact to the server.
  • When the response to a question is changed, it is saved behind the scenes (like standard quiz auto-save).
  • The the session gets lost, a pop-up appears where you can log in again, then you can continue with the attempt without reloading and losing your unsaved work.
  • At the end, when you submit, the submission is processed asynchronously, so that if an error occurs you can try again, or continue your attempt.
  • If auto-saving fails, then the warning shown is much less dire, since it does not matter so much.
  • Whenever there is unsaved data, you get a warning if you try to leave the quiz page, so you don't accidentally lose data.
  • In case you never re-connect to Moodle, then a download link is provided, so you can save your responses to a file.
  • There is then a screen where Editing teachers or Managers can upload those locally saved responses to be processed.
  • The downloaded responses can be encrypted, if required.

This plugins was created by the Open University, for use in exams. We hope you find it useful.

[WARNING: if you are using a Moodle version older than 2.7.5 or 2.8.3 - not recommended - you will need to apply some patches.]

Screenshots

Screenshot #0
Screenshot #1

Contributors

Tim at Lone Pine Koala Sanctuary
Tim Hunt (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tim at Lone Pine Koala Sanctuary
    Sat, Apr 29, 2017, 3:29 AM
    My guess would be that it works, but I have not been able to test it.

    If you are able to set up a test install of Moodle 3.2, and try installing it and testing that it works, that would be really helpful.
  • Picture of Kevin Bleier
    Wed, May 3, 2017, 6:44 AM
    Will do - probably looking to upgrade after our school term ends in late May / early June, so I'll test and report back if someone doesn't reply sooner.
  • Picture of Kevin Bleier
    Thu, Jun 8, 2017, 11:05 PM
    So I tested the functionality on Moodle 3.3 and it did not seem to work like it does on Moodle 2.9. When I opened a quiz, it just shows all the questions rather than one at a time like I want, and even shows the final submission screen. Can't seem to get out of it either - the submit button doesn't work. None of the drag and drop questions seemed to load correctly either. So I'll be sticking with Moodle 2.9 for now.
  • Tim at Lone Pine Koala Sanctuary
    Fri, Jun 9, 2017, 1:16 AM
    Which theme are you using. I expect it only works with older themes, not Boost.
  • Picture of Kevin Bleier
    Fri, Jun 9, 2017, 6:57 AM
    Ah. I was using Fordson theme with Moodle 3.3, which the author describes as "a child theme of Boost" ... so I guess that's the issue, huh?
  • Tim at Lone Pine Koala Sanctuary
    Fri, Jun 9, 2017, 2:48 PM
    Well, certainly worth trying with Clean theme to see if it works.
  • Picture of Outuckic Outucpas
    Tue, May 8, 2018, 9:45 PM
    Hi Tim,

    I'm also interested in using that plugin but we are using Moodle 3.2 + 3.3 and even 3.4.
    We are using the default theme (design) of Moodle, and didn't change anything visually.

    But as Kevin Bleier said, in Moodle 3.3 or 3.4, when module is activated, all the questions show on the same page.
    It also makes the quiz impossible to use (offline it doesn't save anything, and online you can't also save replies).

    It seems the plugin is incompatible with Moodle 3.1+. Tim, are you thinking updating the plugin to these versions ? Could I help you ?
    Or are you thinking not maintaining the plugin anymore.

    Thanks
  • Tim at Lone Pine Koala Sanctuary
    Thu, May 10, 2018, 10:14 PM
    At the moment, the Open University is not using this plugin, so it is not one that is a high priority for us to upgrade.

    From the description, it may be as simple as some CSS that needs to be chagned to work with newer Moodle Themes, and this plugin does have pretty thorough automated test coverage, which helps with maintenance.

    If anyone else is able to work on fixing this, then that would be great. We could either transfer maintainer-ship of this plugin, or I could merge a pull request into my repo. Thanks.
  • Picture of Roland Sherwood
    Tue, Oct 23, 2018, 2:16 PM
    Hi Tim. As with all the plugins you're involved with and share with the community - many thanks for making the functionality this plugin affords possible. Re. 3.5 compatibility: if possible, please could you quickly confirm that the plugin is fully functioning under this version of Moodle? I know it states 3.5 *is* supported under the versions listing; however, I was just a bit worried re. whether the issues identified in your own and André's comments above have since been resolved. Again, many thanks.
  • Tim at Lone Pine Koala Sanctuary
    Tue, Oct 23, 2018, 6:20 PM
    Well, you need to understand that the Open University is not actively using this plugin at the moment, which reduces the amount of real-world testing this plugin gets. However, when this plugin was created, I implemented very thorough automated tests, and those all still pass. They simulate a student attempting a quiz using this plugin, including the tricky edge cases.

    If you want any more testing than that, you will need to set up a Moodle 3.5 site for yourself and do some extra testing. If you do that, please report back here so others can benefit from your results.
  • Picture of Gabriel JALAM
    Wed, Jun 17, 2020, 11:38 PM
    Hello,
    I installed the fQuiz fault-tolerant mode and set up a Quiz to use this mode. All questions are single choice MCQs.
    A student had a connection problem and was able to recover a file called 2020-i118245-a28161-d202006161305.attemptdata
    I wanted to upload this file to retrieve the student's responses, but I receive this following error message. Could you help me understand why the import didn't work. Do you know how to fix this problem? I have Moodle 3.6.10
    Best regards,

    Uploading responses for Examen QCM UE Ecosystèmes 2020
    Processing file Examen QCM UE Ecosystèmes 2020-i118245-a28161-d202006161305.attemptdata
    Array
    (
    [q48928:1_:flagged] => 0
    [q48928:1_:sequencecheck] => 1
    [q48928:1_answer] => 3
    [q48928:2_:flagged] => 0
    [q48928:2_:sequencecheck] => 1
    [q48928:3_:flagged] => 0
    [q48928:3_:sequencecheck] => 1
    [q48928:3_answer] => 0
    [q48928:4_:flagged] => 0
    [q48928:4_:sequencecheck] => 1
    [q48928:4_answer] => 3
    [q48928:5_:flagged] => 0
    [q48928:5_:sequencecheck] => 1
    [q48928:5_answer] => 0
    [q48928:6_:flagged] => 0
    [q48928:6_:sequencecheck] => 1
    [q48928:6_answer] => 0
    [q48928:7_:flagged] => 0
    [q48928:7_:sequencecheck] => 1
    [q48928:7_answer] => 2
    [q48928:8_:flagged] => 0
    [q48928:8_:sequencecheck] => 1
    [q48928:8_answer] => 3
    [q48928:9_:flagged] => 0
    [q48928:9_:sequencecheck] => 1
    [q48928:9_answer] => 3
    [q48928:10_:flagged] => 0
    [q48928:10_:sequencecheck] => 1
    [q48928:10_answer] => 0
    [q48928:11_:flagged] => 0
    [q48928:11_:sequencecheck] => 1
    [q48928:11_answer] => 2
    [q48928:12_:flagged] => 0
    [q48928:12_:sequencecheck] => 1
    [q48928:12_answer] => 1
    [q48928:13_:flagged] => 0
    [q48928:13_:sequencecheck] => 1
    [q48928:13_answer] => 0
    [q48928:14_:flagged] => 0
    [q48928:14_:sequencecheck] => 1
    [q48928:14_answer] => 2
    [q48928:15_:flagged] => 0
    [q48928:15_:sequencecheck] => 1
    [q48928:15_answer] => 0
    [q48928:16_:flagged] => 0
    [q48928:16_:sequencecheck] => 1
    [q48928:16_answer] => 2
    [q48928:17_:flagged] => 0
    [q48928:17_:sequencecheck] => 1
    [q48928:17_answer] => 0
    [q48928:18_:flagged] => 0
    [q48928:18_:sequencecheck] => 1
    [q48928:19_:flagged] => 0
    [q48928:19_:sequencecheck] => 1
    [q48928:19_answer] => 0
    [q48928:20_:flagged] => 0
    [q48928:20_:sequencecheck] => 1
    [q48928:21_:flagged] => 0
    [q48928:21_:sequencecheck] => 1
    [q48928:21_answer] => 2
    [q48928:22_:flagged] => 0
    [q48928:22_:sequencecheck] => 1
    [q48928:22_answer] => 0
    [q48928:23_:flagged] => 0
    [q48928:23_:sequencecheck] => 1
    [q48928:23_answer] => 1
    [q48928:24_:flagged] => 0
    [q48928:24_:sequencecheck] => 1
    [q48928:24_answer] => 2
    [q48928:25_:flagged] => 0
    [q48928:25_:sequencecheck] => 1
    [q48928:25_answer] => 1
    [q48928:26_:flagged] => 0
    [q48928:26_:sequencecheck] => 1
    [q48928:27_:flagged] => 0
    [q48928:27_:sequencecheck] => 1
    [q48928:27_answer] => 1
    [q48928:28_:flagged] => 0
    [q48928:28_:sequencecheck] => 1
    [q48928:28_answer] => 1
    [q48928:29_:flagged] => 0
    [q48928:29_:sequencecheck] => 1
    [q48928:29_answer] => 3
    [q48928:30_:flagged] => 0
    [q48928:30_:sequencecheck] => 1
    [q48928:30_answer] => 0
    [q48928:31_:flagged] => 0
    [q48928:31_:sequencecheck] => 1
    [q48928:31_answer] => 1
    [q48928:32_:flagged] => 0
    [q48928:32_:sequencecheck] => 1
    [q48928:32_answer] => 2
    [q48928:33_:flagged] => 0
    [q48928:33_:sequencecheck] => 1
    [q48928:33_answer] => 3
    [q48928:34_:flagged] => 0
    [q48928:34_:sequencecheck] => 1
    [q48928:34_answer] => 0
    [q48928:35_:flagged] => 0
    [q48928:35_:sequencecheck] => 1
    [q48928:35_answer] => 0
    [q48928:36_:flagged] => 0
    [q48928:36_:sequencecheck] => 1
    [q48928:36_answer] => 0
    [q48928:37_:flagged] => 0
    [q48928:37_:sequencecheck] => 1
    [q48928:37_answer] => 1
    [q48928:38_:flagged] => 0
    [q48928:38_:sequencecheck] => 1
    [q48928:38_answer] => 3
    [q48928:39_:flagged] => 0
    [q48928:39_:sequencecheck] => 1
    [q48928:40_:flagged] => 0
    [q48928:40_:sequencecheck] => 1
    [q48928:41_:flagged] => 0
    [q48928:41_:sequencecheck] => 1
    [q48928:41_answer] => 3
    [q48928:42_:flagged] => 0
    [q48928:42_:sequencecheck] => 1
    [q48928:42_answer] => 3
    [q48928:43_:flagged] => 0
    [q48928:43_:sequencecheck] => 1
    [q48928:43_answer] => 1
    [q48928:44_:flagged] => 0
    [q48928:44_:sequencecheck] => 1
    [q48928:44_answer] => 3
    [q48928:45_:flagged] => 0
    [q48928:45_:sequencecheck] => 1
    [q48928:45_answer] => 2
    [q48928:46_:flagged] => 0
    [q48928:46_:sequencecheck] => 1
    [q48928:47_:flagged] => 0
    [q48928:47_:sequencecheck] => 1
    [q48928:47_answer] => 2
    [q48928:48_:flagged] => 0
    [q48928:48_:sequencecheck] => 1
    [q48928:48_answer] => 0
    [q48928:49_:flagged] => 0
    [q48928:49_:sequencecheck] => 1
    [q48928:49_answer] => 3
    [q48928:50_:flagged] => 0
    [q48928:50_:sequencecheck] => 1
    [q48928:50_answer] => 0
    [q48928:51_:flagged] => 0
    [q48928:51_:sequencecheck] => 1
    [q48928:51_answer] => 3
    [q48928:52_:flagged] => 0
    [q48928:52_:sequencecheck] => 1
    [q48928:52_answer] => 3
    [q48928:53_:flagged] => 0
    [q48928:53_:sequencecheck] => 1
    [q48928:53_answer] => 0
    [q48928:54_:flagged] => 0
    [q48928:54_:sequencecheck] => 1
    [q48928:54_answer] => 3
    [q48928:55_:flagged] => 0
    [q48928:55_:sequencecheck] => 1
    [q48928:55_answer] => 0
    [q48928:56_:flagged] => 0
    [q48928:56_:sequencecheck] => 1
    [q48928:56_answer] => 1
    [q48928:57_:flagged] => 0
    [q48928:57_:sequencecheck] => 1
    [q48928:57_answer] => 0
    [q48928:58_:flagged] => 0
    [q48928:58_:sequencecheck] => 1
    [q48928:58_answer] => 3
    [q48928:59_:flagged] => 0
    [q48928:59_:sequencecheck] => 1
    [q48928:59_answer] => 1
    [q48928:60_:flagged] => 0
    [q48928:60_:sequencecheck] => 1
    [q48928:60_answer] => 3
    [q48928:61_:flagged] => 0
    [q48928:61_:sequencecheck] => 1
    [q48928:61_answer] => 1
    [q48928:62_:flagged] => 0
    [q48928:62_:sequencecheck] => 1
    [q48928:62_answer] => 2
    [q48928:63_:flagged] => 0
    [q48928:63_:sequencecheck] => 1
    [q48928:63_answer] => 3
    [q48928:64_:flagged] => 0
    [q48928:64_:sequencecheck] => 1
    [q48928:64_answer] => 3
    [q48928:65_:flagged] => 0
    [q48928:65_:sequencecheck] => 1
    [q48928:65_answer] => 0
    [q48928:66_:flagged] => 0
    [q48928:66_:sequencecheck] => 1
    [q48928:67_:flagged] => 0
    [q48928:67_:sequencecheck] => 1
    [q48928:67_answer] => 0
    [q48928:68_:flagged] => 0
    [q48928:68_:sequencecheck] => 1
    [q48928:68_answer] => 1
    [q48928:69_:flagged] => 0
    [q48928:69_:sequencecheck] => 1
    [q48928:69_answer] => 0
    [q48928:70_:flagged] => 0
    [q48928:70_:sequencecheck] => 1
    [q48928:70_answer] => 3
    [q48928:71_:flagged] => 0
    [q48928:71_:sequencecheck] => 1
    [q48928:71_answer] => 0
    [q48928:72_:flagged] => 0
    [q48928:72_:sequencecheck] => 1
    [q48928:72_answer] => 2
    [q48928:73_:flagged] => 0
    [q48928:73_:sequencecheck] => 1
    [q48928:73_answer] => 1
    [q48928:74_:flagged] => 0
    [q48928:74_:sequencecheck] => 1
    [q48928:74_choice0] => 0
    [q48928:74_choice1] => 0
    [q48928:74_choice2] => 0
    [q48928:74_choice3] => 0
    [q48928:75_:flagged] => 0
    [q48928:75_:sequencecheck] => 1
    [q48928:75_answer] => 2
    [q48928:76_:flagged] => 0
    [q48928:76_:sequencecheck] => 1
    [q48928:76_answer] => 3
    [q48928:77_:flagged] => 0
    [q48928:77_:sequencecheck] => 1
    [q48928:77_answer] => 1
    [q48928:78_:flagged] => 0
    [q48928:78_:sequencecheck] => 1
    [q48928:78_answer] => 0
    [q48928:79_:flagged] => 0
    [q48928:79_:sequencecheck] => 1
    [q48928:79_answer] => 1
    [q48928:80_:flagged] => 0
    [q48928:80_:sequencecheck] => 1
    [q48928:80_answer] => 1
    [q48928:81_:flagged] => 0
    [q48928:81_:sequencecheck] => 1
    [q48928:81_answer] => 1
    [q48928:82_:flagged] => 0
    [q48928:82_:sequencecheck] => 1
    [q48928:82_answer] => 1
    [q48928:83_:flagged] => 0
    [q48928:83_:sequencecheck] => 1
    [q48928:83_answer] => 2
    [q48928:84_:flagged] => 0
    [q48928:84_:sequencecheck] => 1
    [q48928:84_answer] => 0
    [q48928:85_:flagged] => 0
    [q48928:85_:sequencecheck] => 1
    [q48928:85_answer] => 2
    [q48928:86_:flagged] => 0
    [q48928:86_:sequencecheck] => 1
    [q48928:86_answer] => 1
    [q48928:87_:flagged] => 0
    [q48928:87_:sequencecheck] => 1
    [q48928:87_answer] => 0
    [q48928:88_:flagged] => 0
    [q48928:88_:sequencecheck] => 1
    [q48928:88_answer] => 2
    [q48928:89_:flagged] => 0
    [q48928:89_:sequencecheck] => 1
    [q48928:89_answer] => 0
    [q48928:90_:flagged] => 0
    [q48928:90_:sequencecheck] => 1
    [q48928:90_answer] => 0
    [next] => Suivant
    [attempt] => 28161
    [thispage] => 89
    [nextpage] => -1
    [timeup] => 1
    [sesskey] => CdRlFReIw4
    [scrollpos] =>
    [slots] => 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90
    )

    The upload failed
    Access out of sequence. Please do not click the back button when working on quiz questions.
    line 606 of /question/engine/questionusage.php: call to question_usage_by_activity->validate_sequence_number()
    line 1907 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->process_all_actions()
    line 165 of /mod/quiz/accessrule/offlinemode/upload.php: call to quiz_attempt->process_submitted_actions()
  • Tim at Lone Pine Koala Sanctuary
    Wed, Jun 17, 2020, 11:45 PM
    Two possibilities I can think of:

    1) When time expired, Moodle automatically closed the quiz attempt, and so it is no longer possible to add the responese.
    2) The student's internet connection came back, and they were able to submit the responses themself, so they are already processed.

    If 1) then it many be possible to undo the effect of the quiz being submitted by editing in the database, but it is not easy. That would require something like MDL-35745.
  • Picture of Gabriel JALAM
    Thu, Jun 18, 2020, 12:13 AM
    thank you for your quick response.
    I am in case number 1 because the quiz is configured for an automatic sending and certain answers (for questions from 1 to 8) are already recorded for this student.
    I can modify the table "mdl_quiz_attempts" and go to the student's attempt. Do I need to change the status from finished to inprogress or other status ?
  • Tim at Lone Pine Koala Sanctuary
    Thu, Jun 18, 2020, 12:17 AM
    It's more complex than that, because you also need to update the data about each question (https://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine#Detailed_data_about_an_attempt)
  • Picture of Gabriel JALAM
    Fri, Jun 19, 2020, 1:18 AM
    Hello
    Indeed, I see that it is not as simple as I imagined.
    If I have to manually modify the states of questions 1 to 9 of this attempt, should I make them in which table? Here are the tables that I have identified:

    mdl_quiz_attempts
    mdl_question_usages
    mdl_question_attempts
    mdl_question_attempt_steps
    mdl_question_attempt_step_data

    I just sent you a private message with a link to the student's file
    Thanks for your help
1 2
Please login to post comments