fixed category sync cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user