MDL-70459 enrol_fee: Sort the list of currencies when displaying
authorShamim Rezaie <shamim@moodle.com>
Wed, 16 Dec 2020 11:26:44 +0000 (22:26 +1100)
committerShamim Rezaie <shamim@moodle.com>
Wed, 16 Dec 2020 11:26:44 +0000 (22:26 +1100)
enrol/fee/classes/plugin.php

index 78cbbcd..549247c 100644 (file)
@@ -45,6 +45,10 @@ class enrol_fee_plugin extends enrol_plugin {
             $currencies[$c] = new lang_string($c, 'core_currencies');
         }
 
+        uasort($currencies, function($a, $b) {
+            return strcmp($a, $b);
+        });
+
         return $currencies;
     }