From: defacer Date: Mon, 24 May 2004 11:40:34 +0000 (+0000) Subject: The course link in the breadcrumbs now mirrors the active course filter. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3756ef3d4886118ccf91cf63381be94f11675cd6;p=moodle.git The course link in the breadcrumbs now mirrors the active course filter. --- diff --git a/calendar/set.php b/calendar/set.php index b4c710287c..0358712e99 100644 --- a/calendar/set.php +++ b/calendar/set.php @@ -56,13 +56,23 @@ $id = intval($_GET['id']); if($id == 0) { $SESSION->cal_courses_shown = array(); + calendar_set_referring_course(0); } else if($id == 1) { $SESSION->cal_courses_shown = calendar_get_default_courses(true); + calendar_set_referring_course(0); } else { // We don't check for membership anymore: if(isstudent($id, $USER->id) || isteacher($id, $USER->id)) { - $SESSION->cal_courses_shown = $id; + if(get_record('course', 'id', $id) === false) { + // There is no such course + $SESSION->cal_courses_shown = array(); + calendar_set_referring_course(0); + } + else { + calendar_set_referring_course($id); + $SESSION->cal_courses_shown = $id; + } } break; case 'showgroups':