mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-11582 switch category item only if it is really there - forgot to add courseitem into condition
This commit is contained in:
parent
6f0078e5a0
commit
4a3dfd9af1
@ -942,7 +942,7 @@ class grade_tree {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$first_item = reset($element['children']);
|
$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
|
// the category item might have been already removed
|
||||||
$order = key($element['children']);
|
$order = key($element['children']);
|
||||||
unset($element['children'][$order]);
|
unset($element['children'][$order]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user