This patch fix the subcription page only adding the course parameter
only when viewing the calendar on course context. It also passes the
url to the form instance, so we have the course parameter on the
form action attribute.
Consolidate the logic for the list of courses an admin will see in the calendar.
They will see all courses if calendar_admincanseeall is enabled.
They will see only courses they are enrolled in of calendar_admincanseeall is not enabled.
They will also see the current course, if they are admin and it is not already in the list.
This applies to the course selector and the create and update event forms.
The calendar link in the navigation block has also been changed to link to the current course calendar instead of the global
one.
This commit adds a set of templates for the calendar month block, and
the events filter. The same data exporters used in the main calendar
view are utilised and the same logic.
Some additional data was added to the exporters, and in the long term
this will be used in the main monthly view so I did not feel it was
prudent to strip it out into a different view of the model.
AMOS BEGIN
MOV [monthnext,access],[monthnext,calendar]
AMOS END
* Add the course's short name for a course event in order to let the
user know immediately which course an event belongs to. Particularly
helpful for activity events.
* Move and rename \core_calendar\local\api::get_legacy_events() to
calendar_get_legacy_events() in calendar/lib.php.
* Fix the parameter-normalising callback function in
calendar_get_legacy_events() so that it correctly handles false values
by returning an empty array instead of it returning a non-empty array
that contains an empty element.
This function was moved to local_api::get_legacy_events.
Also removed the calendar/classes/api.php file since it no longer contained any
functionality and added unit tests for local_api::get_legacy_events (a copy of
the unit tests for calendar_get_events).
Part of MDL-55611 epic.
The events list is now a list of cards with headers.
Spacing and layout is now done with bootstrap utility classes.
The existing classes were kept - and the styles for bootstrapbase are not changed much.
Also calendar colours can be overridden from a preset.