MDL-74764 core_course: Activity is not in alphabetical order.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user