MDL-36347 quiz: formchangechecker should not obstruct auto-submit.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 3 Nov 2012 07:36:13 +0000 (18:36 +1100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 3 Nov 2012 11:34:53 +0000 (22:34 +1100)
When the quiz time limit runs out, the quiz should be submitted
automatically, withouth formchangechecker popping up a dialogue.

mod/quiz/module.js

index ce0d359..70332fa 100644 (file)
@@ -101,6 +101,7 @@ M.mod_quiz.timer = {
             if (form.one('input[name=finishattempt]')) {
                 form.one('input[name=finishattempt]').set('value', 0);
             }
             if (form.one('input[name=finishattempt]')) {
                 form.one('input[name=finishattempt]').set('value', 0);
             }
+            M.core_formchangechecker.set_form_submitted();
             form.submit();
             return;
         }
             form.submit();
             return;
         }