]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for bug 1395:
authordefacer <defacer>
Mon, 17 May 2004 07:31:54 +0000 (07:31 +0000)
committerdefacer <defacer>
Mon, 17 May 2004 07:31:54 +0000 (07:31 +0000)
view.php now does require_login(). Also some minor refinements.

calendar/view.php

index 52e16ef7a1e183a0798a049c98948295675910cf..33704907e29b38a0adcd1b7c2279addf754e3150 100644 (file)
@@ -44,7 +44,9 @@
     require_once('lib.php');
     require_once('../course/lib.php');
 
-    optional_variable($_GET['view'], "upcoming");
+    require_login();
+
+    optional_variable($_GET['view'], 'upcoming');
     optional_variable($_GET['cal_d']);
     optional_variable($_GET['cal_m']);
     optional_variable($_GET['cal_y']);
     }
 
     //add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");
-
-    $side = 175;
-
-    $prefmenu = true; // By default, display it
-    calendar_session_vars();
     $now = usergetdate(time());
     $pagetitle = '';
 
 
     // Layout the whole page as three big columns.
     echo '<table border="0" cellpadding="3" cellspacing="0" width="100%">';
-    echo '<tr valign="top">';
+    echo '<tr style="vertical-align: top;">';
 
     // START: Main column
 
-    echo '<td width="100%" valign="top">';
+    echo '<td style="vertical-align: top; width: 100%;">';
 
     if($_GET['view'] == 'month') {
         if(is_numeric($SESSION->cal_show_course)) {
     // END: Main column
 
     // START: Last column (3-month display)
-    echo '<td valign="top" width="'.$side.'">';
+    echo '<td style="vertical-align: top; width: 180px;">';
     print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain');
     list($prevmon, $prevyr) = calendar_sub_month($mon, $yr);
     list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
     echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr);
     echo '</p>';
     print_side_block_end();
-    print_spacer(1, $side);
+    print_spacer(1, 180);
     echo '</td>';
 
     echo '</tr></table>';