MDL-58994 core_calendar: Coalesce event sort field

There are situations where we need to sort events on a field called
"timesort", but sometimes it is not set. So we can fall back to
"timestart" in this case.
This commit is contained in:
Cameron Ball
2017-05-19 15:11:32 +08:00
parent b87a580aa3
commit a4eaa35e23
@@ -164,7 +164,7 @@ class event_vault implements event_vault_interface {
$coursesfilter,
$where,
$params,
"e.timesort ASC, e.id ASC",
"COALESCE(e.timesort, e.timestart) ASC, e.id ASC",
$offset,
$limitnum,
$ignorehidden