MDL-35839 fix invalid enrol instance delete cleanup
This commit is contained in:
+2
-2
@@ -1627,8 +1627,8 @@ abstract class enrol_plugin {
|
||||
$participants->close();
|
||||
|
||||
// now clean up all remainders that were not removed correctly
|
||||
$DB->delete_records('groups_members', array('itemid'=>$instance->id, 'component'=>$name));
|
||||
$DB->delete_records('role_assignments', array('itemid'=>$instance->id, 'component'=>$name));
|
||||
$DB->delete_records('groups_members', array('itemid'=>$instance->id, 'component'=>'enrol_'.$name));
|
||||
$DB->delete_records('role_assignments', array('itemid'=>$instance->id, 'component'=>'enrol_'.$name));
|
||||
$DB->delete_records('user_enrolments', array('enrolid'=>$instance->id));
|
||||
|
||||
// finally drop the enrol row
|
||||
|
||||
Reference in New Issue
Block a user