mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Fix for bug #2004 (Bug of the Year! :D):
Events in each day are now displayed ordered by starting time, and not by eventid as before. Thanks to Gustav for pointing this out!
This commit is contained in:
parent
21fca825f2
commit
a94329a8ed
2 changed files with 3 additions and 4 deletions
|
@ -112,7 +112,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
|||
$events = array();
|
||||
}
|
||||
else {
|
||||
$events = get_records_select('event', $whereclause);
|
||||
$events = get_records_select('event', $whereclause, 'timestart');
|
||||
}
|
||||
|
||||
// This is either a genius idea or an idiot idea: in order to not complicate things, we use this rule: if, after
|
||||
|
@ -297,8 +297,7 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
|
|||
if ($whereclause === false) {
|
||||
$events = false;
|
||||
} else {
|
||||
$whereclause .= ' ORDER BY timestart'; // We want them this way
|
||||
$events = get_records_select('event', $whereclause);
|
||||
$events = get_records_select('event', $whereclause, 'timestart');
|
||||
}
|
||||
|
||||
// This is either a genius idea or an idiot idea: in order to not complicate things, we use this rule: if, after
|
||||
|
|
|
@ -312,7 +312,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
|
|||
$events = array();
|
||||
}
|
||||
else {
|
||||
$events = get_records_select('event', $whereclause);
|
||||
$events = get_records_select('event', $whereclause, 'timestart');
|
||||
}
|
||||
|
||||
// Extract information: events vs. time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue