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:
martinlanghoff 2005-09-07 06:39:30 +00:00
parent fd734f6165
commit e91902556f

View File

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