]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some formatting when clock is not displayed
authormark-nielsen <mark-nielsen>
Sat, 9 Sep 2006 22:33:34 +0000 (22:33 +0000)
committermark-nielsen <mark-nielsen>
Sat, 9 Sep 2006 22:33:34 +0000 (22:33 +0000)
Messages are now printed out on continue.php

mod/lesson/action/continue.html
mod/lesson/action/continue.php

index b00921793fc9945a183f1557374ee3975040136b..0d666670991271afc3a7e855a18d53362cdb3bba 100644 (file)
@@ -34,7 +34,7 @@ if ($lesson->displayleft) {
 } // End if ($lesson->displayleft)
 ?>
         <!-- Start Primary column -->
-        <td>
+        <td align="center" width="100%">
     
 <?php if ($lesson->displayleft) { // Skip navigation anchor ?>
         
index 35b7a2467104cc47fa2e0d25babc31dcc45cdc67..a67de22384e6089ca7244635ea2ca4e4ba62ed2c 100644 (file)
@@ -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)
     
     // 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);