MDL-54996 Calendar: Fix dates for future multi-day events

Thanks to Martin Cunliffe for providing the fix
This commit is contained in:
Stephen Bourget
2016-12-17 10:54:32 -05:00
parent 84ad325c69
commit ae427d9bde
+3 -2
View File
@@ -1741,10 +1741,11 @@ function calendar_format_event_time($event, $now, $linkparams = null, $usecommon
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $endtime);
$eventtime = $timestart . ' <strong>&raquo;</strong> ' . html_writer::link($url, $dayend) . $timeend;
} else {
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $endtime);
// The event is in the future, print start and end links.
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $starttime);
$eventtime = html_writer::link($url, $daystart) . $timestart . ' <strong>&raquo;</strong> ';
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $starttime);
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $endtime);
$eventtime .= html_writer::link($url, $dayend) . $timeend;
}
}