From c4381ef5d25cbe46537d8d51a8761782793f2bc5 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 20 Sep 2006 02:19:08 +0000 Subject: [PATCH] FIxed a bug where $context had not been defined in enrol_into_course --- lib/accesslib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/accesslib.php b/lib/accesslib.php index c9495b74c8..dfb7374a41 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -1534,6 +1534,9 @@ function enrol_into_course($course, $user, $enrol) { } if ($role = get_default_course_role($course)) { + + $context = get_context_instance(CONTEXT_COURSE, $course->id); + if (role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, $enrol)) { return false; } -- 2.39.5