mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-56688 grade: fix ordering of grade items in grade_seq::flatten
This commit is contained in:
parent
5bde2c2b62
commit
28437460d2
@ -2127,7 +2127,12 @@ class grade_seq extends grade_structure {
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user