Merge branch 'MDL-74764-master' of https://github.com/BruceGoodGuy/moodle

This commit is contained in:
Andrew Nicols 2022-06-09 10:56:35 +08:00 committed by Sara Arjona
commit 14655fdc74

View File

@ -224,11 +224,8 @@ class content_item_service {
$exported = $ciexporter->export($PAGE->get_renderer('core'));
// Sort by title for return.
usort($exported->content_items, function($a, $b) {
return strcmp($a->title, $b->title);
});
return $exported->content_items;
\core_collator::asort_objects_by_property($exported->content_items, 'title');
return array_values($exported->content_items);
}
/**
@ -300,11 +297,9 @@ class content_item_service {
$exported = $ciexporter->export($PAGE->get_renderer('course'));
// Sort by title for return.
usort($exported->content_items, function($a, $b) {
return strcmp($a->title, $b->title);
});
\core_collator::asort_objects_by_property($exported->content_items, 'title');
return $exported->content_items;
return array_values($exported->content_items);
}
/**