Skip to content
Browse files

MLD-28567 calendar: improved course filter process

  • Loading branch information...
1 parent 974c2cd commit ba1ce6e9ad6e342235cf6f1a12d5d7e48d3b1886 Sam Hemelryk committed Jan 30, 2014
Showing with 5 additions and 2 deletions.
  1. +5 −2 calendar/renderer.php
View
7 calendar/renderer.php
@@ -642,7 +642,8 @@ public function show_upcoming_events(calendar_information $calendar, $futuredays
/**
* Displays a course filter selector
*
- * @param array $getvars
+ * @param moodle_url $returnurl The URL that the user should be taken too upon selecting a course.
+ * @param string $label The label to use for the course select.
* @return string
*/
protected function course_filter_selector(moodle_url $returnurl, $label=null) {
@@ -672,7 +673,9 @@ protected function course_filter_selector(moodle_url $returnurl, $label=null) {
} else {
$selected = '';
}
- $select = new single_select(new moodle_url(CALENDAR_URL.'set.php', array('return' => base64_encode($returnurl->out(false)), 'var' => 'setcourse', 'sesskey'=>sesskey())), 'id', $courseoptions, $selected, null);
+ $courseurl = new moodle_url($returnurl);
+ $courseurl->remove_params('course');
+ $select = new single_select($courseurl, 'course', $courseoptions, $selected, null);
$select->class = 'cal_courses_flt';
if ($label !== null) {
$select->set_label($label);

0 comments on commit ba1ce6e

Please sign in to comment.
Something went wrong with that request. Please try again.