MDL-18927 fixed performance regression

This commit is contained in:
skodak 2009-04-22 19:40:21 +00:00
parent 842feb0612
commit 121d8006e4
2 changed files with 5 additions and 5 deletions

View file

@ -832,14 +832,14 @@ class grade_category extends grade_object {
// Stop recursing upwards if this category aggregates subcats or has no parent
if (!$first && !$this->aggregatesubcats) {
if ($parent_category = $this->get_parent_category()) {
if ($parent_category = $this->load_parent_category()) {
return $parent_category->get_coefstring(false);
} else {
return null;
}
} elseif ($first) {
if (!$this->aggregatesubcats) {
if ($parent_category = $this->get_parent_category()) {
if ($parent_category = $this->load_parent_category()) {
$overriding_coefstring = $parent_category->get_coefstring(false);
}
}