mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-41257 calendar: Day and Upcoming-Events view not processed through text_filters() function
This fix adds text filtering to the Calendar Day view and Upcoming Events view, specifically the event name and event description. Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
This commit is contained in:
parent
5e6da548d7
commit
9984132c23
1 changed files with 3 additions and 2 deletions
|
@ -309,6 +309,7 @@ class core_calendar_renderer extends plugin_renderer_base {
|
|||
global $CFG;
|
||||
|
||||
$event = calendar_add_event_metadata($event);
|
||||
$context = $event->context;
|
||||
|
||||
$anchor = html_writer::tag('a', '', array('name'=>'event_'.$event->id));
|
||||
|
||||
|
@ -331,7 +332,7 @@ class core_calendar_renderer extends plugin_renderer_base {
|
|||
if (!empty($event->referer)) {
|
||||
$table->data[0]->cells[1]->text .= html_writer::tag('div', $event->referer, array('class'=>'referer'));
|
||||
} else {
|
||||
$table->data[0]->cells[1]->text .= html_writer::tag('div', $event->name, array('class'=>'name'));
|
||||
$table->data[0]->cells[1]->text .= html_writer::tag('div', format_string($event->name, false, array('context' => $context)), array('class'=>'name'));
|
||||
}
|
||||
if (!empty($event->courselink)) {
|
||||
$table->data[0]->cells[1]->text .= html_writer::tag('div', $event->courselink, array('class'=>'course'));
|
||||
|
@ -355,7 +356,7 @@ class core_calendar_renderer extends plugin_renderer_base {
|
|||
$table->data[1]->cells[0] = new html_table_cell(' ');
|
||||
$table->data[1]->cells[0]->attributes['class'] .= 'side';
|
||||
|
||||
$table->data[1]->cells[1] = new html_table_cell($event->description);
|
||||
$table->data[1]->cells[1] = new html_table_cell(format_text($event->description, $event->format, array('context' => $context)));
|
||||
$table->data[1]->cells[1]->attributes['class'] .= ' description';
|
||||
if (isset($event->cssclass)) {
|
||||
$table->data[1]->cells[1]->attributes['class'] .= ' '.$event->cssclass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue