-
Bug
-
Resolution: Fixed
-
Critical
-
2.7
-
MOODLE_27_STABLE
-
MOODLE_27_STABLE
-
w17_
MDL-45214_m27_idsortlog -
The problem is that sorting events by time is not enough because PostgreSQL may then return events from one page in random order.
solution is to do something like:
public function get_events_select($selectwhere, array $params, $sort, $limitfrom, $limitnum) {
|
global $DB;
|
|
if (empty($sort)) {
|
$sort = "id ASC";
|
} else if (stripos($sort, 'DESC') !== false) {
|
$sort .= ", id DESC";
|
} else {
|
$sort .= ", id ASC";
|
}
|
Example: when using PG events from one page are printed out in random order in the livelog report.
- Testing discovered
-
MDL-45203 convert remaining add_to_log() from login/lib.php
-
- Closed
-