MDL-35839 fix invalid enrol instance delete cleanup

This commit is contained in:
Petr Škoda
2012-10-06 19:22:07 +02:00
parent ccd90e765e
commit a1cedcc987
+2 -2
View File
@@ -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