MDL-79313 calendar: Remove unused navigation context data

This commit is contained in:
Jun Pataleta 2023-09-11 14:36:55 +08:00
parent b4c6ed3650
commit 48ddffbe88
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7
2 changed files with 4 additions and 16 deletions

View File

@ -148,9 +148,6 @@ class day_exporter extends exporter {
'nextperiod' => [
'type' => PARAM_INT,
],
'navigation' => [
'type' => PARAM_RAW,
],
'haslastdayofevent' => [
'type' => PARAM_BOOL,
'default' => false,
@ -183,7 +180,6 @@ class day_exporter extends exporter {
'neweventtimestamp' => $neweventstarttime->getTimestamp(),
'previousperiod' => $this->get_previous_day_timestamp($daytimestamp),
'nextperiod' => $this->get_next_day_timestamp($daytimestamp),
'navigation' => $this->get_navigation(),
'viewdaylink' => $this->url->out(false),
];
@ -264,18 +260,6 @@ class day_exporter extends exporter {
return $this->related['type']->get_next_day($daytimestamp);
}
/**
* Get the calendar navigation controls.
*
* @return string The html code to the calendar top navigation.
*/
protected function get_navigation() {
return calendar_top_controls('day', [
'id' => $this->calendar->courseid,
'time' => $this->calendar->time,
]);
}
/**
* Get the title for view link.
*

View File

@ -1,6 +1,10 @@
This files describes API changes in /calendar/* ,
information provided here is intended especially for developers.
=== 4.3 ===
* The `navigation` property has been removed from `\core_calendar\external\day_exporter` as it is not being used by any of the
calendar templates.
=== 4.1 ===
* New method `calendar_format_event_location` which will format the location property of an event, converting any
links into suitable markup