Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]

This file contains the renderers for the calendar within Moodle

Copyright: 2010 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 484 lines (19 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class


Class: core_calendar_renderer  - X-Ref

The primary renderer for the calendar.

start_layout()   X-Ref
Starts the standard layout for the page

return: string

complete_layout()   X-Ref
Creates the remainder of the layout

return: string

fake_block_threemonths(calendar_information $calendar)   X-Ref
Produces the content for the three months block (pretend block)

This includes the previous month, the current month, and the next month

return: string
param: calendar_information $calendar

add_pretend_calendar_block(block_contents $bc, $pos=BLOCK_POS_RIGHT)   X-Ref
Adds a pretent calendar block

param: block_contents $bc
param: mixed $pos BLOCK_POS_RIGHT | BLOCK_POS_LEFT

add_event_button($courseid, $unused1 = null, $unused2 = null, $unused3 = null, $unused4 = null)   X-Ref
Creates a button to add a new event.

return: string
param: int $courseid
param: int $unused1
param: int $unused2
param: int $unused3
param: int $unused4

event(calendar_event $event, $showactions=true)   X-Ref
Displays an event

return: string
param: calendar_event $event
param: bool $showactions

course_filter_selector(moodle_url $returnurl, $label = null, $courseid = null, int $calendarinstanceid = null)   X-Ref
Displays a course filter selector

return: string
param: moodle_url $returnurl The URL that the user should be taken too upon selecting a course.
param: string $label The label to use for the course select.
param: int $courseid The id of the course to be selected.
param: int|null $calendarinstanceid The instance ID of the calendar we're generating this course filter for.

render_subscriptions_header()   X-Ref
Render the subscriptions header

return: string

render_no_calendar_subscriptions()   X-Ref
Render the subscriptions blank state appearance

return: string

subscription_details($unused, $subscriptions, $unused2 = '')   X-Ref
Renders a table containing information about calendar subscriptions.

return: string
param: int $unused
param: array $subscriptions
param: string $unused2

render_subscription_update_interval(stdClass $subscription)   X-Ref
Render subscription update interval form.

return: string
param: stdClass $subscription

subscription_action_links()   X-Ref
Creates a form to perform actions on a given subscription.

return: string

event_filter()   X-Ref
Render the event filter region.

return: string

render_import_result(array $result)   X-Ref
Render the calendar import result.

return: string|null
param: array $result Import result