mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Fixed a whole bunch of warnings and minor bugs, which all shared a common cause:
The preferences screens weren't handling filter changes correctly.
This commit is contained in:
parent
562727705f
commit
053c98cff9
@ -567,6 +567,9 @@ function calendar_filter_controls($type) {
|
||||
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'];
|
||||
|
@ -258,7 +258,7 @@
|
||||
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);
|
||||
|
@ -89,8 +89,11 @@
|
||||
}
|
||||
|
||||
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']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user