]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a whole bunch of warnings and minor bugs, which all shared a common cause:
authordefacer <defacer>
Tue, 20 Apr 2004 12:49:02 +0000 (12:49 +0000)
committerdefacer <defacer>
Tue, 20 Apr 2004 12:49:02 +0000 (12:49 +0000)
The preferences screens weren't handling filter changes correctly.

calendar/lib.php
calendar/preferences.php
calendar/set.php

index 9a6ce1ae1a1221d198e8af392b640c2805a37f74..0edc01ad7727d6796fc6607f6e817b5c05afe5db 100644 (file)
@@ -567,6 +567,9 @@ function calendar_filter_controls($type) {
         case 'upcoming':
             $getvars = '';
         break;
+        case 'prefs':
+            $getvars = '&amp;from=prefs&amp;pref='.$_GET['edit'];
+        break;
         case 'event':
             global $day, $mon, $yr;
             $getvars = '&amp;from=event&amp;id='.$_GET['id'];
index 5cc3d5f16e4afe111d679deec6ea37db5addb9ed..16b525d35db5d43decb2a1048bdb68a0e0829675 100644 (file)
     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);
index bf4af681528858b645d627434b0d81db9feadae9..709b40aa00d61fba422447418e86010c2df63e30 100644 (file)
        }
 
        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']);