MDL-34376 mod_assign Omit assigns with no due date from print_overview.
authorEric Merrill <merrill@oakland.edu>
Wed, 8 Aug 2012 14:01:28 +0000 (10:01 -0400)
committerEric Merrill <merrill@oakland.edu>
Wed, 8 Aug 2012 14:01:28 +0000 (10:01 -0400)
Modify assign_print_overview to omit assigns that have no due date set, in line with behaviour
in 2.2 and other tools.

mod/assign/lib.php

index a6cdba7..5ca8423 100644 (file)
@@ -212,8 +212,8 @@ function assign_print_overview($courses, &$htmlarray) {
     // Do assignment_base::isopen() here without loading the whole thing for speed
     foreach ($assignments as $key => $assignment) {
         $time = time();
-        $isopen = $assignment->allowsubmissionsfromdate <= $time;
         if ($assignment->duedate) {
+            $isopen = $assignment->allowsubmissionsfromdate <= $time;
             if ($assignment->preventlatesubmissions) {
                 $isopen = ($isopen && $time <= $assignment->duedate);
             }