From 988ad08450a880331da7dfe6f1825294370bbcc6 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 22 Sep 2006 01:21:01 +0000 Subject: [PATCH] Use role sortorder when getting role lists --- lib/accesslib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 2d1c6a254c..bc2e5930a4 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -2427,7 +2427,7 @@ function get_assignable_roles ($context) { $options = array(); - if ($roles = get_records('role')) { + if ($roles = get_records('role', '', '', 'sortorder ASC')) { foreach ($roles as $role) { if (user_can_assign($context, $role->id)) { $options[$role->id] = $role->name; @@ -2446,7 +2446,7 @@ function get_overridable_roles ($context) { $options = array(); - if ($roles = get_records('role')) { + if ($roles = get_records('role', '', '', 'sortorder ASC')) { foreach ($roles as $role) { if (user_can_override($context, $role->id)) { $options[$role->id] = $role->name; -- 2.39.5