Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-42504

If the quiz auto-save detects that the connection to the server has been lost, we should warn students

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.5.4, 2.6.1
    • 2.5.2
    • Quiz
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • Hide

      To test this, you need to be able to simulate losing internet connection while attempting a quiz. As well as the obvious

      • pull out the network cable, or
      • disconnect wifi,
        you can also
      • edit mod/quiz/autosave.ajax.php and add a syntax error. (e.g. random letter near the top).

      0. Turn on quiz auto-save on Site administration ► Plugins ► Activity modules ► Quiz.

      In fact, you may want to force the value in config.php, so that you can have a shorter delay than 1 minute:

      $CFG->forced_plugin_settings = array('quiz' => array('autosaveperiod' => 10));
      

      1. Create a simple quiz (e.g. one shortanswer question.)

      2. Attempt the quiz as a student, and open the Firebug console (or eqivialent.) If you have developer debug on, that will show you what is going on.

      3. Input a reasonse to the question and wait. It should be auto-saved.

      4. Now simulate losing internet.

      5. Change your response and wait.

      6. This time the save should fail, and the alert should appear at the top of the screen. In firebug, you should see it continue to try to auto-save every so often (the configured delay.)

      7. Simulate re-connecting to the internet.

      8. after the delay, the alert should change to a green all is well message.

      9. Change you response again, and wait some more. The green OK message will disappear on the next auto-save.

      Show
      To test this, you need to be able to simulate losing internet connection while attempting a quiz. As well as the obvious pull out the network cable, or disconnect wifi, you can also edit mod/quiz/autosave.ajax.php and add a syntax error. (e.g. random letter near the top). 0. Turn on quiz auto-save on Site administration ► Plugins ► Activity modules ► Quiz. In fact, you may want to force the value in config.php, so that you can have a shorter delay than 1 minute: $CFG->forced_plugin_settings = array('quiz' => array('autosaveperiod' => 10)); 1. Create a simple quiz (e.g. one shortanswer question.) 2. Attempt the quiz as a student, and open the Firebug console (or eqivialent.) If you have developer debug on, that will show you what is going on. 3. Input a reasonse to the question and wait. It should be auto-saved. 4. Now simulate losing internet. 5. Change your response and wait. 6. This time the save should fail, and the alert should appear at the top of the screen. In firebug, you should see it continue to try to auto-save every so often (the configured delay.) 7. Simulate re-connecting to the internet. 8. after the delay, the alert should change to a green all is well message. 9. Change you response again, and wait some more. The green OK message will disappear on the next auto-save.

      If auto-saving has been turned on in the quiz, then we are able to detect when the student's internet connection has dropped, and warn them before they do something that causes them to lose their responses.

      The warning needs to be quite discreet, so as not to distract or confuse studens too much during their test, but clear enough that it serves the purpose.

      I think the warning should appear in the question navigation block, just above the 'End test...' link and probably also just above the Next button at the bottom of the page. Something like:

      Warning! connection to the server lost.

      The help icon would display slighly more information:

      Something went wrong when automatically saving your responses. This suggests that you have lost your internet connection.

      You should make a note of any responses you have input recently, then try to re-establish your connection before continuing.

      We will probably only display this warning after two or three successive auto-saves have failed, to reduce false postitives.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Andrew Lyons Andrew Lyons
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            7 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.