3 declare(strict_types=1);
    39         ?
object $a_parent_obj,
    41         bool $show_learning_progress = 
false    52         $this->
access = $DIC->access();
    53         $this->rbacreview = $DIC->rbac()->review();
    54         $this->
user = $DIC->user();
    60         $this->
lng->loadLanguageModule(
'grp');
    61         $this->
lng->loadLanguageModule(
'trac');
    62         $this->
lng->loadLanguageModule(
'rbac');
    63         $this->
lng->loadLanguageModule(
'mmbr');
    69         $this->
addColumn($this->
lng->txt(
'name'), 
'lastname', 
'20%');
    73             $this->
addColumn($all_cols[$col][
'txt'], $col);
    76         if ($this->show_learning_progress) {
    77             $this->
addColumn($this->
lng->txt(
'learning_progress'), 
'progress');
    80         if ($this->privacy->enabledGroupAccessTimes()) {
    81             $this->
addColumn($this->
lng->txt(
'last_access'), 
'access_time_unix');
    83         $this->
addColumn($this->
lng->txt(
'grp_mem_contacts'), 
'contact');
    84         $this->
addColumn($this->
lng->txt(
'grp_notification'), 
'notification');
    86         $this->
addColumn($this->
lng->txt(
'actions'), 
'optional', 
'', 
false, 
'ilMembershipRowActionsHeader');
    89         $this->
setRowTemplate(
"tpl.show_participants_row.html", 
"Modules/Group");
    96         $this->
enable(
'select_all');
   102         $this->
addMultiCommand(
'sendMailToSelectedUsers', $this->
lng->txt(
'mmbr_btn_mail_selected_users'));
   103         $this->
lng->loadLanguageModule(
'user');
   113     protected function fillRow(array $a_set): void
   117         $ilAccess = $DIC->access();
   119         $a_set[
'usr_id'] = (
int) $a_set[
'usr_id'];
   120         $this->tpl->setVariable(
'VAL_ID', $a_set[
'usr_id']);
   121         $this->tpl->setVariable(
'VAL_NAME', $a_set[
'lastname'] . 
', ' . $a_set[
'firstname']);
   122         if (!$ilAccess->checkAccessOfUser($a_set[
'usr_id'], 
'read', 
'', $this->getRepositoryObject()->getRefId()) and
   123             is_array($info = $ilAccess->getInfo())) {
   124             $this->tpl->setCurrentBlock(
'access_warning');
   125             $this->tpl->setVariable(
'PARENT_ACCESS', $info[0][
'text']);
   126             $this->tpl->parseCurrentBlock();
   129         if (!$a_set[
'active']) {
   130             $this->tpl->setCurrentBlock(
'access_warning');
   131             $this->tpl->setVariable(
'PARENT_ACCESS', $this->
lng->txt(
'usr_account_inactive'));
   132             $this->tpl->parseCurrentBlock();
   139                     $a_set[
'gender'] = $a_set[
'gender'] ? $this->
lng->txt(
'gender_' . $a_set[
'gender']) : 
'';
   140                     $this->tpl->setCurrentBlock(
'custom_fields');
   141                     $this->tpl->setVariable(
'VAL_CUST', $a_set[$field]);
   142                     $this->tpl->parseCurrentBlock();
   147                     $this->tpl->setCurrentBlock(
'custom_fields');
   148                     $this->tpl->setVariable(
'VAL_CUST', $a_set[$field]);
   149                     $this->tpl->parseCurrentBlock();
   152                 case 'consultation_hour':
   153                     $this->tpl->setCurrentBlock(
'custom_fields');
   155                     foreach ((array) $a_set[
'consultation_hours'] as $ch) {
   160                         if ($ch[
'explanation']) {
   161                             $tmp .= 
' ' . $ch[
'explanation'];
   165                     $dt_string = implode(
'<br />', $dts);
   166                     $this->tpl->setVariable(
'VAL_CUST', $dt_string) ;
   167                     $this->tpl->parseCurrentBlock();
   172                     if (is_array($a_set[
'prtf'])) {
   173                         foreach ($a_set[
'prtf'] as $prtf_url => $prtf_txt) {
   174                             $tmp[] = 
'<a href="' . $prtf_url . 
'">' . $prtf_txt . 
'</a>';
   177                     $this->tpl->setCurrentBlock(
'custom_fields');
   178                     $this->tpl->setVariable(
'VAL_CUST', implode(
'<br />', $tmp)) ;
   179                     $this->tpl->parseCurrentBlock();
   182                 case 'odf_last_update':
   183                     $this->tpl->setCurrentBlock(
'custom_fields');
   184                     $this->tpl->setVariable(
'VAL_CUST', $a_set[
'odf_info_txt'] ?? 
'');
   185                     $this->tpl->parseCurrentBlock();
   189                     $this->tpl->setCurrentBlock(
'custom_fields');
   190                     $this->tpl->setVariable(
'VAL_CUST', (
string) $a_set[
'roles_label']);
   191                     $this->tpl->parseCurrentBlock();
   195                     $this->tpl->setCurrentBlock(
'custom_fields');
   196                     $this->tpl->setVariable(
   198                         ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($a_set[
'usr_id'])
   200                     $this->tpl->parseCurrentBlock();
   204                     $this->tpl->setCurrentBlock(
'custom_fields');
   205                     $this->tpl->setVariable(
'VAL_CUST', isset($a_set[$field]) ? (
string) $a_set[$field] : 
'');
   206                     $this->tpl->parseCurrentBlock();
   211         if ($this->privacy->enabledGroupAccessTimes()) {
   212             $this->tpl->setVariable(
'VAL_ACCESS', $a_set[
'access_time']);
   215         if ($this->show_learning_progress) {
   216             $this->tpl->setCurrentBlock(
'lp');
   218             $icon_rendered = $icons->renderIconForStatus($icons->lookupNumStatus($a_set[
'progress']));
   220             $this->tpl->setVariable(
'LP_STATUS_ALT', $this->
lng->txt($a_set[
'progress']));
   221             $this->tpl->setVariable(
'LP_STATUS_ICON', $icon_rendered);
   223             $this->tpl->parseCurrentBlock();
   226         $this->tpl->setVariable(
'VAL_POSTNAME', 
'participants');
   229             $this->tpl->setVariable(
'VAL_CONTACT_ID', $a_set[
'usr_id']);
   230             $this->tpl->setVariable(
   231                 'VAL_CONTACT_CHECKED',
   232                 $a_set[
'contact'] ? 
'checked="checked"' : 
''   239             $this->tpl->setVariable(
'VAL_NOTIFICATION_ID', $a_set[
'usr_id']);
   240             $this->tpl->setVariable(
   241                 'VAL_NOTIFICATION_CHECKED',
   242                 $a_set[
'notification'] ? 
'checked="checked"' : 
''   246         $this->tpl->setVariable(
'VAL_LOGIN', $a_set[
'login']);
   253         $part = $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
   273         unset($additional_fields[
"firstname"]);
   274         unset($additional_fields[
"lastname"]);
   275         unset($additional_fields[
"last_login"]);
   276         unset($additional_fields[
"access_until"]);
   277         unset($additional_fields[
'consultation_hour']);
   278         unset($additional_fields[
'prtf']);
   279         unset($additional_fields[
'roles']);
   280         unset($additional_fields[
'org_units']);
   284         $udf_ids = $usr_data_fields = $odf_ids = array();
   285         foreach ($additional_fields as $field) {
   286             if (substr($field, 0, 3) == 
'udf') {
   287                 $udf_ids[] = substr($field, 4);
   290             if (substr($field, 0, 3) == 
'odf') {
   291                 $odf_ids[] = substr($field, 4);
   295             $usr_data_fields[] = $field;
   303             (
string) $this->current_filter[
'login'],
   315         $a_user_data = array();
   316         $filtered_user_ids = array();
   318         foreach ((array) $usr_data[
'set'] as $ud) {
   319             $user_id = (
int) $ud[
'usr_id'];
   320             if ($this->current_filter[
'roles']) {
   321                 if (!$this->rbacreview->isAssigned($user_id, $this->current_filter[
'roles'])) {
   325             if (array_key_exists(
'org_units', $this->current_filter) && $this->current_filter[
'org_units']) {
   326                 $org_unit = $this->current_filter[
'org_units'];
   328                 if (!in_array($org_unit, $assigned)) {
   333             $filtered_user_ids[] = $user_id;
   334             $a_user_data[$user_id] = array_merge($ud, (array) $group_user_data[$user_id]);
   337             foreach ($local_roles as $role_id => $role_name) {
   339                 if ($this->rbacreview->isAssigned($user_id, $role_id)) {
   340                     $roles[] = $role_name;
   343             $a_user_data[$user_id][
'name'] = $a_user_data[$user_id][
'lastname'] . 
', ' . $a_user_data[$user_id][
'firstname'];
   344             $a_user_data[$user_id][
'roles_label'] = implode(
'<br />', $roles);
   345             $a_user_data[$user_id][
'roles'] = $this->participants->setRoleOrderPosition($user_id);
   351             foreach (
$data as $usr_id => $fields) {
   352                 $usr_id = (
int) $usr_id;
   357                 foreach ($fields as $field_id => $value) {
   358                     $a_user_data[$usr_id][
'udf_' . $field_id] = $value;
   365             foreach (
$data as $usr_id => $fields) {
   366                 $usr_id = (
int) $usr_id;
   370                 foreach ($fields as $field_id => $value) {
   371                     if ($a_user_data[$usr_id] ?? 
false) {
   372                         $a_user_data[$usr_id][
'odf_' . $field_id] = $value;
   378                 if (!isset($a_user_data[$usr_id])) {
   382                 if ($usr_id == $edit_info[
'update_user']) {
   383                     $a_user_data[$usr_id][
'odf_last_update'] = 
'';
   384                     $a_user_data[$usr_id][
'odf_info_txt'] = $this->
lng->txt(
'cdf_edited_by_self');
   386                         $a_user_data[$usr_id][
'odf_last_update'] .= (
'_' . $edit_info[
'editing_time']->get(
IL_CAL_UNIX));
   390                     $a_user_data[$usr_id][
'odf_last_update'] = $edit_info[
'update_user'];
   391                     $a_user_data[$usr_id][
'odf_last_update'] .= (
'_' . $edit_info[
'editing_time']->get(
IL_CAL_UNIX));
   394                     $a_user_data[$usr_id][
'odf_info_txt'] = ($name[
'firstname'] . 
' ' . $name[
'lastname'] . 
', ' . 
ilDatePresentation::formatDate($edit_info[
'editing_time']));
   402                 if (isset($a_user_data[$buser])) {
   403                     $a_user_data[$buser][
'consultation_hour'] = $booking[0][
'dt'];
   404                     $a_user_data[$buser][
'consultation_hour_end'] = $booking[0][
'dtend'];
   405                     $a_user_data[$buser][
'consultation_hours'] = $booking;
   423         if (isset($this->cached_user_names[$user_id])) {
   424             return $this->cached_user_names[$user_id];
 
static lookupData(array $a_user_ids, array $a_field_ids)
Lookup data. 
 
enable(string $a_module_name)
 
ilPrivacySettings $privacy
 
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. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
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 
 
__construct(?object $a_parent_obj, ilObject $rep_object, bool $show_learning_progress=false)
 
checkAcceptance(int $a_usr_id)
 
setFormName(string $a_name="")
 
lookupUserName(int $user_id)
 
initFilter()
Init table filter. 
 
bool $show_learning_progress
 
isColumnSelected(string $col)
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
setDefaultOrderField(string $a_defaultorderfield)
 
Singleton class that stores all privacy settings. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
static lookupManagedBookingsForObject(int $a_obj_id, int $a_usr_id)
Lookup bookings for own and managed consultation hours of an object. 
 
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14. 
 
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance. 
 
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)
 
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
 
setPrefix(string $a_prefix)