Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-35839 fix invalid enrol instance delete cleanup

  • Loading branch information...
commit 6f0f18a4d46dbcb6ad302b5fb30df2738a8391fa 1 parent 562dbe4
@skodak skodak authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/enrollib.php
2  lib/enrollib.php
@@ -1626,7 +1626,7 @@ public function delete_instance($instance) {
// now clean up all remainders that were not removed correctly
- $DB->delete_records('role_assignments', array('itemid'=>$instance->id, 'component'=>$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
Please sign in to comment.
Something went wrong with that request. Please try again.