From 2b6b37d4f960dee02d53b04eaf6e65468662c71e Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Fri, 13 Dec 2013 15:03:27 +0000 Subject: [PATCH] MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times --- enrol/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enrol/locallib.php b/enrol/locallib.php index 17466978879..6ad641f3b0d 100644 --- a/enrol/locallib.php +++ b/enrol/locallib.php @@ -1058,7 +1058,7 @@ class course_enrolment_manager { continue; } else if ($ue->timestart and $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) { $period = get_string('periodstart', 'enrol', userdate($ue->timestart)); $periodoutside = ($ue->timestart && $now < $ue->timestart);