From a05e4f25a75bc614484568b83ef19bc9034b0c31 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Tue, 4 Apr 2017 14:32:35 +0800 Subject: [PATCH] MDL-58085 core_calendar: Display actions on calendar events page --- calendar/renderer.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/renderer.php b/calendar/renderer.php index 014262c15a5..378dc980fbd 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -285,14 +285,18 @@ class core_calendar_renderer extends plugin_renderer_base { } $output .= html_writer::tag('div', $source, array('class' => 'subscription')); } + if (!empty($event->courselink)) { + $output .= html_writer::tag('div', $event->courselink, array('class' => 'course')); + } if (!empty($event->time)) { $output .= html_writer::tag('span', $event->time, array('class' => 'date pull-xs-right m-r-1')); } else { $attrs = array('class' => 'date pull-xs-right m-r-1'); $output .= html_writer::tag('span', calendar_time_representation($event->timestart), $attrs); } - if (!empty($event->courselink)) { - $output .= html_writer::tag('div', $event->courselink, array('class' => 'course')); + + if (!empty($event->actionurl)) { + $output .= html_writer::tag('div', html_writer::link(new moodle_url($event->actionurl), $event->actionname)); } $output .= $this->output->box_end();