ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 
16 {
17  const MODE_USER_FOLDER = 1;
18  const MODE_LOCAL_USER = 2;
19 
20  private $mode = null;
21  private $user_folder_id = 0;
22 
26  protected $udf_fields = array();
27 
31  public function __construct($a_parent_obj, $a_parent_cmd, $a_mode = self::MODE_USER_FOLDER, $a_load_items = true)
32  {
33  global $DIC;
34 
35  $ilCtrl = $DIC['ilCtrl'];
36  $lng = $DIC['lng'];
37  $ilAccess = $DIC['ilAccess'];
38  $lng = $DIC['lng'];
39  $rbacsystem = $DIC['rbacsystem'];
40 
41  $this->user_folder_id = $a_parent_obj->object->getRefId();
42 
43  $this->setMode($a_mode);
44  $this->setId("user" . $this->getUserFolderId());
46 
47  parent::__construct($a_parent_obj, $a_parent_cmd);
48  // $this->setTitle($this->lng->txt("users"));
49 
50  $this->addColumn("", "", "1", true);
51  $this->addColumn($this->lng->txt("login"), "login");
52 
53  foreach ($this->getSelectedColumns() as $c) {
54  if ($this->isUdfColumn($c)) {
55  $f = $this->getUserDefinedField($c);
56  $this->addColumn($f["txt"], $f["sortable"] ? $c : "");
57  } else { // usual column
58  $this->addColumn($this->lng->txt($c), $c);
59  }
60  }
61 
62  if ($this->getMode() == self::MODE_LOCAL_USER) {
63  $this->addColumn($this->lng->txt('context'), 'time_limit_owner');
64  $this->addColumn($this->lng->txt('role_assignment'));
65  }
66 
67  $this->setShowRowsSelector(true);
68  $this->setExternalSorting(true);
69  $this->setExternalSegmentation(true);
70  $this->setEnableHeader(true);
71 
72  $this->setFormAction($ilCtrl->getFormAction($this->parent_obj, "applyFilter"));
73  $this->setRowTemplate("tpl.user_list_row.html", "Services/User");
74  //$this->disable("footer");
75  $this->setEnableTitle(true);
76  $this->initFilter();
77  $this->setFilterCommand("applyFilter");
78  $this->setDefaultOrderField("login");
79  $this->setDefaultOrderDirection("asc");
80 
81  $this->setSelectAllCheckbox("id[]");
82  $this->setTopCommands(true);
83 
84 
85  if ($this->getMode() == self::MODE_USER_FOLDER) {
86  $this->setEnableAllCommand(true);
87 
88  $cmds = $a_parent_obj->getUserMultiCommands();
89  foreach ($cmds as $cmd => $caption) {
90  $this->addMultiCommand($cmd, $caption);
91  }
92  } else {
93  $this->addMultiCommand("deleteUsers", $lng->txt("delete"));
94  }
95 
96  if ($a_load_items) {
97  $this->getItems();
98  }
99  }
100 
101  protected function setMode($a_mode)
102  {
103  $this->mode = $a_mode;
104  }
105 
106  protected function getMode()
107  {
108  return $this->mode;
109  }
110 
111  protected function getUserFolderId()
112  {
113  return $this->user_folder_id;
114  }
115 
120  {
121  include_once './Services/User/classes/class.ilUserDefinedFields.php';
122  $user_defined_fields = ilUserDefinedFields::_getInstance();
123  foreach ($user_defined_fields->getDefinitions() as $field => $definition) {
124  $this->udf_fields["udf_" . $field] = array(
125  "txt" => $definition["field_name"],
126  "default" => false,
127  "options" => $definition["field_values"],
128  "type" => $definition["field_type"],
129  "sortable" => in_array($definition["field_type"], array(UDF_TYPE_TEXT, UDF_TYPE_SELECT))
130  );
131  }
132  }
133 
139  public function getUserDefinedField($a_key)
140  {
141  if (isset($this->udf_fields[$a_key])) {
142  return $this->udf_fields[$a_key];
143  }
144  return array();
145  }
146 
152  public function isUdfColumn($a_key)
153  {
154  if (substr($a_key, 0, 4) == "udf_") {
155  return true;
156  }
157  return false;
158  }
159 
160 
167  public function getSelectableColumns()
168  {
169  global $DIC;
170 
171  $lng = $DIC['lng'];
172 
173  include_once("./Services/User/classes/class.ilUserProfile.php");
174  $up = new ilUserProfile();
175  $up->skipGroup("preferences");
176  $up->skipGroup("interests");
177  $up->skipGroup("settings");
178 
179  // default fields
180  $cols = array();
181 
182  // first and last name cannot be hidden
183  $cols["firstname"] = array(
184  "txt" => $lng->txt("firstname"),
185  "default" => true);
186  $cols["lastname"] = array(
187  "txt" => $lng->txt("lastname"),
188  "default" => true);
189  if ($this->getMode() == self::MODE_USER_FOLDER) {
190  $ufs = $up->getStandardFields();
191 
192  $cols["access_until"] = array(
193  "txt" => $lng->txt("access_until"),
194  "default" => true);
195  $cols["last_login"] = array(
196  "txt" => $lng->txt("last_login"),
197  "default" => true);
198 
199  // #13967
200  $cols["create_date"] = array(
201  "txt" => $lng->txt("create_date"));
202  $cols["approve_date"] = array(
203  "txt" => $lng->txt("approve_date"));
204  $cols["agree_date"] = array(
205  "txt" => $lng->txt("agree_date"));
206  } else {
207  $ufs = $up->getLocalUserAdministrationFields();
208  }
209 
210  // email should be the 1st "optional" field (can be hidden)
211  if (isset($ufs["email"])) {
212  $cols["email"] = array(
213  "txt" => $lng->txt("email"),
214  "default" => true);
215  }
216  if (isset($ufs["second_email"])) {
217  $cols["second_email"] = array(
218  "txt" => $lng->txt("second_email"),
219  "default" => true);
220  }
221  // other user profile fields
222  foreach ($ufs as $f => $fd) {
223  if (!isset($cols[$f]) && !$fd["lists_hide"]) {
224  // #18795
225  $caption = $fd["lang_var"]
226  ? $fd["lang_var"]
227  : $f;
228  $cols[$f] = array(
229  "txt" => $lng->txt($caption),
230  "default" => false);
231  }
232  }
233 
234 
238  $cols["auth_mode"] = array(
239  "txt" => $lng->txt("auth_mode"),
240  "default" => false);
241 
242 
243  // custom user fields
244  if ($this->getMode() == self::MODE_USER_FOLDER) {
245  foreach ($this->udf_fields as $k => $field) {
246  $cols[$k] = $field;
247  }
248  }
249 
250  // fields that are always shown
251  unset($cols["username"]);
252 
253  return $cols;
254  }
255 
259  public function getItems()
260  {
261  global $DIC;
262 
263  $lng = $DIC['lng'];
264 
265  $this->determineOffsetAndOrder();
266  if ($this->getMode() == self::MODE_USER_FOLDER) {
267  // All accessible users
268  include_once './Services/User/classes/class.ilLocalUser.php';
269  $user_filter = ilLocalUser::_getFolderIds();
270  } else {
271  if ($this->filter['time_limit_owner']) {
272  $user_filter = array($this->filter['time_limit_owner']);
273  } else {
274  // All accessible users
275  include_once './Services/User/classes/class.ilLocalUser.php';
276  $user_filter = ilLocalUser::_getFolderIds();
277  }
278  }
279 
280  //#13221 don't show all users if user filter is empty!
281  if (!count($user_filter)) {
282  $this->setMaxCount(0);
283  $this->setData(array());
284  return;
285  }
286 
287  include_once("./Services/User/classes/class.ilUserQuery.php");
288 
289  $additional_fields = $this->getSelectedColumns();
290  unset($additional_fields["firstname"]);
291  unset($additional_fields["lastname"]);
292  unset($additional_fields["email"]);
293  unset($additional_fields["second_email"]);
294  unset($additional_fields["last_login"]);
295  unset($additional_fields["access_until"]);
296  unset($additional_fields['org_units']);
297 
298  $udf_filter = array();
299  foreach ($this->filter as $k => $v) {
300  if (substr($k, 0, 4) == "udf_") {
301  $udf_filter[$k] = $v;
302  }
303  }
304 
305  $query = new ilUserQuery();
306  $query->setOrderField($this->getOrderField());
307  $query->setOrderDirection($this->getOrderDirection());
308  $query->setOffset($this->getOffset());
309  $query->setLimit($this->getLimit());
310  $query->setTextFilter($this->filter['query']);
311  $query->setActionFilter($this->filter['activation']);
312  $query->setLastLogin($this->filter['last_login']);
313  $query->setLimitedAccessFilter($this->filter['limited_access']);
314  $query->setNoCourseFilter($this->filter['no_courses']);
315  $query->setNoGroupFilter($this->filter['no_groups']);
316  $query->setCourseGroupFilter($this->filter['course_group']);
317  $query->setRoleFilter($this->filter['global_role']);
318  $query->setAdditionalFields($additional_fields);
319  $query->setUserFolder($user_filter);
320  $query->setUdfFilter($udf_filter);
321  $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
322  $query->setAuthenticationFilter($this->filter['authentication']);
323  $usr_data = $query->query();
324 
325  if (count($usr_data["set"]) == 0 && $this->getOffset() > 0) {
326  $this->resetOffset();
327  $query->setOffset($this->getOffset());
328  $usr_data = $query->query();
329  }
330 
331  foreach ($usr_data["set"] as $k => $user) {
332  if (in_array('org_units', $this->getSelectedColumns())) {
333  $usr_data['set'][$k]['org_units'] = ilObjUser::lookupOrgUnitsRepresentation($user['usr_id']);
334  }
335 
336 
337  $current_time = time();
338  if ($user['active']) {
339  if ($user["time_limit_unlimited"]) {
340  $txt_access = $lng->txt("access_unlimited");
341  $usr_data["set"][$k]["access_class"] = "smallgreen";
342  } elseif ($user["time_limit_until"] < $current_time) {
343  $txt_access = $lng->txt("access_expired");
344  $usr_data["set"][$k]["access_class"] = "smallred";
345  } else {
346  $txt_access = ilDatePresentation::formatDate(new ilDateTime($user["time_limit_until"], IL_CAL_UNIX));
347  $usr_data["set"][$k]["access_class"] = "small";
348  }
349  } else {
350  $txt_access = $lng->txt("inactive");
351  $usr_data["set"][$k]["access_class"] = "smallred";
352  }
353  $usr_data["set"][$k]["access_until"] = $txt_access;
354  }
355 
356  $this->setMaxCount($usr_data["cnt"]);
357  $this->setData($usr_data["set"]);
358  }
359 
360  public function getUserIdsForFilter()
361  {
362  if ($this->getMode() == self::MODE_USER_FOLDER) {
363  // All accessible users
364  include_once './Services/User/classes/class.ilLocalUser.php';
365  $user_filter = ilLocalUser::_getFolderIds();
366  } else {
367  if ($this->filter['time_limit_owner']) {
368  $user_filter = array($this->filter['time_limit_owner']);
369  } else {
370  // All accessible users
371  include_once './Services/User/classes/class.ilLocalUser.php';
372  $user_filter = ilLocalUser::_getFolderIds();
373  }
374  }
375 
376  include_once("./Services/User/classes/class.ilUserQuery.php");
377  $query = new ilUserQuery();
378  $query->setOffset($this->getOffset());
379  $query->setLimit($this->getLimit());
380 
381  $query->setTextFilter($this->filter['query']);
382  $query->setActionFilter($this->filter['activation']);
383  $query->setAuthenticationFilter($this->filter['authentication']);
384  $query->setLastLogin($this->filter['last_login']);
385  $query->setLimitedAccessFilter($this->filter['limited_access']);
386  $query->setNoCourseFilter($this->filter['no_courses']);
387  $query->setNoGroupFilter($this->filter['no_groups']);
388  $query->setCourseGroupFilter($this->filter['course_group']);
389  $query->setRoleFilter($this->filter['global_role']);
390  $query->setUserFolder($user_filter);
391  $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
392 
393  if ($this->getOrderField()) {
394  $query->setOrderField(ilUtil::stripSlashes($this->getOrderField()));
395  $query->setOrderDirection(ilUtil::stripSlashes($this->getOrderDirection()));
396  }
397 
398  $usr_data = $query->query();
399  $user_ids = array();
400 
401  foreach ($usr_data["set"] as $item) {
402  // #11632
403  if ($item["usr_id"] != SYSTEM_USER_ID) {
404  $user_ids[] = $item["usr_id"];
405  }
406  }
407  return $user_ids;
408  }
409 
410 
414  public function initFilter()
415  {
416  global $DIC;
417 
418  $lng = $DIC['lng'];
419  $rbacreview = $DIC['rbacreview'];
420  $ilUser = $DIC['ilUser'];
421  $ilCtrl = $DIC['ilCtrl'];
422 
423 
424  // Show context filter
425  if ($this->getMode() == self::MODE_LOCAL_USER) {
426  include_once './Services/User/classes/class.ilLocalUser.php';
427  $parent_ids = ilLocalUser::_getFolderIds();
428 
429  if (count($parent_ids) > 1) {
430  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
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  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
461  $ul = new ilTextInputGUI($lng->txt("login") . "/" . $lng->txt("email") . "/" .
462  $lng->txt("name"), "query");
463  $ul->setDataSource($ilCtrl->getLinkTarget(
464  $this->getParentObject(),
465  "addUserAutoComplete",
466  "",
467  true
468  ));
469  $ul->setSize(20);
470  $ul->setSubmitFormOnEnter(true);
471  $this->addFilterItem($ul);
472  $ul->readFromSession();
473  $this->filter["query"] = $ul->getValue();
474 
475  /*
476  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
477  $ti = new ilTextInputGUI($lng->txt("login")."/".$lng->txt("email")."/".$lng->txt("name"), "query");
478  $ti->setMaxLength(64);
479  $ti->setSize(20);
480  $ti->setSubmitFormOnEnter(true);
481  $this->addFilterItem($ti);
482  $ti->readFromSession();
483  $this->filter["query"] = $ti->getValue();
484  */
485 
486  // activation
487  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
488  $options = array(
489  "" => $lng->txt("user_all"),
490  "active" => $lng->txt("active"),
491  "inactive" => $lng->txt("inactive"),
492  );
493  $si = new ilSelectInputGUI($this->lng->txt("user_activation"), "activation");
494  $si->setOptions($options);
495  $this->addFilterItem($si);
496  $si->readFromSession();
497  $this->filter["activation"] = $si->getValue();
498 
499  // limited access
500  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
501  $cb = new ilCheckboxInputGUI($this->lng->txt("user_limited_access"), "limited_access");
502  $this->addFilterItem($cb);
503  $cb->readFromSession();
504  $this->filter["limited_access"] = $cb->getChecked();
505 
506  // last login
507  include_once("./Services/Form/classes/class.ilDateTimeInputGUI.php");
508  $di = new ilDateTimeInputGUI($this->lng->txt("user_last_login_before"), "last_login");
509  $default_date = new ilDateTime(time(), IL_CAL_UNIX);
510  $default_date->increment(IL_CAL_DAY, 1);
511  $di->setDate($default_date);
512  $this->addFilterItem($di);
513  $di->readFromSession();
514  $this->filter["last_login"] = $di->getDate();
515 
516  if ($this->getMode() == self::MODE_USER_FOLDER) {
517  // no assigned courses
518  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
519  $cb = new ilCheckboxInputGUI($this->lng->txt("user_no_courses"), "no_courses");
520  $this->addFilterItem($cb);
521  $cb->readFromSession();
522  $this->filter["no_courses"] = $cb->getChecked();
523 
524  // no assigned groups
525  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
526  $ng = new ilCheckboxInputGUI($this->lng->txt("user_no_groups"), "no_groups");
527  $this->addFilterItem($ng);
528  $ng->readFromSession();
529  $this->filter['no_groups'] = $ng->getChecked();
530 
531  // course/group members
532  include_once("./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
533  $rs = new ilRepositorySelectorInputGUI($lng->txt("user_member_of_course_group"), "course_group");
534  $rs->setSelectText($lng->txt("user_select_course_group"));
535  $rs->setHeaderMessage($lng->txt("user_please_select_course_group"));
536  $rs->setClickableTypes(array("crs", "grp"));
537  $this->addFilterItem($rs);
538  $rs->readFromSession();
539  $this->filter["course_group"] = $rs->getValue();
540  }
541 
542  // global roles
543  $options = array(
544  "" => $lng->txt("user_any"),
545  );
546  $roles = $rbacreview->getRolesByFilter(2, $ilUser->getId());
547  foreach ($roles as $role) {
548  $options[$role["rol_id"]] = $role["title"];
549  }
550  $si = new ilSelectInputGUI($this->lng->txt("user_global_role"), "global_role");
551  $si->setOptions($options);
552  $this->addFilterItem($si);
553  $si->readFromSession();
554  $this->filter["global_role"] = $si->getValue();
555 
556  // authentication mode
557  $auth_methods = ilAuthUtils::_getActiveAuthModes();
558  $options = array(
559  "" => $lng->txt("user_any"),
560  );
561  foreach ($auth_methods as $method => $value) {
562  if ($method == 'default') {
563  $options[$method] = $this->lng->txt('auth_' . $method) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($value)) . ")";
564  } else {
566  }
567  }
568  $si = new ilSelectInputGUI($this->lng->txt("auth_mode"), "authentication_method");
569  $si->setOptions($options);
570  $this->addFilterItem($si);
571  $si->readFromSession();
572  $this->filter["authentication"] = $si->getValue();
573 
574  // udf fields
575  foreach ($this->udf_fields as $id => $f) {
576  $this->addFilterItemByUdfType($id, $f["type"], true, $f["txt"], $f["options"]);
577  }
578  }
579 
589  public function addFilterItemByUdfType($id, $type, $a_optional = false, $caption = null, $a_options = array())
590  {
591  global $DIC;
592 
593  $lng = $DIC['lng'];
594 
595  if (!$caption) {
596  $caption = $lng->txt($id);
597  }
598 
599  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
600 
601  switch ($type) {
602  case UDF_TYPE_SELECT:
603  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
604  $item = new ilSelectInputGUI($caption, $id);
605  $sel_options = array("" => $this->lng->txt("user_all"));
606  foreach ($a_options as $o) {
607  $sel_options[$o] = $o;
608  }
609  $item->setOptions($sel_options);
610  break;
611 
612  case UDF_TYPE_TEXT:
613  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
614  $item = new ilTextInputGUI($caption, $id);
615  $item->setMaxLength(64);
616  $item->setSize(20);
617  // $item->setSubmitFormOnEnter(true);
618  break;
619 
620  default:
621  return null;
622  }
623 
624  if ($item) {
625  $this->addFilterItem($item, $a_optional);
626  $item->readFromSession();
627  $this->filter[$id] = $item->getValue();
628  }
629  return $item;
630  }
631 
635  protected function fillRow($user)
636  {
637  global $DIC;
638 
639  $ilCtrl = $DIC['ilCtrl'];
640  $lng = $DIC['lng'];
641 
642  $ilCtrl->setParameterByClass("ilobjusergui", "letter", $_GET["letter"]);
643 
644  foreach ($this->getSelectedColumns() as $c) {
645  if ($c == "access_until") {
646  $this->tpl->setCurrentBlock("access_until");
647  $this->tpl->setVariable("VAL_ACCESS_UNTIL", $user["access_until"]);
648  $this->tpl->setVariable("CLASS_ACCESS_UNTIL", $user["access_class"]);
649  } elseif ($c == "last_login") {
650  $this->tpl->setCurrentBlock("last_login");
651  $this->tpl->setVariable(
652  "VAL_LAST_LOGIN",
654  );
655  } elseif (in_array($c, array("firstname", "lastname"))) {
656  $this->tpl->setCurrentBlock($c);
657  $this->tpl->setVariable("VAL_" . strtoupper($c), (string) $user[$c]);
658  } elseif ($c == 'auth_mode') {
659  $this->tpl->setCurrentBlock('user_field');
660  $this->tpl->setVariable('VAL_UF', ilAuthUtils::getAuthModeTranslation(ilAuthUtils::_getAuthMode($user['auth_mode'])));
661  $this->tpl->parseCurrentBlock();
662  } else { // all other fields
663  $this->tpl->setCurrentBlock("user_field");
664  $val = (trim($user[$c]) == "")
665  ? " "
666  : $user[$c];
667  if ($user[$c] != "") {
668  switch ($c) {
669  case "birthday":
671  break;
672 
673  case "gender":
674  $val = $lng->txt("gender_" . $user[$c]);
675  break;
676 
677  case "create_date":
678  case "agree_date":
679  case "approve_date":
680  // $val = ilDatePresentation::formatDate(new ilDateTime($val,IL_CAL_DATETIME));
682  break;
683  }
684  }
685  $this->tpl->setVariable("VAL_UF", $val);
686  }
687 
688  $this->tpl->parseCurrentBlock();
689  }
690 
691  if ($user["usr_id"] != 6) {
692  if ($this->getMode() == self::MODE_USER_FOLDER or $user['time_limit_owner'] == $this->getUserFolderId()) {
693  $this->tpl->setCurrentBlock("checkb");
694  $this->tpl->setVariable("ID", $user["usr_id"]);
695  $this->tpl->parseCurrentBlock();
696  }
697  }
698 
699  if ($this->getMode() == self::MODE_USER_FOLDER or $user['time_limit_owner'] == $this->getUserFolderId()) {
700  $this->tpl->setVariable("VAL_LOGIN", $user["login"]);
701  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", $user["usr_id"]);
702  $this->tpl->setVariable(
703  "HREF_LOGIN",
704  $ilCtrl->getLinkTargetByClass("ilobjusergui", "view")
705  );
706  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", "");
707  } else {
708  $this->tpl->setVariable('VAL_LOGIN_PLAIN', $user['login']);
709  }
710 
711  if ($this->getMode() == self::MODE_LOCAL_USER) {
712  $this->tpl->setCurrentBlock('context');
713  $this->tpl->setVariable('VAL_CONTEXT', (string) ilObject::_lookupTitle(ilObject::_lookupObjId($user['time_limit_owner'])));
714  $this->tpl->parseCurrentBlock();
715 
716  $this->tpl->setCurrentBlock('roles');
717  $ilCtrl->setParameter($this->getParentObject(), 'obj_id', $user['usr_id']);
718  $this->tpl->setVariable('ROLE_LINK', $ilCtrl->getLinkTarget($this->getParentObject(), 'assignRoles'));
719  $this->tpl->setVariable('TXT_ROLES', $this->lng->txt('edit'));
720  $ilCtrl->clearParameters($this->getParentObject());
721  $this->tpl->parseCurrentBlock();
722  }
723  }
724 }
const UDF_TYPE_SELECT
getUserDefinedField($a_key)
Get user defined field.
setExternalSorting($a_val)
Set external sorting.
setDataSource($href, $a_delimiter=null)
set datasource link for js autocomplete
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
User query class.
const IL_CAL_DATETIME
static _getInstance()
Get instance.
This class represents a selection list property in a property form.
$type
global $DIC
Definition: saml.php:7
$_GET["client_id"]
setExternalSegmentation($a_val)
Set external segmentation.
resetOffset($a_in_determination=false)
Reset offset.
if(!array_key_exists('StateId', $_REQUEST)) $id
Class ilUserProfile.
getSelectableColumns()
Get selectable columns.
This class represents a checkbox property in a property form.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
static _lookupTitle($a_id)
lookup object title
static _getActiveAuthModes()
static getAuthModeTranslation($a_auth_key, $auth_name='')
const IL_CAL_UNIX
getOrderDirection()
Get order direction.
static _getAuthMode($a_auth_mode, $a_db_handler='')
static _getAuthModeName($a_auth_key)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
getParentObject()
Get parent object.
setId($a_val)
Set id.
This class represents a date/time property in a property form.
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation
TableGUI class for user administration.
const IL_CAL_DAY
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
Class ilTable2GUI.
readUserDefinedFieldsDefinitions()
Read user defined fields definitions.
Class for single dates.
initFilter()
Init filter.
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.
getOffset()
Get offset.
This class represents a repository selector in a property form.
static _lookupObjId($a_id)
addMultiCommand($a_cmd, $a_text)
Add Command button.
const UDF_TYPE_TEXT
This class represents a text property in a property form.
setDate(ilDateTime $a_date=null)
set date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTim...
Date and time handling
$ilUser
Definition: imgupload.php:18
getSelectedColumns()
Get selected columns.
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setOptions($a_options)
Set Options.
$user
Definition: migrateto20.php:57
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
isUdfColumn($a_key)
Field key.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
const IL_CAL_DATE
__construct($a_parent_obj, $a_parent_cmd, $a_mode=self::MODE_USER_FOLDER, $a_load_items=true)
Constructor.
fillRow($user)
Fill table row.
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
const USER_FOLDER_ID
Class ilObjUserFolder.
setEnableHeader($a_enableheader)
Set Enable Header.
getLimit()
Get limit.
static _getFolderIds()
setMaxCount($a_max_count)
set max.
setEnableTitle($a_enabletitle)
Set Enable Title.
$cols
Definition: xhr_table.php:11
getItems()
Get user items.
addFilterItemByUdfType($id, $type, $a_optional=false, $caption=null, $a_options=array())
Add filter by standard type.
setFilterCommand($a_val, $a_caption=null)
Set filter command.