' . $events[$i]->icon . '';
if (!empty($events[$i]->referer)) {
// That's an activity event, so let's provide the hyperlink.
$content .= $events[$i]->referer;
} else {
if (!empty($linkhref)) {
$href = calendar_get_link_href(new \moodle_url(CALENDAR_URL . $linkhref), 0, 0, 0,
$events[$i]->timestart);
$href->set_anchor('event_' . $events[$i]->id);
$content .= \html_writer::link($href, $events[$i]->name);
} else {
$content .= $events[$i]->name;
}
}
$events[$i]->time = str_replace('»', '
»', $events[$i]->time);
if ($showcourselink && !empty($events[$i]->courselink)) {
$content .= \html_writer::div($events[$i]->courselink, 'course');
}
$content .= '
' . $events[$i]->time . '
';
if ($i < $lines - 1) {
$content .= '