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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user