Merge branch 'MDL-69526-master' of git://github.com/lucaboesch/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 17 Nov 2020 06:52:58 +0000 (14:52 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 17 Nov 2020 06:52:58 +0000 (14:52 +0800)
blocks/myoverview/classes/output/main.php

index 93478ab..c290c98 100644 (file)
@@ -370,8 +370,9 @@ class main implements renderable, templatable {
         $select = "instanceid $csql AND fieldid = :fieldid";
         $params['fieldid'] = $fieldid;
         $distinctablevalue = $DB->sql_compare_text('value');
-        $values = $DB->get_records_select_menu('customfield_data', $select, $params, $DB->sql_order_by_text('value'),
+        $values = $DB->get_records_select_menu('customfield_data', $select, $params, '',
             "DISTINCT $distinctablevalue, $distinctablevalue AS value2");
+        \core_collator::asort($values, \core_collator::SORT_NATURAL);
         $values = array_filter($values);
         if (!$values) {
             return [];