]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for bug 1320:
authordefacer <defacer>
Fri, 7 May 2004 10:15:10 +0000 (10:15 +0000)
committerdefacer <defacer>
Fri, 7 May 2004 10:15:10 +0000 (10:15 +0000)
Upcoming events were not displayed before calendar_session_vars() was called
at least once. The upcoming events block did not do that, because once upon a
time it was displayed below the month view, which was known to do it :)

Solution: calendar_session_vars() is now called directly from lib.php.

blocks/calendar_month/block_calendar_month.php
calendar/lib.php

index fb7484daf49a1fc962d5d635def7d7c64f875893..10b419da8cabc6f1bb56542619944c9a0121b75c 100644 (file)
@@ -23,8 +23,6 @@ class CourseBlock_calendar_month extends MoodleBlock {
         $this->content->text = '';
         $this->content->footer = '';
 
-        calendar_session_vars();
-
         if($this->course === NULL) {
             // Overrides: use no course at all
             $courseshown = false;
index 0339d4059ffeab87d7a1a81768a08aa69207b13d..651f0a76953b11ecdb98697b18ec80862b15d209 100644 (file)
@@ -53,6 +53,9 @@ define ('CALENDAR_URL', $CFG->wwwroot.'/calendar/');
 define ('CALENDAR_TF_24', '%H:%M');
 define ('CALENDAR_TF_12', '%I:%M %p');
 
+// Initialize the session variables here to be sure
+calendar_session_vars();
+
 function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_year = false) {
     global $CFG, $USER;