]> git.mjollnir.org Git - moodle.git/commitdiff
Remove additional check when dealing with hidden courses in LDAP enrolment.
authoriarenaza <iarenaza>
Sat, 15 Sep 2007 21:38:13 +0000 (21:38 +0000)
committeriarenaza <iarenaza>
Sat, 15 Sep 2007 21:38:13 +0000 (21:38 +0000)
The check is superfluous and uses an inexistant variable ($type) that
was removed when we switched to role based enrolment.

Fixes MDL-11098 MDL-10282 and MDL-8346.

enrol/ldap/enrol.php

index 8eea71c5375be6a8f79d4adf2eef24e361c529ea..d5795e3312e6f66e2ad6a69ce989d1e9da1717db 100755 (executable)
@@ -76,7 +76,7 @@ function setup_enrolments(&$user) {
                     error_log("[ENROL_LDAP] User $user->username enrolled to a nonexistant course $course_ext_id \n");
                 }
             } else { // the course object exists before we call...
-                if ($course_obj->visible==0 && $user->{$type}[$course_obj->id] == 'ldap') {
+                if ($course_obj->visible==0) {
                     // non-visible courses don't show up in the enrolled 
                     // array, so we should skip them -- 
                     continue;