From 7c393e9c4fe1d8623be5c2b3ff48bfca1a8d9cc1 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 1 Mar 2007 08:06:05 +0000 Subject: [PATCH] Fixed unenrol_student MDL-8591 --- lib/deprecatedlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 771ed73559..af5190353e 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -361,7 +361,7 @@ function unenrol_student($userid, $courseid=0) { return false; } foreach($roles as $role) { - $status = role_unassign($role->id, $userid, 0, $context) and $status; + $status = role_unassign($role->id, $userid, 0, $context->id) and $status; } } else { // recursivelly unenroll student from all courses -- 2.39.5