Merge branch 'MDL-58393-33_filter-order' of https://github.com/roperto/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 17 Apr 2017 09:30:32 +0000 (10:30 +0100)
committerDan Poltawski <dan@moodle.com>
Mon, 17 Apr 2017 09:30:32 +0000 (10:30 +0100)
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);