]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-10353, calendar export not handing course variable correctly
authortoyomoyo <toyomoyo>
Fri, 5 Oct 2007 03:52:17 +0000 (03:52 +0000)
committertoyomoyo <toyomoyo>
Fri, 5 Oct 2007 03:52:17 +0000 (03:52 +0000)
calendar/export.php

index 0edbaf3e107ed6005bb1183e14c060496bc8c612..c97dd274c230661fc5db3df4e02b1277dee55b68 100644 (file)
@@ -6,11 +6,16 @@ require_once($CFG->dirroot.'/calendar/lib.php');
 //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()) {