Skip to content

Commit

Permalink
Fix getAllUsersFromCoursesFromAllSessionFromStatus order BT#18773
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed May 11, 2021
1 parent 32c676f commit e3e46ef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main/inc/lib/sessionmanager.lib.php
Expand Up @@ -6110,7 +6110,7 @@ public static function getAllUsersFromCoursesFromAllSessionFromStatus(
$getCount = false,
$from = null,
$numberItems = null,
$column = 1,
$column = '',
$direction = 'asc',
$keyword = null,
$active = null,
Expand All @@ -6122,6 +6122,13 @@ public static function getAllUsersFromCoursesFromAllSessionFromStatus(
$filterByStatus = (int) $filterByStatus;
$userId = (int) $userId;

if (empty($column)) {
$column = 'u.lastname';
if (api_is_western_name_order()) {
$column = 'u.firstname';
}
}

$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
Expand Down

0 comments on commit e3e46ef

Please sign in to comment.