]> git.mjollnir.org Git - moodle.git/commitdiff
Flatfile enrolment: MDL-11418 SQL error. Thanks to Patrick Pollet.
authortjhunt <tjhunt>
Mon, 15 Dec 2008 02:53:39 +0000 (02:53 +0000)
committertjhunt <tjhunt>
Mon, 15 Dec 2008 02:53:39 +0000 (02:53 +0000)
I don't know exactly how this works, but it looks like a good fix to me, so committing.

enrol/flatfile/enrol.php

index e8a86ee24caaafdd68ac7f6a0131fa44e4973bcf..e68230d50d8f022a1685afff0e9885880c93a9d8 100644 (file)
@@ -197,7 +197,7 @@ function get_access_icons($course) {
    
                         if ($fields[1] == "student") {
 
-                            if ($teachers = get_users_by_capability($context, 'moodle/course:update', 'u.*,ra.hidden', 'sortorder ASC')) {
+                            if ($teachers = get_users_by_capability($context, 'moodle/course:update', 'u.*,ra.hidden', 'ra.sortorder ASC')) {
                                 foreach ($teachers as $u) {
                                     if (!$u->hidden || has_capability('moodle/role:viewhiddenassigns', $context)) {
                                         $teacher = $u;