Fixing default user list order see #7441

1.9.x
Julio 10 years ago
parent c5dccb4a6a
commit 699f26c5ff
  1. 7
      main/inc/lib/course.lib.php

@ -1380,6 +1380,13 @@ class CourseManager
$course_code = Database::escape_string($course_code);
$where = array();
if (empty($order_by)) {
$order_by = 'user.lastname, user.firstname';
if (api_is_western_name_order()) {
$order_by = 'user.firstname, user.lastname';
}
}
// if the $order_by does not contain 'ORDER BY' we have to check if it is a valid field that can be sorted on
if (!strstr($order_by,'ORDER BY')) {
if (!empty($order_by)) {

Loading…
Cancel
Save