Skip to content

Commit

Permalink
MDL-79313 calendar: Remove unused navigation context data
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 12, 2023
1 parent b4c6ed3 commit 48ddffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
16 changes: 0 additions & 16 deletions calendar/classes/external/day_exporter.php
Expand Up @@ -148,9 +148,6 @@ protected static function define_other_properties() {
'nextperiod' => [
'type' => PARAM_INT,
],
'navigation' => [
'type' => PARAM_RAW,
],
'haslastdayofevent' => [
'type' => PARAM_BOOL,
'default' => false,
Expand Down Expand Up @@ -183,7 +180,6 @@ protected function get_other_values(renderer_base $output) {
'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),
];

Expand Down Expand Up @@ -264,18 +260,6 @@ protected function get_next_day_timestamp($daytimestamp) {
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.
*
Expand Down
4 changes: 4 additions & 0 deletions calendar/upgrade.txt
@@ -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
Expand Down

0 comments on commit 48ddffb

Please sign in to comment.