]> git.mjollnir.org Git - moodle.git/commit
MDL-8682: Pressing enter when answering a short answer question can submit the wrong...
authortjhunt <tjhunt>
Wed, 26 Sep 2007 18:15:31 +0000 (18:15 +0000)
committertjhunt <tjhunt>
Wed, 26 Sep 2007 18:15:31 +0000 (18:15 +0000)
commitfba3ea31bc398ac363763b837f72ede3d5f88069
tree63f32cc00add2258584ecdd2ba9793e775d76f14
parent1843999a774d7583f90825f25d014dee3f552c69
MDL-8682: Pressing enter when answering a short answer question can submit the wrong one. To fix this, I have disabled the enter key unless the keyboard focus is on a submit button (or inside a text box or HTML editor).

MDL-9451: Quiz answers can be lost if user navigates before page reloads. I am not totally sure I have fixed this, but I hope so. I moved the printing of the hidden form field with the list of questions on the page to the end of the form, so no answers will be processed unless the whole form loaded. Note that you could still lose data, but only if the page takes a really long time to load and you answer the first question and click submit before the whole quiz is loaded.

MDL-11463: The quiz uses two different timers, which is silly. I have removed the javascript that was ocasionally used to put a timer in the browser's title bar. Now we only use the one in the page for all cases.

Because MDL-8682 also needed javascript, I renamed timer.js to quiz.js so it could be a library of all the quiz's JavaScript, and started including it properly with require_js.
mod/quiz/attempt.php
mod/quiz/jsclock.php [deleted file]
mod/quiz/jstimer.php
mod/quiz/quiz.js [moved from mod/quiz/timer.js with 61% similarity]