3 declare(strict_types=0);
    42         bool $a_show_learning_progress = 
false,
    43         bool $a_show_timings = 
false,
    44         bool $a_show_lp_status_sync = 
false,
    49         $this->show_learning_progress = $a_show_learning_progress;
    51         if (null === $preloader) {
    57         $this->preLoader = $preloader;
    58         $this->show_timings = $a_show_timings;
    59         $this->show_lp_status_sync = $a_show_lp_status_sync;
    63             $this->show_lp_status_sync = 
false;
    66         $this->
access = $DIC->access();
    68         $this->rbacReview = $DIC->rbac()->review();
    69         $this->
user = $DIC->user();
    74         $this->
lng->loadLanguageModule(
'crs');
    75         $this->
lng->loadLanguageModule(
'trac');
    76         $this->
lng->loadLanguageModule(
'rbac');
    77         $this->
lng->loadLanguageModule(
'mmbr');
    78         $this->
lng->loadLanguageModule(
'cert');
    79         $this->
lng->loadLanguageModule(
'certificate');
    86         $this->
addColumn($this->
lng->txt(
'name'), 
'name', 
'20%');
    90             $this->
addColumn($all_cols[$col][
'txt'], $col);
    93         if ($this->show_learning_progress) {
    94             $this->
addColumn($this->
lng->txt(
'learning_progress'), 
'progress');
    97         if ($this->privacy->enabledCourseAccessTimes()) {
    98             $this->
addColumn($this->
lng->txt(
'last_access'), 
'access_ut', 
'16em');
   101         $this->
addColumn($this->
lng->txt(
'crs_member_passed'), 
'passed');
   102         if ($this->show_lp_status_sync) {
   103             $this->
addColumn($this->
lng->txt(
'crs_member_passed_status_changed'), 
'passed_timestamp');
   107         $this->
addColumn($this->
lng->txt(
'crs_mem_contact'), 
'contact');
   108         $this->
addColumn($this->
lng->txt(
'crs_blocked'), 
'blocked');
   109         $this->
addColumn($this->
lng->txt(
'crs_notification_list_title'), 
'notification');
   111         $this->
addColumn($this->
lng->txt(
'actions'), 
'optional', 
'', 
false, 
'ilMembershipRowActionsHeader');
   113         $this->
setRowTemplate(
"tpl.show_participants_row.html", 
"components/ILIAS/Course");
   119         $this->
enable(
'select_all');
   133         $this->
addMultiCommand(
'sendMailToSelectedUsers', $this->
lng->txt(
'mmbr_btn_mail_selected_users'));
   134         $this->
lng->loadLanguageModule(
'user');
   140     protected function fillRow(array $a_set): void
   142         $this->tpl->setVariable(
'VAL_ID', $a_set[
'usr_id']);
   143         $this->tpl->setVariable(
'VAL_NAME', $a_set[
'lastname'] . 
', ' . $a_set[
'firstname']);
   144         $this->tpl->setVariable(
'SELECT_PARTICIPANT', $this->
lng->txt(
"select") . 
' ' . $a_set[
'lastname'] . 
', ' . $a_set[
'firstname']);
   147             !$this->
access->checkAccessOfUser($a_set[
'usr_id'], 
'read', 
'', $this->getRepositoryObject()->getRefId()) &&
   148             is_array($info = $this->
access->getInfo())
   150             $this->tpl->setCurrentBlock(
'access_warning');
   151             $this->tpl->setVariable(
'PARENT_ACCESS', $info[0][
'text']);
   152             $this->tpl->parseCurrentBlock();
   155         if (!$a_set[
'active']) {
   156             $this->tpl->setCurrentBlock(
'access_warning');
   157             $this->tpl->setVariable(
'PARENT_ACCESS', $this->
lng->txt(
'usr_account_inactive'));
   158             $this->tpl->parseCurrentBlock();
   164                     $a_set[
'gender'] = ($a_set[
'gender'] ?? 
'') ? $this->
lng->txt(
'gender_' . $a_set[
'gender']) : 
'';
   165                     $this->tpl->setCurrentBlock(
'custom_fields');
   166                     $this->tpl->setVariable(
'VAL_CUST', $a_set[$field]);
   167                     $this->tpl->parseCurrentBlock();
   174                     )) : $this->
lng->txt(
'no_date');
   175                     $this->tpl->setCurrentBlock(
'custom_fields');
   176                     $this->tpl->setVariable(
'VAL_CUST', $a_set[$field]);
   177                     $this->tpl->parseCurrentBlock();
   180                 case 'consultation_hour':
   181                     $this->tpl->setCurrentBlock(
'custom_fields');
   183                     foreach ((array) ($a_set[
'consultation_hours'] ?? []) as $ch) {
   188                         if ($ch[
'explanation']) {
   189                             $tmp .= 
' ' . $ch[
'explanation'];
   193                     $dt_string = implode(
'<br />', $dts);
   194                     $this->tpl->setVariable(
'VAL_CUST', $dt_string);
   195                     $this->tpl->parseCurrentBlock();
   200                     if (is_array($a_set[
'prtf'])) {
   201                         foreach ($a_set[
'prtf'] as $prtf_url => $prtf_txt) {
   202                             $tmp[] = 
'<a href="' . $prtf_url . 
'">' . $prtf_txt . 
'</a>';
   205                     $this->tpl->setCurrentBlock(
'custom_fields');
   206                     $this->tpl->setVariable(
'VAL_CUST', implode(
'<br />', $tmp));
   207                     $this->tpl->parseCurrentBlock();
   210                 case 'odf_last_update':
   211                     $this->tpl->setCurrentBlock(
'custom_fields');
   212                     $this->tpl->setVariable(
'VAL_CUST', (
string) ($a_set[
'odf_info_txt'] ?? 
''));
   213                     $this->tpl->parseCurrentBlock();
   217                     $this->tpl->setCurrentBlock(
'custom_fields');
   218                     $this->tpl->setVariable(
'VAL_CUST', (
string) ($a_set[
'roles_label'] ?? 
''));
   219                     $this->tpl->parseCurrentBlock();
   223                     $this->tpl->setCurrentBlock(
'custom_fields');
   224                     $this->tpl->setVariable(
   226                         ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((
int) $a_set[
'usr_id'])
   228                     $this->tpl->parseCurrentBlock();
   232                     $this->tpl->setCurrentBlock(
'custom_fields');
   233                     $this->tpl->setVariable(
'VAL_CUST', isset($a_set[$field]) ? (
string) $a_set[$field] : 
'');
   234                     $this->tpl->parseCurrentBlock();
   239         if ($this->privacy->enabledCourseAccessTimes()) {
   240             $this->tpl->setVariable(
'VAL_ACCESS', $a_set[
'access_time']);
   242         if ($this->show_learning_progress) {
   243             $this->tpl->setCurrentBlock(
'lp');
   245             $icon_rendered = $icons->renderIconForStatus($icons->lookupNumStatus($a_set[
'progress']));
   247             $this->tpl->setVariable(
'LP_STATUS_ALT', $this->
lng->txt($a_set[
'progress']));
   248             $this->tpl->setVariable(
'LP_STATUS_ICON', $icon_rendered);
   250             $this->tpl->parseCurrentBlock();
   253         $this->tpl->setVariable(
'VAL_POSTNAME', 
'participants');
   255         if ($this->
access->checkAccess(
"grade", 
"", $this->rep_object->getRefId())) {
   256             $this->tpl->setCurrentBlock(
'grade');
   257             $this->tpl->setVariable(
'VAL_PASSED_ID', $a_set[
'usr_id']);
   258             $this->tpl->setVariable(
'VAL_PASSED_CHECKED', ($a_set[
'passed'] ? 
'checked="checked"' : 
''));
   259             $this->tpl->setVariable(
'PASSED_TITLE', $this->
lng->txt(
'crs_member_passed'));
   260             $this->tpl->parseCurrentBlock();
   262             $this->tpl->setVariable(
'VAL_PASSED_TXT', ($a_set[
'passed']
   263                 ? $this->
lng->txt(
"yes")
   264                 : $this->
lng->txt(
"no")));
   272             $this->tpl->setCurrentBlock(
'with_contact');
   273             $this->tpl->setVariable(
'VAL_CONTACT_ID', $a_set[
'usr_id']);
   274             $this->tpl->setVariable(
'VAL_CONTACT_CHECKED', $a_set[
'contact'] ? 
'checked="checked"' : 
'');
   275             $this->tpl->setVariable(
'CONTACT_TITLE', $this->
lng->txt(
'crs_mem_contact'));
   276             $this->tpl->parseCurrentBlock();
   279             $this->tpl->setCurrentBlock(
'with_notification');
   280             $this->tpl->setVariable(
'VAL_NOTIFICATION_ID', $a_set[
'usr_id']);
   281             $this->tpl->setVariable(
'VAL_NOTIFICATION_CHECKED', ($a_set[
'notification'] ? 
'checked="checked"' : 
''));
   282             $this->tpl->setVariable(
'NOTIFICATION_TITLE', $this->
lng->txt(
'crs_notification_list_title'));
   283             $this->tpl->parseCurrentBlock();
   291             $this->tpl->setCurrentBlock(
'with_blocked');
   292             $this->tpl->setVariable(
'VAL_BLOCKED_ID', $a_set[
'usr_id']);
   293             $this->tpl->setVariable(
'VAL_BLOCKED_CHECKED', ($a_set[
'blocked'] ? 
'checked="checked"' : 
''));
   294             $this->tpl->setVariable(
'BLOCKED_TITLE', $this->
lng->txt(
'crs_blocked'));
   295             $this->tpl->parseCurrentBlock();
   298         if ($this->show_lp_status_sync) {
   299             $this->tpl->setVariable(
'PASSED_INFO', $a_set[
"passed_info"]);
   306             $this->tpl->setCurrentBlock(
'link');
   307             $this->tpl->setVariable(
'LINK_NAME', $this->
ctrl->getLinkTarget($this->parent_obj, 
'deliverCertificate'));
   308             $this->tpl->setVariable(
'LINK_TXT', $this->
lng->txt(
'download_certificate'));
   309             $this->tpl->parseCurrentBlock();
   311         $this->
ctrl->clearParameters($this->parent_obj);
   313         if ($this->show_timings) {
   314             $this->
ctrl->setParameterByClass(
'ilcoursecontentgui', 
'member_id', $a_set[
'usr_id']);
   315             $this->tpl->setCurrentBlock(
'link');
   316             $this->tpl->setVariable(
   318                 $this->
ctrl->getLinkTargetByClass(
'ilcoursecontentgui', 
'showUserTimings')
   320             $this->tpl->setVariable(
'LINK_TXT', $this->
lng->txt(
'timings_timings'));
   321             $this->tpl->parseCurrentBlock();
   330         unset($additional_fields[
"firstname"]);
   331         unset($additional_fields[
"lastname"]);
   332         unset($additional_fields[
"last_login"]);
   333         unset($additional_fields[
"access_until"]);
   334         unset($additional_fields[
'consultation_hour']);
   335         unset($additional_fields[
'prtf']);
   336         unset($additional_fields[
'roles']);
   337         unset($additional_fields[
'org_units']);
   339         $part = $this->participants->getParticipants();
   341         $part = $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
   353         $udf_ids = $usr_data_fields = $odf_ids = array();
   354         foreach ($additional_fields as $field) {
   355             if (substr($field, 0, 3) == 
'udf') {
   356                 $udf_ids[] = substr($field, 4);
   359             if (substr($field, 0, 3) == 
'odf') {
   360                 $odf_ids[] = substr($field, 4);
   364             $usr_data_fields[] = $field;
   372             $this->current_filter[
'login'],
   386         foreach ((array) $usr_data[
'set'] as $user) {
   387             if ($this->current_filter[
'roles'] ?? 
false) {
   388                 if (!$this->rbacReview->isAssigned($user[
'usr_id'], $this->current_filter[
'roles'])) {
   392             if ($this->current_filter[
'org_units'] ?? 
false) {
   393                 $org_unit = $this->current_filter[
'org_units'];
   396                 if (!in_array($org_unit, $assigned)) {
   401             $usr_ids[] = $user[
'usr_id'];
   410         $a_user_data = array();
   411         foreach ((array) $usr_data[
'set'] as $ud) {
   414             if (!in_array(
$user_id, $usr_ids)) {
   420                     'active' => $ud[
'active'],
   421                     'firstname' => $ud[
'firstname'],
   422                     'lastname' => $ud[
'lastname'],
   423                     'login' => $ud[
'login']
   430             foreach ($local_roles as $role_id => $role_name) {
   432                 if ($this->rbacReview->isAssigned($user_id, $role_id)) {
   433                     $roles[] = $role_name;
   438             $a_user_data[
$user_id][
'roles_label'] = implode(
'<br />', $roles);
   439             $a_user_data[
$user_id][
'roles'] = $this->participants->setRoleOrderPosition($user_id);
   441             if ($this->show_lp_status_sync) {
   444                 $passed_timestamp = 
'';
   445                 if ($a_user_data[$user_id][
"passed_info"]) {
   446                     $pinfo = $a_user_data[
$user_id][
"passed_info"];
   447                     if ($pinfo[
"user_id"]) {
   448                         if ($pinfo[
"user_id"] < 0) {
   449                             $passed_info = $this->
lng->txt(
"crs_passed_status_system");
   450                         } elseif ($pinfo[
"user_id"] > 0) {
   452                             $passed_info = $this->
lng->txt(
"crs_passed_status_manual_by") . 
": " . $name[
"login"];
   455                     if ($pinfo[
"timestamp"]) {
   457                         $passed_timestamp = $pinfo[
"timestamp"];
   460                 $a_user_data[
$user_id][
"passed_info"] = $passed_info;
   461                 $a_user_data[
$user_id][
"passed_timestamp"] = $passed_timestamp;
   466         if ($udf_ids !== []) {
   468             foreach (
$data as $usr_id => $fields) {
   473                 foreach ($fields as $field_id => $value) {
   474                     $a_user_data[$usr_id][
'udf_' . $field_id] = $value;
   479         if ($odf_ids !== []) {
   481             foreach (
$data as $usr_id => $fields) {
   482                 $usr_id = (
int) $usr_id;
   484                 if (!$this->
checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) {
   488                 foreach ($fields as $field_id => $value) {
   489                     $a_user_data[$usr_id][
'odf_' . $field_id] = $value;
   495                 if (!isset($a_user_data[$usr_id])) {
   499                 if ($usr_id == $edit_info[
'update_user']) {
   500                     $a_user_data[$usr_id][
'odf_last_update'] = 
'';
   501                     $a_user_data[$usr_id][
'odf_info_txt'] = $this->
lng->txt(
'cdf_edited_by_self');
   503                         $a_user_data[$usr_id][
'odf_last_update'] .= (
'_' . $edit_info[
'editing_time']->get(
IL_CAL_UNIX));
   507                     $a_user_data[$usr_id][
'odf_last_update'] = $edit_info[
'update_user'];
   508                     $a_user_data[$usr_id][
'odf_last_update'] .= (
'_' . $edit_info[
'editing_time']->get(
IL_CAL_UNIX));
   511                     $a_user_data[$usr_id][
'odf_info_txt'] = ($name[
'firstname'] . 
' ' . $name[
'lastname'] . 
', ' . 
ilDatePresentation::formatDate($edit_info[
'editing_time']));
   521             ) as $buser => $booking) {
   522                 if (isset($a_user_data[$buser])) {
   523                     $a_user_data[$buser][
'consultation_hour'] = $booking[0][
'dt'];
   524                     $a_user_data[$buser][
'consultation_hour_end'] = $booking[0][
'dtend'];
   525                     $a_user_data[$buser][
'consultation_hours'] = $booking;
   544         if (isset($this->cached_user_names[$user_id])) {
   545             return $this->cached_user_names[
$user_id];
 bool $show_lp_status_sync
 
static lookupData(array $a_user_ids, array $a_field_ids)
Lookup data. 
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
 
setTopCommands(bool $a_val)
 
ilPrivacySettings $privacy
 
enable(string $a_module_name)
 
setEnableTitle(bool $a_enabletitle)
 
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type. 
 
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
 
static _getValuesByObjId(int $a_obj_id)
 
static _lookupName(int $a_user_id)
lookup user name 
 
checkAcceptance(int $a_usr_id)
 
setFormName(string $a_name="")
 
ilCertificateUserForObjectPreloader $preLoader
 
initFilter()
Init table filter. 
 
static _enabledLearningProgress()
 
isColumnSelected(string $col)
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
setDefaultOrderField(string $a_defaultorderfield)
 
bool $show_learning_progress
 
Singleton class that stores all privacy settings. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static lookupManagedBookingsForObject(int $a_obj_id, int $a_usr_id)
Lookup bookings for own and managed consultation hours of an object. 
 
lookupUserName(int $user_id)
 
setEnableNumInfo(bool $a_val)
 
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ilObjUser $user=null)
Format a period of two dates Shows: 14. 
 
__construct(Container $dic, ilPlugin $plugin)
 
__construct(object $a_parent_obj, ilObject $rep_object, bool $a_show_learning_progress=false, bool $a_show_timings=false, bool $a_show_lp_status_sync=false, ilCertificateUserForObjectPreloader $preloader=null)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
static lookupEntriesByObjectId(int $a_obj_id)
 
static getUserListData(string $a_order_field, string $a_order_dir, int $a_offset, int $a_limit, string $a_string_filter="", string $a_activation_filter="", ?ilDateTime $a_last_login_filter=null, bool $a_limited_access_filter=false, bool $a_no_courses_filter=false, int $a_course_group_filter=0, int $a_role_filter=0, array $a_user_folder_filter=null, array $a_additional_fields=null, array $a_user_filter=null, string $a_first_letter="", string $a_authentication_filter="")
Get data for user administration list. 
 
addMultiCommand(string $a_cmd, string $a_text)
 
determineOffsetAndOrder(bool $a_omit_offset=false)
 
setEnableHeader(bool $a_enableheader)
 
setExternalSegmentation(bool $a_val)
 
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)