ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilUserTableGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
29 {
30  public const MODE_USER_FOLDER = 1;
31  public const MODE_LOCAL_USER = 2;
32 
33  private ?int $mode = null;
34  private int $user_folder_id = 0;
35 
36  private bool $with_write_access = false;
38  protected array $udf_fields = [];
39  protected array $filter = [];
40 
41  public function __construct(
42  object $a_parent_obj,
43  string $a_parent_cmd,
44  int $a_mode = self::MODE_USER_FOLDER,
45  bool $a_load_items = true
46  ) {
48  global $DIC;
49 
50  $this->user_folder_id = $a_parent_obj->getObject()->getRefId();
51 
52  if ($DIC['ilAccess']->checkPositionAccess(ilObjUserFolder::ORG_OP_EDIT_USER_ACCOUNTS, $this->user_folder_id)
53  || $DIC['rbacsystem']->checkAccess('write', $this->user_folder_id)
54  || $DIC['rbacsystem']->checkAccess('cat_administrate_users', $this->user_folder_id)) {
55  $this->with_write_access = true;
56  }
57 
58  $this->setMode($a_mode);
59  $this->setId("user" . $this->getUserFolderId());
61 
62  parent::__construct($a_parent_obj, $a_parent_cmd);
63  // $this->setTitle($this->lng->txt("users"));
64 
65  $this->addColumn("", "", "1", true);
66  $this->addColumn($this->lng->txt("login"), "login");
67 
68  foreach ($this->getSelectedColumns() as $c) {
69  if ($this->isUdfColumn($c)) {
70  $f = $this->getUserDefinedField($c);
71  $this->addColumn($f["txt"], $f["sortable"] ? $c : "");
72  } else { // usual column
73  $this->addColumn($this->lng->txt($c), $c);
74  }
75  }
76 
77  if ($this->getMode() == self::MODE_LOCAL_USER) {
78  $this->addColumn($this->lng->txt('context'), 'time_limit_owner');
79  $this->addColumn($this->lng->txt('role_assignment'));
80  }
81 
82  $this->setShowRowsSelector(true);
83  $this->setExternalSorting(true);
84  $this->setExternalSegmentation(true);
85  $this->setEnableHeader(true);
86 
87  $this->setFormAction($DIC['ilCtrl']->getFormAction($this->parent_obj, "applyFilter"));
88  $this->setRowTemplate("tpl.user_list_row.html", "components/ILIAS/User");
89  //$this->disable("footer");
90  $this->setEnableTitle(true);
91  $this->initFilter();
92  $this->setFilterCommand("applyFilter");
93  $this->setDefaultOrderField("login");
94  $this->setDefaultOrderDirection("asc");
95 
96  $this->setSelectAllCheckbox("id[]");
97  $this->setTopCommands(true);
98 
99  $this->user_request = new UserGUIRequest(
100  $DIC->http(),
101  $DIC->refinery()
102  );
103 
104  if ($this->getMode() == self::MODE_USER_FOLDER) {
105  $this->setEnableAllCommand(true);
106 
107  $cmds = $a_parent_obj->getUserMultiCommands();
108  foreach ($cmds as $cmd => $caption) {
109  $this->addMultiCommand($cmd, $caption);
110  }
111  } else {
112  $this->addMultiCommand("deleteUsers", $DIC['lng']->txt("delete"));
113  }
114 
115  if ($a_load_items) {
116  $this->getItems();
117  }
118  }
119 
120  protected function setMode(int $a_mode): void
121  {
122  $this->mode = $a_mode;
123  }
124 
125  protected function getMode(): int
126  {
127  return $this->mode;
128  }
129 
130  protected function getUserFolderId(): int
131  {
132  return $this->user_folder_id;
133  }
134 
138  public function readUserDefinedFieldsDefinitions(): void
139  {
140  $user_defined_fields = ilUserDefinedFields::_getInstance();
141  foreach ($user_defined_fields->getDefinitions() as $field => $definition) {
142  if ($this->mode === self::MODE_LOCAL_USER
143  && $definition['visib_lua'] === '0') {
144  continue;
145  }
146 
147  $this->udf_fields["udf_" . $field] = [
148  "txt" => $definition["field_name"],
149  "default" => false,
150  "options" => $definition["field_values"],
151  "type" => $definition["field_type"],
152  "sortable" => in_array($definition["field_type"], [UDF_TYPE_TEXT, UDF_TYPE_SELECT])
153  ];
154  }
155  }
156 
160  public function getUserDefinedField(string $a_key): array // Missing array type.
161  {
162  return $this->udf_fields[$a_key] ?? [];
163  }
164 
165  public function isUdfColumn(string $a_key): bool
166  {
167  if (strpos($a_key, "udf_") === 0) {
168  return true;
169  }
170  return false;
171  }
172 
173  public function getSelectableColumns(): array // Missing array type.
174  {
175  global $DIC;
176 
177  $lng = $DIC['lng'];
178 
179  $up = new ilUserProfile();
180  $up->skipGroup("preferences");
181  $up->skipGroup("interests");
182  $up->skipGroup("settings");
183 
184  // default fields
185  $cols = [];
186 
187  // first and last name cannot be hidden
188  $cols["firstname"] = [
189  "txt" => $lng->txt("firstname"),
190  "default" => true];
191  $cols["lastname"] = [
192  "txt" => $lng->txt("lastname"),
193  "default" => true];
194 
195  $cols["access_until"] = [
196  "txt" => $lng->txt("access_until"),
197  "default" => true];
198  $cols["last_login"] = [
199  "txt" => $lng->txt("last_login"),
200  "default" => true];
201 
202  // #13967
203  $cols["create_date"] = [
204  "txt" => $lng->txt("create_date")];
205  $cols["approve_date"] = [
206  "txt" => $lng->txt("approve_date")];
207  $cols["agree_date"] = [
208  "txt" => $lng->txt("agree_date")];
209  $cols['dpro_agreed_on'] = [
210  'txt' => $lng->txt('dpro_agreed_on')];
211  if ($this->getMode() === self::MODE_USER_FOLDER) {
212  $ufs = $up->getStandardFields();
213  } else {
214  $ufs = $up->getLocalUserAdministrationFields();
215  }
216 
217  // email should be the 1st "optional" field (can be hidden)
218  if (isset($ufs["email"])) {
219  $cols["email"] = [
220  "txt" => $lng->txt("email"),
221  "default" => true];
222  }
223  if (isset($ufs["second_email"])) {
224  $cols["second_email"] = [
225  "txt" => $lng->txt("second_email"),
226  "default" => true];
227  }
228  // other user profile fields
229  foreach ($ufs as $f => $fd) {
230  if (!isset($cols[$f]) && (!isset($fd["lists_hide"]) || !$fd["lists_hide"])) {
231  // #18795
232  $caption = $fd["lang_var"] ?? $f;
233  $cols[$f] = [
234  "txt" => $lng->txt($caption),
235  "default" => false];
236  }
237  }
238 
239 
243  $cols["auth_mode"] = [
244  "txt" => $lng->txt("auth_mode"),
245  "default" => false];
246 
247  foreach ($this->udf_fields as $k => $field) {
248  $cols[$k] = $field;
249  }
250 
251  // fields that are always shown
252  unset($cols["username"]);
253 
254  return $cols;
255  }
256 
257  protected function buildUserQuery(): ilUserQuery
258  {
259  $query = new ilUserQuery();
260  $query->setOffset($this->getOffset());
261  $query->setLimit($this->getLimit());
262  $query->setTextFilter($this->filter['query'] ?? '');
263  $query->setActionFilter($this->filter['activation'] ?? '');
264  $query->setLastLogin($this->filter['last_login'] ?? null);
265  $query->setLimitedAccessFilter($this->filter['limited_access'] ?? false);
266  $query->setNoCourseFilter($this->filter['no_courses'] ?? false);
267  $query->setNoGroupFilter($this->filter['no_groups'] ?? false);
268  $query->setCourseGroupFilter($this->filter['course_group'] ?? 0);
269  $query->setRoleFilter((int) ($this->filter['global_role'] ?? 0));
270  $query->setUserFilter($this->filter['user_ids'] ?? []);
271  $query->setFirstLetterLastname($this->user_request->getLetter());
272  $query->setAuthenticationFilter($this->filter['authentication'] ?? '');
273  return $query;
274  }
275 
276  public function getItems(): void
277  {
278  global $DIC;
279 
280  $lng = $DIC['lng'];
281 
282  $this->determineOffsetAndOrder();
283  if ($this->getMode() == self::MODE_USER_FOLDER) {
284  // All accessible users
285  $user_filter = ilLocalUser::_getFolderIds(true);
286  } else {
287  if ($this->filter['time_limit_owner'] ?? null) {
288  $user_filter = [$this->filter['time_limit_owner']];
289  } else {
290  // All accessible users
291  $user_filter = ilLocalUser::_getFolderIds();
292  }
293  }
294 
295 
296 
297  //#13221 don't show all users if user filter is empty!
298  if (!count($user_filter)) {
299  $this->setMaxCount(0);
300  $this->setData([]);
301  return;
302  }
303 
304  if (isset($this->filter['user_ids']) && is_array($this->filter['user_ids']) && $this->filter['user_ids'] === []) {
305  $this->setMaxCount(0);
306  $this->setData([]);
307  return;
308  }
309 
310  $additional_fields = $this->getSelectedColumns();
311  unset(
312  $additional_fields["firstname"],
313  $additional_fields["lastname"],
314  $additional_fields["email"],
315  $additional_fields["second_email"],
316  $additional_fields["last_login"],
317  $additional_fields["access_until"],
318  $additional_fields['org_units']
319  );
320 
321  $udf_filter = [];
322  foreach ($this->filter as $k => $v) {
323  if (strpos($k, "udf_") === 0) {
324  $udf_filter[$k] = $v;
325  }
326  }
327 
328  $query = $this->buildUserQuery();
329  $order_field = $this->getOrderField();
330  if (strpos($order_field, "udf_") !== 0 || isset($additional_fields[$order_field])) {
331  $query->setOrderField($order_field);
332  $query->setOrderDirection($this->getOrderDirection());
333  }
334  $query->setAdditionalFields($additional_fields);
335  $query->setUserFolder($user_filter);
336  $query->setUdfFilter($udf_filter);
337  $usr_data = $query->query();
338 
339  if (count($usr_data['set']) == 0 && $this->getOffset() > 0) {
340  $this->resetOffset();
341  $query->setOffset($this->getOffset());
342  $usr_data = $query->query();
343  }
344 
345  foreach ($usr_data['set'] as $k => $user) {
346  if (in_array('org_units', $this->getSelectedColumns())) {
347  $usr_data['set'][$k]['org_units'] = ilObjUser::lookupOrgUnitsRepresentation($user['usr_id']);
348  }
349 
350 
351  $current_time = time();
352  if ($user['active']) {
353  if ($user['time_limit_unlimited']) {
354  $txt_access = $lng->txt('access_unlimited');
355  $usr_data['set'][$k]['access_class'] = 'smallgreen';
356  } elseif ($user['time_limit_until'] < $current_time) {
357  $txt_access = $lng->txt('access_expired');
358  $usr_data['set'][$k]['access_class'] = 'smallred';
359  } else {
360  $txt_access = ilDatePresentation::formatDate(new ilDateTime($user['time_limit_until'], IL_CAL_UNIX));
361  $usr_data['set'][$k]['access_class'] = 'small';
362  }
363  } else {
364  $txt_access = $lng->txt('inactive');
365  $usr_data['set'][$k]['access_class'] = 'smallred';
366  }
367  $usr_data['set'][$k]['access_until'] = $txt_access;
368  }
369 
370  $this->setMaxCount($usr_data['cnt']);
371  $this->setData($usr_data['set']);
372  }
373 
374  public function addFilterItemValue($filter, $value): void // Missing parameter types.
375  {
376  $this->filter[$filter] = $value;
377  }
378 
379  public function getUserIdsForFilter(): array // Missing array type.
380  {
381  if ($this->getMode() == self::MODE_USER_FOLDER) {
382  // All accessible users
383  $user_filter = ilLocalUser::_getFolderIds(true);
384  } else {
385  if ($this->filter['time_limit_owner']) {
386  $user_filter = [$this->filter['time_limit_owner']];
387  } else {
388  // All accessible users
389  $user_filter = ilLocalUser::_getFolderIds();
390  }
391  }
392 
393  if (!isset($this->filter['user_ids'])) {
394  $this->filter['user_ids'] = null;
395  }
396 
397  $query = $this->buildUserQuery();
398  $query->setUserFolder($user_filter);
399  if ($this->getOrderField()) {
400  $query->setOrderField(ilUtil::stripSlashes($this->getOrderField()));
401  $query->setOrderDirection(ilUtil::stripSlashes($this->getOrderDirection()));
402  }
403  $usr_data = $query->query();
404 
405  $user_ids = [];
406 
407  foreach ($usr_data["set"] as $item) {
408  // #11632
409  if ($item["usr_id"] != SYSTEM_USER_ID) {
410  $user_ids[] = $item["usr_id"];
411  }
412  }
413  return $user_ids;
414  }
415 
416  public function initFilter(): void
417  {
418  global $DIC;
419 
420  $lng = $DIC['lng'];
421  $rbacreview = $DIC['rbacreview'];
422  $ilUser = $DIC['ilUser'];
423  $ilCtrl = $DIC['ilCtrl'];
424 
425 
426  // Show context filter
427  if ($this->getMode() == self::MODE_LOCAL_USER) {
428  $parent_ids = ilLocalUser::_getFolderIds();
429 
430  if (count($parent_ids) > 1) {
431  $co = new ilSelectInputGUI($lng->txt('context'), 'time_limit_owner');
432 
433  $ref_id = $this->getUserFolderId();
434 
435  $opt[0] = $this->lng->txt('all_users');
436  $opt[$this->getUserFolderId()] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($this->getUserFolderId())) . ')';
437 
438  foreach ($parent_ids as $parent_id) {
439  if ($parent_id == $this->getUserFolderId()) {
440  continue;
441  }
442  switch ($parent_id) {
443  case USER_FOLDER_ID:
444  $opt[USER_FOLDER_ID] = $lng->txt('global_user');
445  break;
446 
447  default:
448  $opt[$parent_id] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($parent_id)) . ')';
449  break;
450  }
451  }
452  $co->setOptions($opt);
453  $this->addFilterItem($co);
454  $co->readFromSession();
455  $this->filter['time_limit_owner'] = $co->getValue();
456  }
457  }
458 
459  // User name, login, email filter
460  $ul = new ilTextInputGUI($lng->txt("login") . "/" . $lng->txt("email") . "/" .
461  $lng->txt("name"), "query");
462  $ul->setDataSource($ilCtrl->getLinkTarget(
463  $this->getParentObject(),
464  "addUserAutoComplete",
465  "",
466  true
467  ));
468  $ul->setSize(20);
469  $ul->setSubmitFormOnEnter(true);
470  $this->addFilterItem($ul);
471  $ul->readFromSession();
472  $this->filter["query"] = $ul->getValue();
473 
474 
475  // activation
476  $options = [
477  "" => $lng->txt("user_all"),
478  "active" => $lng->txt("active"),
479  "inactive" => $lng->txt("inactive"),
480  ];
481  $si = new ilSelectInputGUI($this->lng->txt("user_activation"), "activation");
482  $si->setOptions($options);
483  $this->addFilterItem($si);
484  $si->readFromSession();
485  $this->filter["activation"] = $si->getValue();
486 
487  // limited access
488  $cb = new ilCheckboxInputGUI($this->lng->txt("user_limited_access"), "limited_access");
489  $this->addFilterItem($cb);
490  $cb->readFromSession();
491  $this->filter["limited_access"] = $cb->getChecked();
492 
493  // last login
494  $di = new ilDateTimeInputGUI($this->lng->txt("user_last_login_before"), "last_login");
495  $default_date = new ilDateTime(time(), IL_CAL_UNIX);
496  $default_date->increment(IL_CAL_DAY, 1);
497  $di->setDate($default_date);
498  $this->addFilterItem($di);
499  $di->readFromSession();
500  $this->filter["last_login"] = $di->getDate();
501 
502  if ($this->getMode() == self::MODE_USER_FOLDER) {
503  // no assigned courses
504  $cb = new ilCheckboxInputGUI($this->lng->txt("user_no_courses"), "no_courses");
505  $this->addFilterItem($cb);
506  $cb->readFromSession();
507  $this->filter["no_courses"] = $cb->getChecked();
508 
509  // no assigned groups
510  $ng = new ilCheckboxInputGUI($this->lng->txt("user_no_groups"), "no_groups");
511  $this->addFilterItem($ng);
512  $ng->readFromSession();
513  $this->filter['no_groups'] = $ng->getChecked();
514 
515  // course/group members
516  $rs = new ilRepositorySelectorInputGUI($lng->txt("user_member_of_course_group"), "course_group");
517  $rs->setSelectText($lng->txt("user_select_course_group"));
518  $rs->setHeaderMessage($lng->txt("user_please_select_course_group"));
519  $rs->setClickableTypes(["crs", "grp"]);
520  $this->addFilterItem($rs);
521  $rs->readFromSession();
522  $this->filter["course_group"] = $rs->getValue();
523  }
524 
525  // global roles
526  $options = [
527  "" => $lng->txt("user_any"),
528  ];
529  foreach ($rbacreview->getRolesByFilter(2, $ilUser->getId()) as $role) {
530  $options[$role["rol_id"]] = $role["title"];
531  }
532  $si = new ilSelectInputGUI($this->lng->txt("user_global_role"), "global_role");
533  $si->setOptions($options);
534  $this->addFilterItem($si);
535  $si->readFromSession();
536  $this->filter["global_role"] = $si->getValue();
537 
538  // authentication mode
539  $auth_methods = ilAuthUtils::_getActiveAuthModes();
540  $options = [
541  "" => $lng->txt("user_any"),
542  ];
543  foreach ($auth_methods as $method => $value) {
544  if ($method == 'default') {
545  $options[$method] = $this->lng->txt('auth_' . $method) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($value)) . ")";
546  } else {
547  $options[$method] = ilAuthUtils::getAuthModeTranslation((string) $value);
548  }
549  }
550  $si = new ilSelectInputGUI($this->lng->txt("auth_mode"), "authentication_method");
551  $si->setOptions($options);
552  $this->addFilterItem($si);
553  $si->readFromSession();
554  $this->filter["authentication"] = $si->getValue();
555 
556  // udf fields
557  foreach ($this->udf_fields as $id => $f) {
558  $this->addFilterItemByUdfType($id, $f["type"], true, $f["txt"], $f["options"]);
559  }
560  }
561 
565  public function addFilterItemByUdfType(
566  string $id,
567  int $type,
568  bool $a_optional = false,
569  ?string $caption = null,
570  array $a_options = []
571  ): ?ilFormPropertyGUI {
572  global $DIC;
573 
574  $lng = $DIC['lng'];
575 
576  if (!$caption) {
577  $caption = $lng->txt($id);
578  }
579 
580  switch ($type) {
581  case UDF_TYPE_SELECT:
582  $item = new ilSelectInputGUI($caption, $id);
583  $sel_options = ["" => $this->lng->txt("user_all")];
584  foreach ($a_options as $o) {
585  $sel_options[$o] = $o;
586  }
587  $item->setOptions($sel_options);
588  break;
589 
590  case UDF_TYPE_TEXT:
591  $item = new ilTextInputGUI($caption, $id);
592  $item->setMaxLength(64);
593  $item->setSize(20);
594  // $item->setSubmitFormOnEnter(true);
595  break;
596 
597  default:
598  return null;
599  }
600 
601  if ($item) {
602  $this->addFilterItem($item, $a_optional);
603  $item->readFromSession();
604  $this->filter[$id] = $item->getValue();
605  }
606  return $item;
607  }
608 
609  protected function fillRow(array $a_set): void // Missing array type.
610  {
611  global $DIC;
612 
613  $ilCtrl = $DIC['ilCtrl'];
614  $lng = $DIC['lng'];
615 
616  $ilCtrl->setParameterByClass("ilobjusergui", "letter", $this->user_request->getLetter());
617 
618  foreach ($this->getSelectedColumns() as $c) {
619  if ($c == "access_until") {
620  $this->tpl->setCurrentBlock("access_until");
621  $this->tpl->setVariable("VAL_ACCESS_UNTIL", $a_set["access_until"]);
622  $this->tpl->setVariable("CLASS_ACCESS_UNTIL", $a_set["access_class"]);
623  } elseif ($c == "last_login") {
624  $this->tpl->setCurrentBlock("last_login");
625  $this->tpl->setVariable(
626  "VAL_LAST_LOGIN",
627  ilDatePresentation::formatDate(new ilDateTime($a_set['last_login'], IL_CAL_DATETIME))
628  );
629  } elseif (in_array($c, ["firstname", "lastname"])) {
630  $this->tpl->setCurrentBlock($c);
631  $this->tpl->setVariable("VAL_" . strtoupper($c), (string) $a_set[$c]);
632  } elseif ($c == 'auth_mode') {
633  $this->tpl->setCurrentBlock('user_field');
634  $this->tpl->setVariable('VAL_UF', ilAuthUtils::getAuthModeTranslation((string) ilAuthUtils::_getAuthMode($a_set['auth_mode'])));
635  $this->tpl->parseCurrentBlock();
636  } else { // all other fields
637  $this->tpl->setCurrentBlock("user_field");
638  $val = (trim($a_set[$c] ?? '') == "")
639  ? " "
640  : $a_set[$c];
641  if ($a_set[$c] != "") {
642  switch ($c) {
643  case "birthday":
645  break;
646 
647  case "gender":
648  $val = $lng->txt("gender_" . $a_set[$c]);
649  break;
650 
651  case "create_date":
652  case "agree_date":
653  case "approve_date":
654  // $val = ilDatePresentation::formatDate(new ilDateTime($val,IL_CAL_DATETIME));
656  break;
657  case 'dpro_agreed_on':
659  break;
660  }
661  }
662  $this->tpl->setVariable("VAL_UF", $val);
663  }
664 
665  $this->tpl->parseCurrentBlock();
666  }
667 
668  if ($a_set["usr_id"] != 6
669  && ($this->getMode() == self::MODE_USER_FOLDER || $a_set['time_limit_owner'] == $this->getUserFolderId())) {
670  $this->tpl->setCurrentBlock("checkb");
671  $this->tpl->setVariable("ID", $a_set["usr_id"]);
672  $this->tpl->parseCurrentBlock();
673  }
674 
675  if ($this->with_write_access
676  && ($this->getMode() === self::MODE_USER_FOLDER
677  || $a_set['time_limit_owner'] == $this->getUserFolderId())) {
678  $this->tpl->setVariable("VAL_LOGIN", $a_set["login"]);
679  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", $a_set["usr_id"]);
680  $this->tpl->setVariable(
681  "HREF_LOGIN",
682  $ilCtrl->getLinkTargetByClass("ilobjusergui", "view")
683  );
684  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", "");
685  } else {
686  $this->tpl->setVariable('VAL_LOGIN_PLAIN', $a_set['login']);
687  }
688 
689  if ($this->getMode() == self::MODE_LOCAL_USER) {
690  $this->tpl->setCurrentBlock('context');
691  $this->tpl->setVariable(
692  'VAL_CONTEXT',
693  ilObject::_lookupTitle(ilObject::_lookupObjId($a_set['time_limit_owner']))
694  );
695  $this->tpl->parseCurrentBlock();
696 
697  $this->tpl->setCurrentBlock('roles');
698  $ilCtrl->setParameter($this->getParentObject(), 'obj_id', $a_set['usr_id']);
699  $this->tpl->setVariable('ROLE_LINK', $ilCtrl->getLinkTarget($this->getParentObject(), 'assignRoles'));
700  $this->tpl->setVariable('TXT_ROLES', $this->lng->txt('edit'));
701  $ilCtrl->clearParameters($this->getParentObject());
702  $this->tpl->parseCurrentBlock();
703  }
704  }
705 }
setData(array $a_data)
const UDF_TYPE_SELECT
setTopCommands(bool $a_val)
const IL_CAL_DATETIME
const USER_FOLDER_ID
Definition: constants.php:33
static getAuthModeTranslation(string $a_auth_key, string $auth_name='')
static _getAuthMode(?string $a_auth_mode)
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setEnableTitle(bool $a_enabletitle)
UserGUIRequest $user_request
addFilterItemValue($filter, $value)
getUserDefinedField(string $a_key)
Get user defined field.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26
Class ilUserProfile.
addFilterItemByUdfType(string $id, int $type, bool $a_optional=false, ?string $caption=null, array $a_options=[])
Add filter by standard type.
setOptions(array $a_options)
static _getActiveAuthModes()
const IL_CAL_UNIX
$c
Definition: deliver.php:25
static lookupOrgUnitsRepresentation(int $a_usr_id)
lookup org unit representation
static _getAuthModeName($a_auth_key)
ilLanguage $lng
setId(string $a_val)
This class represents a date/time property in a property form.
static _lookupObjId(int $ref_id)
isUdfColumn(string $a_key)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
TableGUI class for user administration.
const IL_CAL_DAY
resetOffset(bool $a_in_determination=false)
setExternalSorting(bool $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
$ref_id
Definition: ltiauth.php:65
readUserDefinedFieldsDefinitions()
Read user defined fields definitions.
static _lookupTitle(int $obj_id)
setDefaultOrderField(string $a_defaultorderfield)
This class represents a repository selector in a property form.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setFilterCommand(string $a_val, string $a_caption="")
global $DIC
Definition: shib_login.php:26
const UDF_TYPE_TEXT
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDefaultOrderDirection(string $a_defaultorderdirection)
setDate(?ilDateTime $a_date=null)
set date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTim...
setEnableAllCommand(bool $a_value)
const IL_CAL_DATE
__construct(Container $dic, ilPlugin $plugin)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=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 _getFolderIds(bool $access_with_orgunit=false)
__construct(?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
addMultiCommand(string $a_cmd, string $a_text)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
setExternalSegmentation(bool $a_val)