fixing a redundant order by clause

This commit is contained in:
toyomoyo
2006-09-29 05:46:02 +00:00
parent a0db31e7e5
commit ae8402fe38
+1 -1
View File
@@ -977,7 +977,7 @@ function get_main_teacher_lang($courseid) {
if (!empty($CFG->rolesactive)) {
$context = get_context_instance(CONTEXT_COURSE, $courseid);
$teachers = get_users_by_capability($context, 'moodle/legacy:editingteacher', 'u.id, u.lang', ' ORDER BY ra.id ASC ', 0, 1); // only need first one
$teachers = get_users_by_capability($context, 'moodle/legacy:editingteacher', 'u.id, u.lang', 'ra.id ASC', 0, 1); // only need first one
if (is_array($teachers)) {
$teacher = reset($teachers);
$mainteachercache[$courseid] = $teacher->lang;