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:08:05 +08:00
parent 17fb1d84a2
commit 919b5c95e6
No known key found for this signature in database
GPG Key ID: 305B7F70214D810C

View File

@ -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