Skip to content

Commit

Permalink
MDL-70355 calendar: Filter popuptext for calendar entries.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Dec 17, 2020
1 parent 4ec279a commit 9406891
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion calendar/classes/external/calendar_event_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ protected function get_other_values(renderer_base $output) {
$values['islastday'] = false;
$today = $this->related['type']->timestamp_to_date_array($this->related['today']);

$values['popupname'] = $this->event->get_name();
if ($hascourse) {
$values['popupname'] = external_format_string($this->event->get_name(), \context_course::instance($course->id), true);
} else {
$values['popupname'] = external_format_string($this->event->get_name(), \context_system::instance(), true);
}

$times = $this->event->get_times();
if ($duration = $times->get_duration()) {
Expand Down

0 comments on commit 9406891

Please sign in to comment.