]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed unenrol_student MDL-8591
authormoodler <moodler>
Thu, 1 Mar 2007 08:06:05 +0000 (08:06 +0000)
committermoodler <moodler>
Thu, 1 Mar 2007 08:06:05 +0000 (08:06 +0000)
lib/deprecatedlib.php

index 771ed73559c03344034e90f052205d814e9f7920..af5190353ed8579f83c879d40c1ba5bb7fd25ddb 100644 (file)
@@ -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