From: sam_marshall Date: Thu, 8 Nov 2007 15:16:16 +0000 (+0000) Subject: MDL-12069 Make calendar events key labels and link titles consistent (also tidy up... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fdbffa54f5a1567ac02c259750d1679dd741b62b;p=moodle.git MDL-12069 Make calendar events key labels and link titles consistent (also tidy up one bit of duplicated code) --- diff --git a/calendar/lib.php b/calendar/lib.php index 4f6439e387..171f4f3f94 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -774,18 +774,17 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses if($SESSION->cal_show_global) { $content .= ''.get_string('hide').''; $content .= ''.get_string('global', 'calendar').''."\n"; - } - else { + } else { $content .= ''.get_string('show').''; $content .= ''.get_string('global', 'calendar').''."\n"; } if($SESSION->cal_show_course) { - $content .= ''.get_string('hide').''; - $content .= ''.get_string('courseevents', 'calendar').''."\n"; - } - else { - $content .= ''.get_string('hide').''; - $content .= ''.get_string('courseevents', 'calendar').''."\n"; + $content .= ''.get_string('hide').''; + $content .= ''.get_string('course', 'calendar').''."\n"; + } else { + $content .= ''.get_string('hide').''; + $content .= ''.get_string('course', 'calendar').''."\n"; + } @@ -795,31 +794,22 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses if($groupevents) { // This course MIGHT have group events defined, so show the filter if($SESSION->cal_show_groups) { - $content .= ''.get_string('hide').''; - $content .= ''.get_string('groupevents', 'calendar').''."\n"; + $content .= ''.get_string('hide').''; + $content .= ''.get_string('group', 'calendar').''."\n"; } else { - $content .= ''.get_string('show').''; - $content .= ''.get_string('groupevents', 'calendar').''."\n"; + $content .= ''.get_string('show').''; + $content .= ''.get_string('group', 'calendar').''."\n"; } - if ($SESSION->cal_show_user) { - $content .= ''.get_string('hide').''; - $content .= ''.get_string('userevents', 'calendar').''."\n"; - } else { - $content .= ''.get_string('show').''; - $content .= ''.get_string('userevents', 'calendar').''."\n"; - } - } else { // This course CANNOT have group events, so lose the filter $content .= ' '."\n"; - - if($SESSION->cal_show_user) { - $content .= ''.get_string('hide').''; - $content .= ''.get_string('userevents', 'calendar').''."\n"; - } else { - $content .= ''.get_string('show').''; - $content .= ''.get_string('userevents', 'calendar').''."\n"; - } + } + if($SESSION->cal_show_user) { + $content .= ''.get_string('hide').''; + $content .= ''.get_string('user', 'calendar').''."\n"; + } else { + $content .= ''.get_string('show').''; + $content .= ''.get_string('user', 'calendar').''."\n"; } } $content .= "\n\n";