Skip to content

Commit

Permalink
fixed category sync cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 17, 2010
1 parent 894843b commit ac86edd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enrol/category/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ function enrol_category_sync_full() {
if (!$roles = get_roles_with_capability('enrol/category:synchronised', CAP_ALLOW, $syscontext)) {
// yay, nothing to do, so let's remove all leftovers
if ($instances = $DB->get_records('enrol', array('enrol'=>'category'))) {
$plugin->delete_instance($instance);
foreach ($instances as $instance) {
$plugin->delete_instance($instance);
}
}
}

Expand Down

0 comments on commit ac86edd

Please sign in to comment.