]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #5620 - MyMoodle shows bogus Assignment due date; merged from MOODLE_16_STABLE
authorskodak <skodak>
Mon, 29 May 2006 08:37:51 +0000 (08:37 +0000)
committerskodak <skodak>
Mon, 29 May 2006 08:37:51 +0000 (08:37 +0000)
mod/assignment/lib.php

index f6dae8df08ba7f294f170a7494a3f5058ee9c278..4a638125f5bcc9c49283042d2fe6b80cabce4be5 100644 (file)
@@ -2320,6 +2320,7 @@ function assignment_print_overview($courses, &$htmlarray) {
     }
 
     $strduedate = get_string('duedate', 'assignment');
+    $strduedateno = get_string('duedateno', 'assignment');
     $strgraded = get_string('graded', 'assignment');
     $strnotgradedyet = get_string('notgradedyet', 'assignment');
     $strnotsubmittedyet = get_string('notsubmittedyet', 'assignment');
@@ -2332,7 +2333,11 @@ function assignment_print_overview($courses, &$htmlarray) {
                'title="'.$strassignment.'" href="'.$CFG->wwwroot.
                '/mod/assignment/view.php?id='.$assignment->coursemodule.'">'.
                $assignment->name.'</a></div>';
-        $str .= '<div class="info">'.$strduedate.': '.userdate($assignment->timedue).'</div>';
+        if ($assignment->timedue) {
+            $str .= '<div class="info">'.$strduedate.': '.userdate($assignment->timedue).'</div>';
+        } else {
+            $str .= '<div class="info">'.$strduedateno.'</div>';
+        }
 
         if (isteacher($assignment->course)) {
             $submissions = count_records_sql("SELECT COUNT(*)