mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merged from MOODLE_15_STABLE - enrol/db - bug 3912 - Re-add the enrolment to $user->student[] - should fix things for good.
This commit is contained in:
parent
fd734f6165
commit
e91902556f
@ -74,6 +74,8 @@ function get_student_courses(&$user) {
|
||||
if (get_record_select('user_students', 'userid', $user->id, 'courseid', $courseid, 'enrol', 'database')) {
|
||||
unenrol_student($user->id, $courseid); /// Unenrol the student
|
||||
unset($user->student[$course->id]); /// Remove from old list
|
||||
} else {
|
||||
$newstudent[$courseid] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user