]> git.mjollnir.org Git - moodle.git/commitdiff
merged mymoodle fix from stable
authormoodler <moodler>
Mon, 29 May 2006 09:21:36 +0000 (09:21 +0000)
committermoodler <moodler>
Mon, 29 May 2006 09:21:36 +0000 (09:21 +0000)
mod/assignment/lib.php

index 4a638125f5bcc9c49283042d2fe6b80cabce4be5..3a1d543152d327de113c59b175cb8e964c55b1e5 100644 (file)
@@ -2309,12 +2309,14 @@ function assignment_print_overview($courses, &$htmlarray) {
     // Do assignment_base::isopen() here without loading the whole thing for speed
     foreach ($assignments as $key => $assignment) {
         $time = time();
-        if ($assignment->preventlate && $assignment->timedue) {
-            $isopen = ($assignment->timeavailable <= $time && $time <= $assignment->timedue);
-        } else {
-            $isopen = ($assignment->timeavailable <= $time);
+        if ($assignment->timedue) {
+            if ($assignment->preventlate) {
+                $isopen = ($assignment->timeavailable <= $time && $time <= $assignment->timedue);
+            } else {
+                $isopen = ($assignment->timeavailable <= $time);
+            }
         }
-        if (!$isopen) {
+        if (empty($isopen) || empty($assignment->timedue)) {
             unset($assignments[$key]);
         }
     }