From 2cc649ee22752ef2c9ea92d9b24ff67dd260c2c7 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Fri, 5 Oct 2007 03:52:17 +0000 Subject: [PATCH] merged fix for MDL-10353, calendar export not handing course variable correctly --- calendar/export.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/calendar/export.php b/calendar/export.php index 0edbaf3e107e..c97dd274c230 100644 --- a/calendar/export.php +++ b/calendar/export.php @@ -6,11 +6,16 @@ //require_once($CFG->libdir.'/bennu/bennu.inc.php'); $action = optional_param('action', '', PARAM_ALPHA); -$course = optional_param('course', 0); $day = optional_param('cal_d', 0, PARAM_INT); $mon = optional_param('cal_m', 0, PARAM_INT); $yr = optional_param('cal_y', 0, PARAM_INT); +if (isset($SESSION->cal_course_referer)) { + $course = $SESSION->cal_course_referer; +} else { + $course = optional_param('course', 0, PARAM_INT); +} + require_login(); if(!$site = get_site()) {