FIxed a bug where $context had not been defined in enrol_into_course

This commit is contained in:
moodler
2006-09-20 02:19:08 +00:00
parent b0270f84eb
commit c4381ef5d2
+3
View File
@@ -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;
}