Skip to content

Commit 0784dc0

Browse files
committed
Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into 1.9.x
2 parents 9b9de17 + 73115c2 commit 0784dc0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main/calendar/agenda_list.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
$this_section = SECTION_COURSES;
3737
} else {
3838
// Agenda is out of the course tool (e.g personal agenda)
39+
40+
// Little hack to sort the events by start date in personal agenda (Agenda events List view - See #8014)
41+
usort($events, function($a, $b) {
42+
$t1 = strtotime($a['start']);
43+
$t2 = strtotime($b['start']);
44+
return $t1 - $t2;
45+
});
46+
3947
$url = false;
4048
foreach ($events as &$event) {
4149
$event['url'] = api_get_self() . '?cid=' . $event['course_id'] .

0 commit comments

Comments
 (0)