From 0879a39b37af0ea42b31f63fa5e2490d644f11f2 Mon Sep 17 00:00:00 2001 From: christian Date: Wed, 11 Oct 2023 00:07:11 -0500 Subject: [PATCH] Reporting: Fix count of users and display table - refs BT#21097 --- public/main/inc/lib/statistics.lib.php | 13 ++++++++++++- public/main/my_space/tc_report.php | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/public/main/inc/lib/statistics.lib.php b/public/main/inc/lib/statistics.lib.php index 04892f18a1..94dd37efcd 100644 --- a/public/main/inc/lib/statistics.lib.php +++ b/public/main/inc/lib/statistics.lib.php @@ -1386,7 +1386,18 @@ class Statistics public static function getBossTable($bossId) { - $students = UserManager::getUsersFollowedByStudentBoss($bossId); + $students = UserManager::getUsersFollowedByStudentBoss( + $bossId, + 0, + false, + false, + false, + null, + null, + null, + null, + 1 + ); if (!empty($students)) { $table = new HTML_Table(['class' => 'table table-responsive', 'id' => 'table_'.$bossId]); diff --git a/public/main/my_space/tc_report.php b/public/main/my_space/tc_report.php index 42bb2a2986..284062f994 100644 --- a/public/main/my_space/tc_report.php +++ b/public/main/my_space/tc_report.php @@ -143,7 +143,7 @@ if ('add_user' !== $action) { $userRepo = Container::getUserRepository(); $bossList = $userRepo->findByRole('ROLE_STUDENT_BOSS', '', api_get_current_access_url_id()); //$bossList = UserManager::get_user_list($conditions, ['firstname']); - $tableContent .= '
'; + $tableContent .= '
'; foreach ($bossList as $boss) { if (!empty($languageFilter) && $languageFilter !== $boss->getLocale()) { continue;