Merge branch 'MDL-58160' of git://github.com/aolley/moodle

This commit is contained in:
Dan Poltawski 2017-03-28 11:34:33 +01:00
commit 702be5ee47

View file

@ -626,9 +626,7 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
}
// We must add countall to all in case it was the requested ID.
$all['countall'] = $count;
foreach ($all as $key => $children) {
$coursecattreecache->set($key, $children);
}
$coursecattreecache->set_many($all);
if (array_key_exists($id, $all)) {
return $all[$id];
}