]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12419, do not present course start date if start date is invalid
authortoyomoyo <toyomoyo>
Tue, 4 Dec 2007 01:04:03 +0000 (01:04 +0000)
committertoyomoyo <toyomoyo>
Tue, 4 Dec 2007 01:04:03 +0000 (01:04 +0000)
admin/roles/assign.php

index 6baf3b86022a50d09720a14158e11e927a7682b2..4c059a1dae637309e9558d21dc8a4e53ddf1b4b9 100755 (executable)
     $today = time();
     $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
 
-    $basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
+    // MDL-12420, preventing course start date showing up as an option at system context and front page roles.
+    if ($course->startdate != 0) {
+        $basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
+    }
     if ($course->enrollable != 2 || ($course->enrolstartdate == 0 || $course->enrolstartdate <= $today) && ($course->enrolenddate == 0 || $course->enrolenddate > $today)) {
         $basemenu[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
     }