diff --git a/lib/adminlib.php b/lib/adminlib.php index cbf960b4b5e76..659b55a237299 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -3233,7 +3233,7 @@ function load_choices() { if (is_array($this->choices)) { return true; } - if ($roles = $DB->get_records('role')) { + if ($roles = $DB->get_records('role',null,'sortorder')) { $this->choices = array(); foreach($roles as $role) { $this->choices[$role->id] = format_string($role->name);