From: moodler Date: Mon, 25 Sep 2006 06:15:31 +0000 (+0000) Subject: Fix sort on get_teacher to get the most senior teacher X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f94ced101019daae86d6e752c0d18beb7efdfb83;p=moodle.git Fix sort on get_teacher to get the most senior teacher --- diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 5518d50d50..ad42efeb3c 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -492,7 +492,7 @@ function get_teacher($courseid) { $context = get_context_instance(CONTEXT_COURSE, $courseid); - if ($users = get_users_by_capability($context, 'moodle/course:update', 'u.*,ra.hidden', 'sortorder ASC', + if ($users = get_users_by_capability($context, 'moodle/course:update', 'u.*,ra.hidden', 'r.sortorder ASC', '', '', '', '', false)) { foreach ($users as $user) { if (!$user->hidden || has_capability('moodle/role:viewhiddenassigns', $context)) {