blocks/calendar_month MDL-23657 - don't assume id param is courseid
authorDan Poltawski <dan.poltawski@luns.net.uk>
Mon, 3 Jan 2011 23:19:58 +0000 (23:19 +0000)
committerDan Poltawski <dan.poltawski@luns.net.uk>
Mon, 3 Jan 2011 23:21:44 +0000 (23:21 +0000)
This was casuing context creation on invalid courses..

There remains a problem with previous/next buttons on non course pages.

blocks/calendar_month/block_calendar_month.php

index 67488c4..9fa7ecb 100644 (file)
@@ -40,8 +40,6 @@ class block_calendar_month extends block_base {
             calendar_set_referring_course(0);
 
         } else {
-            //MDL-14693: fix calendar on resource page
-            $courseshown =  optional_param( 'id', $this->page->course->id, PARAM_INT );
             // Forcibly filter events to include only those from the particular course we are in.
             $filtercourse    = array($courseshown => $this->page->course);
             $groupeventsfrom = array($courseshown => 1);