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

This commit is contained in:
Dan Poltawski
2017-03-28 11:34:41 +01:00
+1 -3
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];
}