Commit 6a477a13 authored by Hugh Davenport's avatar Hugh Davenport

Sort the available auth types by usable state first

Bug #804149

Change-Id: Id9a552059b81fe3ca40ddd2bfdd75091c6d8e68e
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent 464c9b91
......@@ -695,7 +695,7 @@ function auth_get_available_auth_types($institution=null) {
$row->description = get_string('notusable', 'auth.' . $row->name);
}
}
usort($result, create_function('$a, $b', 'return strnatcasecmp($a->title, $b->title);'));
usort($result, create_function('$a, $b', 'if ($a->is_usable != $b->is_usable) return $b->is_usable; return strnatcasecmp($a->title, $b->title);'));
return $result;
}
......
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