mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
fixed category sync cleanup
This commit is contained in:
parent
894843b465
commit
ac86edd01a
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue