19declare(strict_types=1);
51 $this->
renderer = $DIC->ui()->renderer();
52 $this->uiFactory =
$DIC->ui()->factory();
55 $this->
profile = $DIC[
'user']->getProfile();
56 $this->
user = $DIC[
'user']->getLoggedInUser();
63 $this->
lng->loadLanguageModule(
'grp');
64 $this->
lng->loadLanguageModule(
'crs');
65 $this->
lng->loadLanguageModule(
'sess');
66 $this->
lng->loadLanguageModule(
'ps');
74 $this->
addColumn($this->
lng->txt(
'name'),
'lastname',
'20%');
78 $this->
addColumn($all_cols[$col][
'txt'], $col);
81 $this->
addColumn($this->
lng->txt(
'application_date'),
'sub_time',
"10%");
86 $this->
addMultiCommand(
'sendMailToSelectedUsers', $this->
lng->txt(
'crs_mem_send_mail'));
91 $this->
lng->loadLanguageModule(
'user');
98 $this->
setRowTemplate(
"tpl.show_waiting_list_row.html",
"components/ILIAS/Membership");
103 $this->
enable(
'select_all');
126 $this->wait_user_ids = $this->wait = [];
127 foreach ($a_user_ids as $usr_id) {
128 $this->wait_user_ids[] = $usr_id;
139 return parent::numericOrdering($a_field);
144 if (self::$all_columns) {
153 is_array(self::$all_columns) &&
154 array_key_exists(
'consultation_hour', self::$all_columns)
156 unset(self::$all_columns[
'consultation_hour']);
160 !is_array(self::$all_columns) ||
161 !array_key_exists(
'login', self::$all_columns)
163 self::$all_columns[
'login'] = [
165 'txt' => $this->
lng->txt(
'login')
171 protected function fillRow(array $a_set): void
178 $this->tpl->setVariable(
187 $this->tpl->setVariable(
'VAL_ID', $a_set[
'usr_id']);
188 $this->tpl->setVariable(
'VAL_NAME', $a_set[
'lastname'] .
', ' . $a_set[
'firstname']);
193 $a_set[
'gender'] = $a_set[
'gender'] ? $this->
lng->txt(
'gender_' . $a_set[
'gender']) :
'';
194 $this->tpl->setCurrentBlock(
'custom_fields');
195 $this->tpl->setVariable(
'VAL_CUST', $a_set[$field]);
196 $this->tpl->parseCurrentBlock();
203 )) : $this->
lng->txt(
'no_date');
204 $this->tpl->setCurrentBlock(
'custom_fields');
205 $this->tpl->setVariable(
'VAL_CUST', $a_set[$field]);
206 $this->tpl->parseCurrentBlock();
209 case 'odf_last_update':
210 $this->tpl->setVariable(
'VAL_CUST', (
string) ($a_set[
'odf_info_txt'] ??
''));
214 $this->tpl->setCurrentBlock(
'custom_fields');
215 $this->tpl->setVariable(
217 ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((
int) $a_set[
'usr_id'])
219 $this->tpl->parseCurrentBlock();
223 $this->tpl->setCurrentBlock(
'custom_fields');
224 $this->tpl->setVariable(
'VAL_CUST', isset($a_set[$field]) ? (
string) $a_set[$field] :
'');
225 $this->tpl->parseCurrentBlock();
229 $this->tpl->setVariable(
242 $additional_fields[
"firstname"],
243 $additional_fields[
"lastname"],
244 $additional_fields[
"last_login"],
245 $additional_fields[
"access_until"],
246 $additional_fields[
'org_units']
249 $udf_ids = $usr_data_fields = $odf_ids = array();
250 foreach ($additional_fields as $field) {
251 if (strpos($field,
'udf') === 0) {
252 $udf_ids[] = substr($field, 4);
255 if (strpos($field,
'odf') === 0) {
256 $odf_ids[] = substr($field, 4);
260 $usr_data_fields[] = $field;
300 foreach ((array) $usr_data[
'set'] as
$user) {
305 $course_user_data = $this->
getParentObject()->readMemberData($usr_ids, array());
306 $a_user_data = array();
307 foreach ((array) $usr_data[
'set'] as $ud) {
308 $a_user_data[(
int) $ud[
'usr_id']] = array_merge($ud, $course_user_data[(
int) $ud[
'usr_id']]);
313 $a_user_data = array_reduce(
314 $this->
profile->getDataForMultiple($usr_ids),
315 function (array
$c, ProfileData $v) use ($udf_ids): array {
320 foreach ($udf_ids as $field_id) {
321 $c[$v->getId()][
'udf_' . $field_id] = $v->getAdditionalFieldByIdentifier($field_id);
330 foreach (
$data as $usr_id => $fields) {
332 if (!$this->
checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) {
336 foreach ($fields as $field_id => $value) {
337 $a_user_data[$usr_id][
'odf_' . $field_id] = $value;
343 if (!isset($a_user_data[$usr_id])) {
347 if ($usr_id == $edit_info[
'update_user']) {
348 $a_user_data[$usr_id][
'odf_last_update'] =
'';
349 $a_user_data[$usr_id][
'odf_info_txt'] =
$GLOBALS[
'DIC'][
'lng']->txt(
'cdf_edited_by_self');
351 $a_user_data[$usr_id][
'odf_last_update'] .= (
'_' . $edit_info[
'editing_time']->get(
IL_CAL_UNIX));
355 $a_user_data[$usr_id][
'odf_last_update'] = $edit_info[
'update_user'];
356 $a_user_data[$usr_id][
'odf_last_update'] .= (
'_' . $edit_info[
'editing_time']->get(
IL_CAL_UNIX));
359 $a_user_data[$usr_id][
'odf_info_txt'] = ($name[
'firstname'] .
' ' . $name[
'lastname'] .
', ' .
ilDatePresentation::formatDate($edit_info[
'editing_time']));
364 foreach ($usr_data[
'set'] as
$user) {
370 foreach ($usr_data_fields as $field) {
371 $a_user_data[(
int)
$user[
'usr_id']][$field] =
$user[$field] ?:
'';
376 foreach ($this->wait as $usr_id => $wait_usr_data) {
377 if (isset($a_user_data[$usr_id])) {
378 $a_user_data[$usr_id][
'sub_time'] = $wait_usr_data[
'time'];
390 $this->
ctrl->setParameterByClass(get_class($this->
getParentObject()),
'member_id', $a_set[
'usr_id']);
392 $dropDownItems = array();
393 $dropDownItems[] = $this->uiFactory->button()->shy(
394 $this->
lng->txt($this->getRepositoryObject()->getType() .
'_mem_send_mail'),
395 $this->ctrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'sendMailToSelectedUsers')
398 if (self::$has_odf_definitions) {
399 $dropDownItems[] = $this->uiFactory->button()->shy(
400 $this->
lng->txt($this->getRepositoryObject()->getType() .
'_cdf_edit_member'),
401 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui',
'editMember')
405 $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
406 ->withLabel($this->
lng->txt(
'actions'));
408 $this->tpl->setVariable(
'ACTION_USER', $this->
renderer->render($dropDown));
Builds a Color from either hex- or rgb values.
static _hasFields(int $a_container_id)
Check if there are any define fields.
static _getValuesByObjId(int $a_obj_id)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static _getInstanceByType(string $a_type)
Get Singleton Instance.
static _checkGroupingDependencies(ilObject $container_obj, ?int $a_user_id=null)
static getAssignedObjects()
static _lookupName(int $a_user_id)
static lookupEntriesByObjectId(int $a_obj_id)
Class ilObject Basic functions for all objects.
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
determineOffsetAndOrder(bool $a_omit_offset=false)
setExternalSegmentation(bool $a_val)
setFormName(string $a_name="")
addMultiCommand(string $a_cmd, string $a_text)
setPrefix(string $a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
setFormAction(string $a_form_action, bool $a_multipart=false)
resetOffset(bool $a_in_determination=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
getExternalSegmentation()
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
enable(string $a_module_name)
setMaxCount(int $a_max_count)
set max.
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.
GUI class for course/group waiting list.
numericOrdering(string $a_field)
Should this field be sorted numeric?
setUserIds(array $a_user_ids)
Set user ids.
checkAcceptance(int $a_usr_id)
static array $all_columns
static bool $has_odf_definitions
__construct(object $a_parent_obj, ilObject $rep_object, ilWaitingList $waiting_list)
ilWaitingList $waiting_list
fillRow(array $a_set)
Standard Version of Fill Row.
getSelectableColumns()
Get selectable columns.
showActionLinks(array $a_set)
Base class for course and group waiting lists.
An entity that renders components to a string output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc