MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times

This commit is contained in:
Tony Butler 2013-12-13 15:03:27 +00:00
parent bbb291b7b7
commit 2b6b37d4f9

View File

@ -1058,7 +1058,7 @@ class course_enrolment_manager {
continue; continue;
} else if ($ue->timestart and $ue->timeend) { } else if ($ue->timestart and $ue->timeend) {
$period = get_string('periodstartend', 'enrol', array('start'=>userdate($ue->timestart), 'end'=>userdate($ue->timeend))); $period = get_string('periodstartend', 'enrol', array('start'=>userdate($ue->timestart), 'end'=>userdate($ue->timeend)));
$periodoutside = ($ue->timestart && $ue->timeend && $now < $ue->timestart && $now > $ue->timeend); $periodoutside = ($ue->timestart && $ue->timeend && ($now < $ue->timestart || $now > $ue->timeend));
} else if ($ue->timestart) { } else if ($ue->timestart) {
$period = get_string('periodstart', 'enrol', userdate($ue->timestart)); $period = get_string('periodstart', 'enrol', userdate($ue->timestart));
$periodoutside = ($ue->timestart && $now < $ue->timestart); $periodoutside = ($ue->timestart && $now < $ue->timestart);