From e91902556fc82ec6d59668d75cc794b67a4f65c3 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 7 Sep 2005 06:39:30 +0000 Subject: [PATCH] Merged from MOODLE_15_STABLE - enrol/db - bug 3912 - Re-add the enrolment to $user->student[] - should fix things for good. --- enrol/database/enrol.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/enrol/database/enrol.php b/enrol/database/enrol.php index 1a7df1913ba..c43f89adb22 100644 --- a/enrol/database/enrol.php +++ b/enrol/database/enrol.php @@ -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; } } }