|
|
|
@ -213,8 +213,21 @@ switch ($action) { |
|
|
|
if ($searchByGroups) { |
|
|
|
if ($searchByGroups) { |
|
|
|
$groups = GroupPortalManager::get_groups_by_user(api_get_user_id(), GROUP_USER_PERMISSION_ADMIN); |
|
|
|
$groups = GroupPortalManager::get_groups_by_user(api_get_user_id(), GROUP_USER_PERMISSION_ADMIN); |
|
|
|
$groupsId = array_keys($groups); |
|
|
|
$groupsId = array_keys($groups); |
|
|
|
|
|
|
|
$subgroupsId = []; |
|
|
|
|
|
|
|
|
|
|
|
if (is_array($groupsId)) { |
|
|
|
if (is_array($groupsId)) { |
|
|
|
|
|
|
|
foreach ($groupsId as $groupId) { |
|
|
|
|
|
|
|
$subgroupsId = array_merge( |
|
|
|
|
|
|
|
$subgroupsId, |
|
|
|
|
|
|
|
GroupPortalManager::getGroupsByDepthLevel($groupId) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$groupsId = array_merge( |
|
|
|
|
|
|
|
$groupsId, |
|
|
|
|
|
|
|
$subgroupsId |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($groupsId as $groupId) { |
|
|
|
foreach ($groupsId as $groupId) { |
|
|
|
$groupUsers = GroupPortalManager::get_users_by_group($groupId); |
|
|
|
$groupUsers = GroupPortalManager::get_users_by_group($groupId); |
|
|
|
|
|
|
|
|
|
|
|
@ -263,6 +276,11 @@ switch ($action) { |
|
|
|
$sessionIdList = array_unique($sessionIdList); |
|
|
|
$sessionIdList = array_unique($sessionIdList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_is_student_boss() && empty($userIdList)) { |
|
|
|
|
|
|
|
$count = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($action == 'get_user_course_report') { |
|
|
|
if ($action == 'get_user_course_report') { |
|
|
|
$count = CourseManager::get_count_user_list_from_course_code( |
|
|
|
$count = CourseManager::get_count_user_list_from_course_code( |
|
|
|
false, |
|
|
|
false, |
|
|
|
@ -567,6 +585,11 @@ switch ($action) { |
|
|
|
//$sidx = 'training_hours'; |
|
|
|
//$sidx = 'training_hours'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_is_student_boss() && empty($userIdList)) { |
|
|
|
|
|
|
|
$result = []; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$result = CourseManager::get_user_list_from_course_code( |
|
|
|
$result = CourseManager::get_user_list_from_course_code( |
|
|
|
null, |
|
|
|
null, |
|
|
|
null, |
|
|
|
null, |
|
|
|
@ -621,6 +644,11 @@ switch ($action) { |
|
|
|
$sidx = 'title'; |
|
|
|
$sidx = 'title'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_is_student_boss() && empty($userIdList)) { |
|
|
|
|
|
|
|
$result = []; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$result = CourseManager::get_user_list_from_course_code( |
|
|
|
$result = CourseManager::get_user_list_from_course_code( |
|
|
|
null, |
|
|
|
null, |
|
|
|
null, |
|
|
|
null, |
|
|
|
|