From: mark-nielsen Date: Sat, 9 Sep 2006 22:33:34 +0000 (+0000) Subject: Fixed some formatting when clock is not displayed X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=09e3b9d7eb7e6b336521f888a5d9cebd336c44dc;p=moodle.git Fixed some formatting when clock is not displayed Messages are now printed out on continue.php --- diff --git a/mod/lesson/action/continue.html b/mod/lesson/action/continue.html index b00921793f..0d66667099 100644 --- a/mod/lesson/action/continue.html +++ b/mod/lesson/action/continue.html @@ -34,7 +34,7 @@ if ($lesson->displayleft) { } // End if ($lesson->displayleft) ?> - + displayleft) { // Skip navigation anchor ?> diff --git a/mod/lesson/action/continue.php b/mod/lesson/action/continue.php index 35b7a24671..a67de22384 100644 --- a/mod/lesson/action/continue.php +++ b/mod/lesson/action/continue.php @@ -4,8 +4,6 @@ confirm_sesskey(); - $messages = array(); - // left menu code // check to see if the user can see the left menu if (!has_capability('mod/lesson:manage', $context)) { @@ -16,7 +14,7 @@ if(has_capability('mod/lesson:manage', $context) and lesson_display_teacher_warning($lesson->id)) { $warningvars->cluster = get_string("clusterjump", "lesson"); $warningvars->unseen = get_string("unseenpageinbranch", "lesson"); - $messages[] = get_string("teacherjumpwarning", "lesson", $warningvars); + lesson_set_message(get_string("teacherjumpwarning", "lesson", $warningvars)); } // This is the code updates the lesson time for a timed test @@ -31,9 +29,9 @@ if ($lesson->timed) { if ((($timer->starttime + $lesson->maxtime * 60) - time()) < 60 && !((($timer->starttime + $lesson->maxtime * 60) - time()) < 0)) { - $messages[] = get_string("studentoneminwarning", "lesson"); + lesson_set_message(get_string("studentoneminwarning", "lesson")); } else if (($timer->starttime + $lesson->maxtime * 60) < time()) { - $messages[] = get_string("studentoutoftime", "lesson"); + lesson_set_message(get_string("studentoutoftime", "lesson")); $outoftime = true; } if ((($timer->starttime + $lesson->maxtime * 60) - time()) <= 0) { @@ -50,7 +48,7 @@ // Inform teacher that s/he will not see the timer if ($lesson->timed and has_capability('mod/lesson:manage', $context)) { - $messages[] = get_string("teachertimerwarning", "lesson"); + lesson_set_message(get_string("teachertimerwarning", "lesson")); } // record answer (if necessary) and show response (if none say if answer is correct or not) @@ -771,11 +769,11 @@ // Report attempts remaining if ($attemptsremaining != 0) { - $messages[] = get_string('attemptsremaining', 'lesson', $attemptsremaining); + lesson_set_message(get_string('attemptsremaining', 'lesson', $attemptsremaining)); } // Report if max attempts reached if ($maxattemptsreached != 0) { - $messages[] = '('.get_string("maximumnumberofattemptsreached", "lesson").')'; + lesson_set_message('('.get_string("maximumnumberofattemptsreached", "lesson").')'); } lesson_print_header($cm, $course, $lesson, 'navigation', false);