MDL-28348 fix meta sync when unassigning roles
authorPetr Skoda <commits@skodak.org>
Sun, 17 Jul 2011 18:35:15 +0000 (20:35 +0200)
committerPetr Skoda <commits@skodak.org>
Sun, 17 Jul 2011 18:35:15 +0000 (20:35 +0200)
enrol/meta/locallib.php

index 5fa467b..3b68e7f 100644 (file)
@@ -115,7 +115,7 @@ class enrol_meta_handler {
             }
 
             // unassing role, there is no other role assignment in parent course
             }
 
             // unassing role, there is no other role assignment in parent course
-            role_unassign($ra->roleid, $ra->userid, $ra->contextid, 'enrol_meta', $enrol->id);
+            role_unassign($ra->roleid, $ra->userid, $context->id, 'enrol_meta', $enrol->id);
         }
 
         return true;
         }
 
         return true;