Remove additional check when dealing with hidden courses in LDAP enrolment.

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.
This commit is contained in:
iarenaza 2007-09-15 21:38:13 +00:00
parent 8fafbc0ea3
commit 59b567692d

View File

@ -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;