Commit c8d5f911 authored by Ghada El-Zoghbi's avatar Ghada El-Zoghbi
Browse files

Members of a group should be listed based on their role (bug 1315956)



The 'admin first' sort order should also sort tutors next before general members.

Change-Id: If44a85b4081b46c91a8a98a3893b828a5e29f74d
Signed-off-by: default avatarGhada El-Zoghbi <ghada@catalyst-au.net>
parent ed705c24
......@@ -513,7 +513,8 @@ class PluginSearchInternal extends PluginSearch {
list($searchsql, $values) = self::name_search_sql($query_string);
$orderbyoptions = array(
'adminfirst' => 'gm.role = \'admin\' DESC, CASE WHEN NOT u.preferredname IS NULL AND u.preferredname <> \'\' THEN u.preferredname ELSE u.firstname END ASC,
'adminfirst' => 'gm.role = \'admin\' DESC, gm.role = \'tutor\' DESC,
CASE WHEN NOT u.preferredname IS NULL AND u.preferredname <> \'\' THEN u.preferredname ELSE u.firstname END ASC,
CASE WHEN NOT u.preferredname IS NULL AND u.preferredname <> \'\' THEN u.preferredname ELSE u.lastname END ASC, gm.ctime, u.id',
'nameatoz' => 'CASE WHEN NOT u.preferredname IS NULL AND u.preferredname <> \'\' THEN u.preferredname ELSE u.firstname END ASC,
CASE WHEN NOT u.preferredname IS NULL AND u.preferredname <> \'\' THEN u.preferredname ELSE u.lastname END ASC, gm.ctime, u.id',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment