mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
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:
parent
8fafbc0ea3
commit
59b567692d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user