MDL-38147 fixed small bug on changed categories cache

This commit is contained in:
Marina Glancy 2013-03-26 14:09:00 +11:00
parent 93c544bdb0
commit 290af25434

View File

@ -592,10 +592,10 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
$all[$defcoursecat->id] = array();
$count++;
}
$all['countall'] = $count;
foreach ($all as $key => $children) {
$coursecattreecache->set($key, $children);
}
$coursecattreecache->set('countall', $count);
if (array_key_exists($id, $all)) {
return $all[$id];
}