MDL-58394 filters: Fixed order not being respected.
authorDaniel Thee Roperto <danielroperto@catalyst-au.net>
Sun, 26 Mar 2017 23:20:15 +0000 (10:20 +1100)
committerDaniel Thee Roperto <danielroperto@catalyst-au.net>
Mon, 3 Apr 2017 04:47:44 +0000 (14:47 +1000)
lib/filterlib.php

index 688ec00..38eaf31 100644 (file)
@@ -1027,7 +1027,7 @@ function filter_preload_activities(course_modinfo $modinfo) {
 
     // Get all filter_active rows relating to all these contexts
     list ($sql, $params) = $DB->get_in_or_equal($allcontextids);
-    $filteractives = $DB->get_records_select('filter_active', "contextid $sql", $params);
+    $filteractives = $DB->get_records_select('filter_active', "contextid $sql", $params, 'sortorder');
 
     // Get all filter_config only for the cm contexts
     list ($sql, $params) = $DB->get_in_or_equal($cmcontextids);