mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-15182 Fix LDAP enrolment course auto-creation at user login
This commit is contained in:
parent
e41ba00a95
commit
913f427e3b
1 changed files with 1 additions and 3 deletions
|
@ -69,9 +69,7 @@ function setup_enrolments(&$user) {
|
||||||
if($CFG->enrol_ldap_autocreate){ // autocreate
|
if($CFG->enrol_ldap_autocreate){ // autocreate
|
||||||
error_log("[ENROL_LDAP] CREATE User $user->username enrolled to a nonexistant course $course_ext_id \n");
|
error_log("[ENROL_LDAP] CREATE User $user->username enrolled to a nonexistant course $course_ext_id \n");
|
||||||
$newcourseid = $this->create_course($enrol);
|
$newcourseid = $this->create_course($enrol);
|
||||||
$course_obj = get_record( 'course',
|
$course_obj = get_record( 'course', 'id', $newcourseid);
|
||||||
$this->enrol_localcoursefield,
|
|
||||||
$newcourseid);
|
|
||||||
} else {
|
} else {
|
||||||
error_log("[ENROL_LDAP] User $user->username enrolled to a nonexistant course $course_ext_id \n");
|
error_log("[ENROL_LDAP] User $user->username enrolled to a nonexistant course $course_ext_id \n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue