mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-55043 core_competency: Set proper sort order for each field
This commit is contained in:
parent
ac8d6cff54
commit
2648dddd2a
@ -312,8 +312,10 @@ class evidence extends persistent {
|
||||
|
||||
if (!empty($sort)) {
|
||||
$sortcolumns = explode(',', $sort);
|
||||
$sortcolumns = array_map('trim', $sortcolumns);
|
||||
$sort = ' ORDER BY e.' . implode(', e.', $sortcolumns) . ' ' . $order;
|
||||
array_walk($sortcolumns, function(&$sortcolumn, $key, $order) {
|
||||
$sortcolumn = trim($sortcolumn) . ' ' . $order;
|
||||
}, $order);
|
||||
$sort = ' ORDER BY e.' . implode(', e.', $sortcolumns);
|
||||
}
|
||||
|
||||
$sql = 'SELECT e.*
|
||||
|
Loading…
x
Reference in New Issue
Block a user