From: tjhunt Date: Tue, 21 Oct 2008 08:20:51 +0000 (+0000) Subject: quiz timer: MDL-16490 stop the timer when a page is submitted, to avoid nasty double... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=03043a3313876e116d5e72b5cac178c23128c020;p=moodle.git quiz timer: MDL-16490 stop the timer when a page is submitted, to avoid nasty double-submission problems. --- diff --git a/mod/quiz/quiz.js b/mod/quiz/quiz.js index 93b484e70b..cc0d473c6c 100644 --- a/mod/quiz/quiz.js +++ b/mod/quiz/quiz.js @@ -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