Skip to content
Permalink
Browse files

Minor modification to the way the course event filter works

(same functionality but more robust now).
  • Loading branch information...
defacer
defacer committed May 20, 2004
1 parent 5acb92a commit 250712fd7fb3e49cc59c65f5cf0950b2001dca45
Showing with 4 additions and 4 deletions.
  1. +1 −1 calendar/lib.php
  2. +3 −3 calendar/set.php
@@ -239,7 +239,6 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
}
function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxevents) {
global $CFG;
$display = &New object;
@@ -1015,6 +1014,7 @@ function calendar_set_filters(&$courses, &$group, &$user, $defaultcourses = NULL
(is_array($SESSION->cal_show_course) && count($SESSION->cal_show_course)) ||
($SESSION->cal_show_course === true)
);
if($defaultcourses === NULL) {
$defaultcourses = array();
}
@@ -68,11 +68,11 @@
$SESSION->cal_show_groups = !$SESSION->cal_show_groups;
break;
case 'showcourses':
if($SESSION->cal_show_course) {
$SESSION->cal_show_course = false;
if(empty($SESSION->cal_show_course)) {
$SESSION->cal_show_course = calendar_get_default_courses();
}
else {
$SESSION->cal_show_course = true;
$SESSION->cal_show_course = false;
}
break;
case 'showglobal':

0 comments on commit 250712f

Please sign in to comment.
You can’t perform that action at this time.