mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
Merge branch 'wip-MDL-46280-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
080fdf0533
1 changed files with 3 additions and 2 deletions
|
@ -74,11 +74,12 @@ class filter_activitynames extends moodle_text_filter {
|
|||
'name' => $cm->name,
|
||||
'url' => $cm->url,
|
||||
'id' => $cm->id,
|
||||
'namelen' => strlen($cm->name),
|
||||
'namelen' => -strlen($cm->name), // Negative value for reverse sorting.
|
||||
);
|
||||
}
|
||||
}
|
||||
core_collator::asort_objects_by_property($sortedactivities, 'namelen', SORT_NUMERIC);
|
||||
// Sort activities by the length of the activity name in reverse order.
|
||||
core_collator::asort_objects_by_property($sortedactivities, 'namelen', core_collator::SORT_NUMERIC);
|
||||
|
||||
foreach ($sortedactivities as $cm) {
|
||||
$title = s(trim(strip_tags($cm->name)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue