Skip to content

Commit

Permalink
MDL-10353, calender redirection broken when editting and exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Oct 11, 2007
1 parent 8b9f26d commit b426fd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 7 additions & 8 deletions calendar/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
$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);
}
$courseid = optional_param('course', 0, PARAM_INT);

require_login();

Expand Down Expand Up @@ -43,8 +38,12 @@
}
$time = make_timestamp($yr, $mon, $day);

$SESSION->cal_courses_shown = calendar_get_default_courses(true);
calendar_set_referring_course(0);
if (empty($USER->id) or isguest()) {
$defaultcourses = calendar_get_default_courses();
calendar_set_filters($courses, $groups, $users, $defaultcourses, $defaultcourses);
} else {
calendar_set_filters($courses, $groups, $users);
}

if (empty($USER->id) or isguest()) {
$defaultcourses = calendar_get_default_courses();
Expand Down
1 change: 1 addition & 0 deletions calendar/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ function calendar_show_upcoming_events($courses, $groups, $users, $futuredays, $

echo '<div class="eventlist">';
foreach ($events as $event) {
$event->calendarcourseid = $courseid;
calendar_print_event($event);
}
echo '</div>';
Expand Down

0 comments on commit b426fd8

Please sign in to comment.