MDL-10084 propogate course id through calendar pages to ensure consistent display for site front page, my moodle and courses

This commit is contained in:
dwoolhead 2007-06-21 15:58:00 +00:00
parent 82f6168608
commit 173a5dfa71

View File

@ -22,7 +22,7 @@ calendar_session_vars();
$pagetitle = get_string('export', 'calendar');
$now = usergetdate(time());
$nav = calendar_get_link_tag(get_string('calendar', 'calendar'), CALENDAR_URL.'view.php?view=upcoming&', $now['mday'], $now['mon'], $now['year']).' -> '.$pagetitle;
$nav = calendar_get_link_tag(get_string('calendar', 'calendar'), CALENDAR_URL.'view.php?view=upcoming&course='.$course.'&', $now['mday'], $now['mon'], $now['year']).' -> '.$pagetitle;
if(!checkdate($mon, $day, $yr)) {
$day = intval($now['mday']);
@ -94,13 +94,13 @@ list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
$getvars = 'cal_d='.$day.'&cal_m='.$mon.'&cal_y='.$yr; // For filtering
echo '<div class="minicalendarblock">';
echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
echo calendar_top_controls('display', array('id' => $course, 'm' => $prevmon, 'y' => $prevyr));
echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);
echo '</div><div class="minicalendarblock">';
echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr));
echo calendar_top_controls('display', array('id' => $course, 'm' => $mon, 'y' => $yr));
echo calendar_get_mini($courses, $groups, $users, $mon, $yr);
echo '</div><div class="minicalendarblock">';
echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr));
echo calendar_top_controls('display', array('id' => $course, 'm' => $nextmon, 'y' => $nextyr));
echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr);
echo '</div>';