Permalink
Browse files

Merge branch 'MDL-56688-master' of https://github.com/nwp90/moodle

  • Loading branch information...
dmonllao committed Feb 12, 2018
2 parents f40d707 + 2843746 commit 755310cbebb65618df2c862a84ca63398e01b3a5
Showing with 6 additions and 1 deletion.
  1. +6 −1 grade/lib.php
@@ -2127,7 +2127,12 @@ public function flatten(&$element, $category_grade_last, $nooutcomes) {
}
unset($element['children']);
if ($category_grade_last and count($children) > 1) {
if ($category_grade_last and count($children) > 1 and
(
$children[0]['type'] === 'courseitem' or
$children[0]['type'] === 'categoryitem'
)
) {
$cat_item = array_shift($children);
array_push($children, $cat_item);
}

0 comments on commit 755310c

Please sign in to comment.