The preferences screens weren't handling filter changes correctly.
case 'upcoming':
$getvars = '';
break;
+ case 'prefs':
+ $getvars = '&from=prefs&pref='.$_GET['edit'];
+ break;
case 'event':
global $day, $mon, $yr;
$getvars = '&from=event&id='.$_GET['id'];
list($prevmon, $prevyr) = calendar_sub_month($mon, $yr);
list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
- echo calendar_filter_controls($_GET['view']);
+ echo calendar_filter_controls('prefs');
echo '<p>';
echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);
}
switch($_GET['from']) {
+ case 'prefs':
+ redirect($CFG->wwwroot.'/calendar/preferences.php?edit='.$_GET['pref']);
+ break;
case 'month':
- redirect($CFG->wwwroot.'/calendar/view.php?view=month&cal_d='.$_GET['cal_d'].'&cal_m='.$_GET['cal_m'].'&cal_y='.$_GET['cal_y']);
+ redirect($CFG->wwwroot.'/calendar/view.php?view=month&cal_d='.$_GET['cal_d'].'&cal_m='.$_GET['cal_m'].'&cal_y='.$_GET['cal_y']);
break;
case 'upcoming':
redirect($CFG->wwwroot.'/calendar/view.php?view=upcoming&cal_d='.$_GET['cal_d'].'&cal_m='.$_GET['cal_m'].'&cal_y='.$_GET['cal_y']);