Merge branch 'w52_MDL-30951_m23_catsync' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2012-01-04 00:39:51 +01:00
commit 792182713a

View File

@ -99,7 +99,9 @@ class enrol_category_handler {
// now this is going to be a bit slow, take all enrolments in child courses and verify each separately
$syscontext = get_context_instance(CONTEXT_SYSTEM);
$roles = get_roles_with_capability('enrol/category:synchronised', CAP_ALLOW, $syscontext);
if (!$roles = get_roles_with_capability('enrol/category:synchronised', CAP_ALLOW, $syscontext)) {
return true;
}
$plugin = enrol_get_plugin('category');