MDL-12419, do not present course start date if start date is invalid

This commit is contained in:
toyomoyo
2007-12-04 01:08:48 +00:00
parent 8f5a640165
commit 47769861ae
+1 -1
View File
@@ -96,7 +96,7 @@
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
// MDL-12420, preventing course start date showing up as an option at system context and front page roles.
if ($course->startdate != 0) {
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)) {