diff --git a/blocks/calendar_month/block_calendar_month.php b/blocks/calendar_month/block_calendar_month.php index cc3d6f69f61..18a57d72e13 100644 --- a/blocks/calendar_month/block_calendar_month.php +++ b/blocks/calendar_month/block_calendar_month.php @@ -70,29 +70,26 @@ class block_calendar_month extends block_base { if ($issite) { // Being displayed at site level. This will cause the filter to fall back to auto-detecting // the list of courses it will be grabbing events from. - $filtercourse = calendar_get_default_courses(); + $course = get_site(); + $courses = calendar_get_default_courses(); } else { // Forcibly filter events to include only those from the particular course we are in. - $filtercourse = array($courseid => $this->page->course); + $course = $this->page->course; + $courses = [$course->id => $course]; } - list($courses, $group, $user) = calendar_set_filters($filtercourse); - if ($issite) { - // For the front page. - $this->content->text .= calendar_get_mini($courses, $group, $user, false, false, - 'frontpage', $courseid, $time); - // No filters for now. - } else { - // For any other course. - $this->content->text .= calendar_get_mini($courses, $group, $user, false, false, - 'course', $courseid, $time); - $this->content->text .= '
| + {{shortname}} + | + {{/ daynames }} +||
|---|---|---|
| + {{/prepadding}} + {{#days}} + | {{!
+ }}{{#popovertitle}}
+ {{< core_calendar/minicalendar_day_link }}
+ {{$day}}{{mday}}{{/day}}
+ {{$url}}{{viewdaylink}}{{/url}}
+ {{$title}}{{popovertitle}}{{/title}}
+ {{$nocontent}}{{#str}}eventnone, calendar{{/str}}{{/nocontent}}
+ {{$content}}
+ {{#events}}
+
+ {{#modulename}}
+ {{#pix}} icon, {{modulename}} {{/pix}}
+ {{/modulename}}
+ {{^modulename}}
+ {{#pix}} i/{{eventtype}}event, core {{/pix}}
+ {{/modulename}}
+ {{{popupname}}}
+
+ {{/events}}
+ {{/content}}
+ {{/ core_calendar/minicalendar_day_link }}
+ {{/popovertitle}}{{!
+ }}{{^popovertitle}}
+ {{mday}}
+ {{/popovertitle}}{{!
+ }} |
+ {{/days}}
+ {{#postpadding}}
+ + {{/postpadding}} + |