From: skodak Date: Thu, 4 Oct 2007 09:00:29 +0000 (+0000) Subject: MDL-11582 switch category item only if it is really there - forgot to add courseitem... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4a3dfd9af1db962d82b292300ea6defab8f31788;p=moodle.git MDL-11582 switch category item only if it is really there - forgot to add courseitem into condition --- diff --git a/grade/lib.php b/grade/lib.php index 9a5ad49dc8..a43c462ab9 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -942,7 +942,7 @@ class grade_tree { return; } $first_item = reset($element['children']); - if ($first_item['type'] == 'categoryitem') { + if ($first_item['type'] == 'categoryitem' or $first_item['type'] == 'courseitem') { // the category item might have been already removed $order = key($element['children']); unset($element['children'][$order]);