From 03043a3313876e116d5e72b5cac178c23128c020 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 21 Oct 2008 08:20:51 +0000 Subject: [PATCH] quiz timer: MDL-16490 stop the timer when a page is submitted, to avoid nasty double-submission problems. --- mod/quiz/quiz.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.39.5