ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilUserTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Table/classes/class.ilTable2GUI.php");
5
16{
18 const MODE_LOCAL_USER = 2;
19
20 private $mode = null;
21 private $user_folder_id = 0;
22
26 protected $udf_fields = array();
27
29 protected $filter = array();
30
34 public function __construct($a_parent_obj, $a_parent_cmd, $a_mode = self::MODE_USER_FOLDER, $a_load_items = true)
35 {
36 global $DIC;
37
38 $ilCtrl = $DIC->ctrl();
39 $lng = $DIC->language();
40
41 $this->user_folder_id = $a_parent_obj->object->getRefId();
42
43 if ($DIC['rbacsystem']->checkAccess('write', $this->user_folder_id)
44 || $DIC['rbacsystem']->checkAccess('cat_administrate_users', $this->user_folder_id)) {
45 $this->with_write_access = true;
46 }
47
48 $this->setMode($a_mode);
49 $this->setId("user" . $this->getUserFolderId());
51
52 parent::__construct($a_parent_obj, $a_parent_cmd);
53 // $this->setTitle($this->lng->txt("users"));
54
55 $this->addColumn("", "", "1", true);
56 $this->addColumn($this->lng->txt("login"), "login");
57
58 foreach ($this->getSelectedColumns() as $c) {
59 if ($this->isUdfColumn($c)) {
60 $f = $this->getUserDefinedField($c);
61 $this->addColumn($f["txt"], $f["sortable"] ? $c : "");
62 } else { // usual column
63 $this->addColumn($this->lng->txt($c), $c);
64 }
65 }
66
67 if ($this->getMode() == self::MODE_LOCAL_USER) {
68 $this->addColumn($this->lng->txt('context'), 'time_limit_owner');
69 $this->addColumn($this->lng->txt('role_assignment'));
70 }
71
72 $this->setShowRowsSelector(true);
73 $this->setExternalSorting(true);
74 $this->setExternalSegmentation(true);
75 $this->setEnableHeader(true);
76
77 $this->setFormAction($ilCtrl->getFormAction($this->parent_obj, "applyFilter"));
78 $this->setRowTemplate("tpl.user_list_row.html", "Services/User");
79 $this->setEnableTitle(true);
80 $this->initFilter();
81 $this->setFilterCommand("applyFilter");
82 $this->setDefaultOrderField("login");
83 $this->setDefaultOrderDirection("asc");
84
85 $this->setSelectAllCheckbox("id[]");
86 $this->setTopCommands(true);
87
88
89 if ($this->getMode() == self::MODE_USER_FOLDER) {
90 $this->setEnableAllCommand(true);
91
92 $cmds = $a_parent_obj->getUserMultiCommands();
93 foreach ($cmds as $cmd => $caption) {
94 $this->addMultiCommand($cmd, $caption);
95 }
96 } else {
97 $this->addMultiCommand("deleteUsers", $lng->txt("delete"));
98 }
99
100 if ($a_load_items) {
101 $this->getItems();
102 }
103 }
104
105 protected function setMode($a_mode)
106 {
107 $this->mode = $a_mode;
108 }
109
110 protected function getMode()
111 {
112 return $this->mode;
113 }
114
115 protected function getUserFolderId()
116 {
118 }
119
124 {
125 include_once './Services/User/classes/class.ilUserDefinedFields.php';
126 $user_defined_fields = ilUserDefinedFields::_getInstance();
127 foreach ($user_defined_fields->getDefinitions() as $field => $definition) {
128 $this->udf_fields["udf_" . $field] = array(
129 "txt" => $definition["field_name"],
130 "default" => false,
131 "options" => $definition["field_values"],
132 "type" => $definition["field_type"],
133 "sortable" => in_array($definition["field_type"], array(UDF_TYPE_TEXT, UDF_TYPE_SELECT))
134 );
135 }
136 }
137
143 public function getUserDefinedField($a_key)
144 {
145 if (isset($this->udf_fields[$a_key])) {
146 return $this->udf_fields[$a_key];
147 }
148 return array();
149 }
150
156 public function isUdfColumn($a_key)
157 {
158 if (substr($a_key, 0, 4) == "udf_") {
159 return true;
160 }
161 return false;
162 }
163
164
171 public function getSelectableColumns()
172 {
173 global $DIC;
174
175 $lng = $DIC['lng'];
176
177 include_once("./Services/User/classes/class.ilUserProfile.php");
178 $up = new ilUserProfile();
179 $up->skipGroup("preferences");
180 $up->skipGroup("interests");
181 $up->skipGroup("settings");
182
183 // default fields
184 $cols = array();
185
186 // first and last name cannot be hidden
187 $cols["firstname"] = array(
188 "txt" => $lng->txt("firstname"),
189 "default" => true);
190 $cols["lastname"] = array(
191 "txt" => $lng->txt("lastname"),
192 "default" => true);
193 if ($this->getMode() == self::MODE_USER_FOLDER) {
194 $ufs = $up->getStandardFields();
195
196 $cols["access_until"] = array(
197 "txt" => $lng->txt("access_until"),
198 "default" => true);
199 $cols["last_login"] = array(
200 "txt" => $lng->txt("last_login"),
201 "default" => true);
202
203 // #13967
204 $cols["create_date"] = array(
205 "txt" => $lng->txt("create_date"));
206 $cols["approve_date"] = array(
207 "txt" => $lng->txt("approve_date"));
208 $cols["agree_date"] = array(
209 "txt" => $lng->txt("agree_date"));
210 } else {
211 $ufs = $up->getLocalUserAdministrationFields();
212 }
213
214 // email should be the 1st "optional" field (can be hidden)
215 if (isset($ufs["email"])) {
216 $cols["email"] = array(
217 "txt" => $lng->txt("email"),
218 "default" => true);
219 }
220 if (isset($ufs["second_email"])) {
221 $cols["second_email"] = array(
222 "txt" => $lng->txt("second_email"),
223 "default" => true);
224 }
225 // other user profile fields
226 foreach ($ufs as $f => $fd) {
227 if (!isset($cols[$f]) && !$fd["lists_hide"]) {
228 // #18795
229 $caption = $fd["lang_var"]
230 ? $fd["lang_var"]
231 : $f;
232 $cols[$f] = array(
233 "txt" => $lng->txt($caption),
234 "default" => false);
235 }
236 }
237
238
242 $cols["auth_mode"] = array(
243 "txt" => $lng->txt("auth_mode"),
244 "default" => false);
245
246
247 // custom user fields
248 if ($this->getMode() == self::MODE_USER_FOLDER) {
249 foreach ($this->udf_fields as $k => $field) {
250 $cols[$k] = $field;
251 }
252 }
253
254 // fields that are always shown
255 unset($cols["username"]);
256
257 return $cols;
258 }
259
263 public function getItems()
264 {
265 global $DIC;
266
267 $lng = $DIC['lng'];
268
270 if ($this->getMode() == self::MODE_USER_FOLDER) {
271 // All accessible users
272 include_once './Services/User/classes/class.ilLocalUser.php';
273 $user_filter = ilLocalUser::_getFolderIds(true);
274 } else {
275 if ($this->filter['time_limit_owner']) {
276 $user_filter = array($this->filter['time_limit_owner']);
277 } else {
278 // All accessible users
279 include_once './Services/User/classes/class.ilLocalUser.php';
280 $user_filter = ilLocalUser::_getFolderIds();
281 }
282 }
283
284
285
286 //#13221 don't show all users if user filter is empty!
287 if (!count($user_filter)) {
288 $this->setMaxCount(0);
289 $this->setData([]);
290 return;
291 }
292
293 if (is_array($this->filter['user_ids']) && !count($this->filter['user_ids'])) {
294 $this->setMaxCount(0);
295 $this->setData([]);
296 return;
297 }
298
299 $additional_fields = $this->getSelectedColumns();
300 unset($additional_fields["firstname"]);
301 unset($additional_fields["lastname"]);
302 unset($additional_fields["email"]);
303 unset($additional_fields["second_email"]);
304 unset($additional_fields["last_login"]);
305 unset($additional_fields["access_until"]);
306 unset($additional_fields['org_units']);
307
308 $udf_filter = array();
309 foreach ($this->filter as $k => $v) {
310 if (substr($k, 0, 4) == "udf_") {
311 $udf_filter[$k] = $v;
312 }
313 }
314
315 $query = new ilUserQuery();
316 $order_field = $this->getOrderField();
317 if (substr($order_field, 0, 4) != "udf_" || isset($additional_fields[$order_field])) {
318 $query->setOrderField($order_field);
319 $query->setOrderDirection($this->getOrderDirection());
320 }
321 $query->setOffset($this->getOffset());
322 $query->setLimit($this->getLimit());
323 $query->setTextFilter($this->filter['query']);
324 $query->setActionFilter($this->filter['activation']);
325 $query->setLastLogin($this->filter['last_login']);
326 $query->setLimitedAccessFilter($this->filter['limited_access']);
327 $query->setNoCourseFilter($this->filter['no_courses']);
328 $query->setNoGroupFilter($this->filter['no_groups']);
329 $query->setCourseGroupFilter($this->filter['course_group']);
330 $query->setRoleFilter($this->filter['global_role']);
331 $query->setAdditionalFields($additional_fields);
332 $query->setUserFolder($user_filter);
333 $query->setUserFilter($this->filter['user_ids']);
334 $query->setUdfFilter($udf_filter);
335 $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
336 $query->setAuthenticationFilter($this->filter['authentication']);
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)
375 {
376 $this->filter[$filter] = $value;
377 }
378
379 public function getUserIdsForFilter()
380 {
381 if ($this->getMode() == self::MODE_USER_FOLDER) {
382 // All accessible users
383 include_once './Services/User/classes/class.ilLocalUser.php';
384 $user_filter = ilLocalUser::_getFolderIds(true);
385 } else {
386 if ($this->filter['time_limit_owner']) {
387 $user_filter = array($this->filter['time_limit_owner']);
388 } else {
389 // All accessible users
390 include_once './Services/User/classes/class.ilLocalUser.php';
391 $user_filter = ilLocalUser::_getFolderIds();
392 }
393 }
394
395 if (!isset($this->filter['user_ids'])) {
396 $this->filter['user_ids'] = array();
397 $this->filter['user_ids'] = null;
398 }
399
400 include_once("./Services/User/classes/class.ilUserQuery.php");
401 $query = new ilUserQuery();
402 $query->setOffset($this->getOffset());
403 $query->setLimit($this->getLimit());
404
405 $query->setTextFilter($this->filter['query']);
406 $query->setActionFilter($this->filter['activation']);
407 $query->setAuthenticationFilter($this->filter['authentication']);
408 $query->setLastLogin($this->filter['last_login']);
409 $query->setLimitedAccessFilter($this->filter['limited_access']);
410 $query->setNoCourseFilter($this->filter['no_courses']);
411 $query->setNoGroupFilter($this->filter['no_groups']);
412 $query->setCourseGroupFilter($this->filter['course_group']);
413 $query->setRoleFilter($this->filter['global_role']);
414 $query->setUserFolder($user_filter);
415 $query->setUserFilter($this->filter['user_ids']);
416 $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
417
418 if ($this->getOrderField()) {
419 $query->setOrderField(ilUtil::stripSlashes($this->getOrderField()));
420 $query->setOrderDirection(ilUtil::stripSlashes($this->getOrderDirection()));
421 }
422
423 $usr_data = $query->query();
424 $user_ids = array();
425
426 foreach ($usr_data["set"] as $item) {
427 // #11632
428 if ($item["usr_id"] != SYSTEM_USER_ID) {
429 $user_ids[] = $item["usr_id"];
430 }
431 }
432 return $user_ids;
433 }
434
435
439 public function initFilter()
440 {
441 global $DIC;
442
443 $lng = $DIC['lng'];
444 $rbacreview = $DIC['rbacreview'];
445 $ilUser = $DIC['ilUser'];
446 $ilCtrl = $DIC['ilCtrl'];
447
448
449 // Show context filter
450 if ($this->getMode() == self::MODE_LOCAL_USER) {
451 include_once './Services/User/classes/class.ilLocalUser.php';
452 $parent_ids = ilLocalUser::_getFolderIds();
453
454 if (count($parent_ids) > 1) {
455 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
456 $co = new ilSelectInputGUI($lng->txt('context'), 'time_limit_owner');
457
458 $ref_id = $this->getUserFolderId();
459
460 $opt[0] = $this->lng->txt('all_users');
461 $opt[$this->getUserFolderId()] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($this->getUserFolderId())) . ')';
462
463 foreach ($parent_ids as $parent_id) {
464 if ($parent_id == $this->getUserFolderId()) {
465 continue;
466 }
467 switch ($parent_id) {
468 case USER_FOLDER_ID:
469 $opt[USER_FOLDER_ID] = $lng->txt('global_user');
470 break;
471
472 default:
473 $opt[$parent_id] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($parent_id)) . ')';
474 break;
475 }
476 }
477 $co->setOptions($opt);
478 $this->addFilterItem($co);
479 $co->readFromSession();
480 $this->filter['time_limit_owner'] = $co->getValue();
481 }
482 }
483
484 // User name, login, email filter
485 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
486 $ul = new ilTextInputGUI($lng->txt("login") . "/" . $lng->txt("email") . "/" .
487 $lng->txt("name"), "query");
488 $ul->setDataSource($ilCtrl->getLinkTarget(
489 $this->getParentObject(),
490 "addUserAutoComplete",
491 "",
492 true
493 ));
494 $ul->setSize(20);
495 $ul->setSubmitFormOnEnter(true);
496 $this->addFilterItem($ul);
497 $ul->readFromSession();
498 $this->filter["query"] = $ul->getValue();
499
500 // activation
501 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
502 $options = array(
503 "" => $lng->txt("user_all"),
504 "active" => $lng->txt("active"),
505 "inactive" => $lng->txt("inactive"),
506 );
507 $si = new ilSelectInputGUI($this->lng->txt("user_activation"), "activation");
508 $si->setOptions($options);
509 $this->addFilterItem($si);
510 $si->readFromSession();
511 $this->filter["activation"] = $si->getValue();
512
513 // limited access
514 include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
515 $cb = new ilCheckboxInputGUI($this->lng->txt("user_limited_access"), "limited_access");
516 $this->addFilterItem($cb);
517 $cb->readFromSession();
518 $this->filter["limited_access"] = $cb->getChecked();
519
520 // last login
521 include_once("./Services/Form/classes/class.ilDateTimeInputGUI.php");
522 $di = new ilDateTimeInputGUI($this->lng->txt("user_last_login_before"), "last_login");
523 $default_date = new ilDateTime(time(), IL_CAL_UNIX);
524 $default_date->increment(IL_CAL_DAY, 1);
525 $di->setDate($default_date);
526 $this->addFilterItem($di);
527 $di->readFromSession();
528 $this->filter["last_login"] = $di->getDate();
529
530 if ($this->getMode() == self::MODE_USER_FOLDER) {
531 // no assigned courses
532 include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
533 $cb = new ilCheckboxInputGUI($this->lng->txt("user_no_courses"), "no_courses");
534 $this->addFilterItem($cb);
535 $cb->readFromSession();
536 $this->filter["no_courses"] = $cb->getChecked();
537
538 // no assigned groups
539 include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
540 $ng = new ilCheckboxInputGUI($this->lng->txt("user_no_groups"), "no_groups");
541 $this->addFilterItem($ng);
542 $ng->readFromSession();
543 $this->filter['no_groups'] = $ng->getChecked();
544
545 // course/group members
546 include_once("./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
547 $rs = new ilRepositorySelectorInputGUI($lng->txt("user_member_of_course_group"), "course_group");
548 $rs->setSelectText($lng->txt("user_select_course_group"));
549 $rs->setHeaderMessage($lng->txt("user_please_select_course_group"));
550 $rs->setClickableTypes(array("crs", "grp"));
551 $this->addFilterItem($rs);
552 $rs->readFromSession();
553 $this->filter["course_group"] = $rs->getValue();
554 }
555
556 // global roles
557 $options = array(
558 "" => $lng->txt("user_any"),
559 );
560 $roles = $rbacreview->getRolesByFilter(2, $ilUser->getId());
561 foreach ($roles as $role) {
562 $options[$role["rol_id"]] = $role["title"];
563 }
564 $si = new ilSelectInputGUI($this->lng->txt("user_global_role"), "global_role");
565 $si->setOptions($options);
566 $this->addFilterItem($si);
567 $si->readFromSession();
568 $this->filter["global_role"] = $si->getValue();
569
570 // authentication mode
571 $auth_methods = ilAuthUtils::_getActiveAuthModes();
572 $options = array(
573 "" => $lng->txt("user_any"),
574 );
575 foreach ($auth_methods as $method => $value) {
576 if ($method == 'default') {
577 $options[$method] = $this->lng->txt('auth_' . $method) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($value)) . ")";
578 } else {
579 $options[$method] = ilAuthUtils::getAuthModeTranslation($value);
580 }
581 }
582 $si = new ilSelectInputGUI($this->lng->txt("auth_mode"), "authentication_method");
583 $si->setOptions($options);
584 $this->addFilterItem($si);
585 $si->readFromSession();
586 $this->filter["authentication"] = $si->getValue();
587
588 // udf fields
589 foreach ($this->udf_fields as $id => $f) {
590 $this->addFilterItemByUdfType($id, $f["type"], true, $f["txt"], $f["options"]);
591 }
592 }
593
603 public function addFilterItemByUdfType($id, $type, $a_optional = false, $caption = null, $a_options = array())
604 {
605 global $DIC;
606
607 $lng = $DIC['lng'];
608
609 if (!$caption) {
610 $caption = $lng->txt($id);
611 }
612
613 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
614
615 switch ($type) {
616 case UDF_TYPE_SELECT:
617 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
618 $item = new ilSelectInputGUI($caption, $id);
619 $sel_options = array("" => $this->lng->txt("user_all"));
620 foreach ($a_options as $o) {
621 $sel_options[$o] = $o;
622 }
623 $item->setOptions($sel_options);
624 break;
625
626 case UDF_TYPE_TEXT:
627 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
628 $item = new ilTextInputGUI($caption, $id);
629 $item->setMaxLength(64);
630 $item->setSize(20);
631 // $item->setSubmitFormOnEnter(true);
632 break;
633
634 default:
635 return null;
636 }
637
638 if ($item) {
639 $this->addFilterItem($item, $a_optional);
640 $item->readFromSession();
641 $this->filter[$id] = $item->getValue();
642 }
643 return $item;
644 }
645
649 protected function fillRow($user)
650 {
651 global $DIC;
652
653 $ilCtrl = $DIC['ilCtrl'];
654 $lng = $DIC['lng'];
655
656 $ilCtrl->setParameterByClass("ilobjusergui", "letter", $_GET["letter"]);
657
658 foreach ($this->getSelectedColumns() as $c) {
659 if ($c == "access_until") {
660 $this->tpl->setCurrentBlock("access_until");
661 $this->tpl->setVariable("VAL_ACCESS_UNTIL", $user["access_until"]);
662 $this->tpl->setVariable("CLASS_ACCESS_UNTIL", $user["access_class"]);
663 } elseif ($c == "last_login") {
664 $this->tpl->setCurrentBlock("last_login");
665 $this->tpl->setVariable(
666 "VAL_LAST_LOGIN",
668 );
669 } elseif (in_array($c, array("firstname", "lastname"))) {
670 $this->tpl->setCurrentBlock($c);
671 $this->tpl->setVariable("VAL_" . strtoupper($c), (string) $user[$c]);
672 } elseif ($c == 'auth_mode') {
673 $this->tpl->setCurrentBlock('user_field');
674 $this->tpl->setVariable('VAL_UF', ilAuthUtils::getAuthModeTranslation(ilAuthUtils::_getAuthMode($user['auth_mode'])));
675 $this->tpl->parseCurrentBlock();
676 } else { // all other fields
677 $this->tpl->setCurrentBlock("user_field");
678 $val = (trim($user[$c]) == "")
679 ? " "
680 : $user[$c];
681 if ($user[$c] != "") {
682 switch ($c) {
683 case "birthday":
685 break;
686
687 case "gender":
688 $val = $lng->txt("gender_" . $user[$c]);
689 break;
690
691 case "create_date":
692 case "agree_date":
693 case "approve_date":
694 // $val = ilDatePresentation::formatDate(new ilDateTime($val,IL_CAL_DATETIME));
696 break;
697 }
698 }
699 $this->tpl->setVariable("VAL_UF", $val);
700 }
701
702 $this->tpl->parseCurrentBlock();
703 }
704
705 if ($user["usr_id"] != 6
706 && ($this->getMode() == self::MODE_USER_FOLDER || $user['time_limit_owner'] == $this->getUserFolderId())) {
707 $this->tpl->setCurrentBlock("checkb");
708 $this->tpl->setVariable("ID", $user["usr_id"]);
709 $this->tpl->parseCurrentBlock();
710 }
711
712 if ($this->with_write_access
713 && ($this->getMode() == self::MODE_USER_FOLDER
714 || $user['time_limit_owner'] == $this->getUserFolderId())) {
715 $this->tpl->setVariable("VAL_LOGIN", $user["login"]);
716 $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", $user["usr_id"]);
717 $this->tpl->setVariable(
718 "HREF_LOGIN",
719 $ilCtrl->getLinkTargetByClass("ilobjusergui", "view")
720 );
721 $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", "");
722 } else {
723 $this->tpl->setVariable('VAL_LOGIN_PLAIN', $user['login']);
724 }
725
726 if ($this->getMode() == self::MODE_LOCAL_USER) {
727 $this->tpl->setCurrentBlock('context');
728 $this->tpl->setVariable('VAL_CONTEXT', (string) ilObject::_lookupTitle(ilObject::_lookupObjId($user['time_limit_owner'])));
729 $this->tpl->parseCurrentBlock();
730
731 $this->tpl->setCurrentBlock('roles');
732 $ilCtrl->setParameter($this->getParentObject(), 'obj_id', $user['usr_id']);
733 $this->tpl->setVariable('ROLE_LINK', $ilCtrl->getLinkTarget($this->getParentObject(), 'assignRoles'));
734 $this->tpl->setVariable('TXT_ROLES', $this->lng->txt('edit'));
735 $ilCtrl->clearParameters($this->getParentObject());
736 $this->tpl->parseCurrentBlock();
737 }
738 }
739}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_DATE
const IL_CAL_UNIX
const IL_CAL_DATETIME
const IL_CAL_DAY
const UDF_TYPE_SELECT
const UDF_TYPE_TEXT
static getAuthModeTranslation($a_auth_key, $auth_name='')
static _getAuthMode($a_auth_mode, $a_db_handler='')
static _getActiveAuthModes()
static _getAuthModeName($a_auth_key)
This class represents a checkbox property in a property form.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
This class represents a date/time property in a property form.
@classDescription Date and time handling
Class for single dates.
static _getFolderIds($access_with_orgunit=false)
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
This class represents a repository selector in a property form.
This class represents a selection list property in a property form.
Class ilTable2GUI.
getSelectedColumns()
Get selected columns.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setEnableHeader($a_enableheader)
Set Enable Header.
setExternalSorting($a_val)
Set external sorting.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
getParentObject()
Get parent object.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
getLimit()
Get limit.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
resetOffset($a_in_determination=false)
Reset offset.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
getOffset()
Get offset.
setExternalSegmentation($a_val)
Set external segmentation.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
getOrderDirection()
Get order direction.
setMaxCount($a_max_count)
set max.
This class represents a text property in a property form.
static _getInstance()
Get instance.
Class ilUserProfile.
User query class.
TableGUI class for user administration.
readUserDefinedFieldsDefinitions()
Read user defined fields definitions.
getUserDefinedField($a_key)
Get user defined field.
addFilterItemByUdfType($id, $type, $a_optional=false, $caption=null, $a_options=array())
Add filter by standard type.
initFilter()
Init filter.
__construct($a_parent_obj, $a_parent_cmd, $a_mode=self::MODE_USER_FOLDER, $a_load_items=true)
Constructor.
addFilterItemValue($filter, $value)
getSelectableColumns()
Get selectable columns.
getItems()
Get user items.
fillRow($user)
Fill table row.
isUdfColumn($a_key)
Field key.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$c
Definition: cli.php:37
const USER_FOLDER_ID
Definition: constants.php:31
const SYSTEM_USER_ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: constants.php:24
filter()
Definition: filter.php:2
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$query
$type
$cols
Definition: xhr_table.php:11