From cd6469cb4d3ec8313ef480f7a4345ab47723dc13 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 24 May 2004 05:13:34 +0000 Subject: [PATCH] More aligned calendar controls on courses without groups --- calendar/lib.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/calendar/lib.php b/calendar/lib.php index 380233d2cd..f176cb9b24 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -626,24 +626,23 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL) { // This course MIGHT have group events defined, so show the filter if($SESSION->cal_show_groups) { $content .= ''.get_string('groupevents', 'calendar').''."\n"; - } - else { + } else { $content .= ''.get_string('groupevents', 'calendar').''."\n"; } - if($SESSION->cal_show_user) { + if ($SESSION->cal_show_user) { $content .= ''.get_string('userevents', 'calendar').''."\n"; - } - else { + } else { $content .= ''.get_string('userevents', 'calendar').''."\n"; } - } - else { + + } else { // This course CANNOT have group events, so lose the filter + $content .= ' '."\n"; + if($SESSION->cal_show_user) { - $content .= ''.get_string('userevents', 'calendar').''."\n"; - } - else { - $content .= ''.get_string('userevents', 'calendar').''."\n"; + $content .= ''.get_string('userevents', 'calendar').''."\n"; + } else { + $content .= ''.get_string('userevents', 'calendar').''."\n"; } } } -- 2.39.5