]> git.mjollnir.org Git - moodle.git/commitdiff
quiz timer: MDL-16490 stop the timer when a page is submitted, to avoid nasty double...
authortjhunt <tjhunt>
Tue, 21 Oct 2008 08:20:51 +0000 (08:20 +0000)
committertjhunt <tjhunt>
Tue, 21 Oct 2008 08:20:51 +0000 (08:20 +0000)
mod/quiz/quiz.js

index 93b484e70bc46368101a5793fdf0c94c458949aa..cc0d473c6ca506be9805cea4bd539a9df4664dd6 100644 (file)
@@ -1,8 +1,6 @@
 /*
  * JavaScript library for the quiz module.
  *
- * (c) The Open University and others.
- * @author T.J.Hunt@open.ac.uk and others.
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -10,6 +8,7 @@ function init_quiz_form() {
     var responseform = document.getElementById('responseform');
     responseform.setAttribute('autocomplete', 'off');
     YAHOO.util.Event.addListener(responseform, 'keypress', check_enter);
+    YAHOO.util.Event.addListener(responseform, 'submit', quiz_timer.stop);
 }
 
 /* Use this in an onkeypress handler, to stop enter submitting the forum unless you