From: tjhunt Date: Wed, 11 Apr 2007 20:07:36 +0000 (+0000) Subject: MDL-9280 - JavaScript countdown timer did not work in 1.8 due to XHTML strict changes... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=86ccf19cdbaf8e33d4a4e23672a78a15011d11c7;p=moodle.git MDL-9280 - JavaScript countdown timer did not work in 1.8 due to XHTML strict changes. Also, fixing a few more XHTML strrrrict things in attempt.php. Merged from MOODLE_18_STABLE. --- diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index b98d0c89a3..583f0762fc 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -429,14 +429,12 @@ } } - // Start the form + echo "
\n"; if($quiz->timelimit > 0) { // Make sure javascript is enabled for time limited quizzes ?> \n"; } // Add a hidden field with the quiz id @@ -502,7 +498,7 @@ echo "\n"; } echo "\n"; - echo ''; + echo ''; echo ""; @@ -522,11 +518,10 @@ // For teachers ignore the quiz closing time $secondsleft = 999999999999; } + // If time limit is set include floating timer. // MDL-7495, no timer for users with disability - - if ($quiz->timelimit > 0 && !has_capability('mod/quiz:ignoretimelimits', $context)) { - + if ($quiz->timelimit > 0 && !has_capability('mod/quiz:ignoretimelimits', $context, NULL, false)) { $timesincestart = time() - $attempt->timestart; $timerstartvalue = min($quiz->timelimit*60 - $timesincestart, $secondsleft); if ($timerstartvalue <= 0) { diff --git a/mod/quiz/jstimer.php b/mod/quiz/jstimer.php index 2785f35c0e..adc6434025 100644 --- a/mod/quiz/jstimer.php +++ b/mod/quiz/jstimer.php @@ -47,8 +47,8 @@ var ec_quiz_finish = ec_page_start + ;