|
|
|
@ -43,15 +43,22 @@ $em = Database::getManager(); |
|
|
|
$formSearch = new FormValidator('load', 'get', api_get_self()); |
|
|
|
$formSearch = new FormValidator('load', 'get', api_get_self()); |
|
|
|
$formSearch->addHeader(get_lang('LoadDiagnosis')); |
|
|
|
$formSearch->addHeader(get_lang('LoadDiagnosis')); |
|
|
|
if (!empty($userInfo)) { |
|
|
|
if (!empty($userInfo)) { |
|
|
|
if ($userInfo['status'] == DRH) { |
|
|
|
$users = []; |
|
|
|
$users = UserManager::get_users_followed_by_drh($userId); |
|
|
|
switch ($userInfo['status']) { |
|
|
|
if (!empty($users)) { |
|
|
|
case DRH: |
|
|
|
$userList = []; |
|
|
|
$users = UserManager::get_users_followed_by_drh($userId); |
|
|
|
foreach ($users as $user) { |
|
|
|
break; |
|
|
|
$userList[$user['user_id']] = api_get_person_name($user['firstname'], $user['lastname']); |
|
|
|
case STUDENT_BOSS: |
|
|
|
} |
|
|
|
$users = UserManager::getUsersFollowedByStudentBoss($userId); |
|
|
|
$formSearch->addSelect('user_id', get_lang('User'), $userList); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($users)) { |
|
|
|
|
|
|
|
$userList = []; |
|
|
|
|
|
|
|
foreach ($users as $user) { |
|
|
|
|
|
|
|
$userList[$user['user_id']] = api_get_person_name($user['firstname'], $user['lastname']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$formSearch->addSelect('user_id', get_lang('User'), $userList); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if ($userToLoad) { |
|
|
|
if ($userToLoad) { |
|
|
|
|