ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilUserTableGUI Class Reference

TableGUI class for user administration. More...

+ Inheritance diagram for ilUserTableGUI:
+ Collaboration diagram for ilUserTableGUI:

Public Member Functions

 __construct ($a_parent_obj, $a_parent_cmd, $a_mode=self::MODE_USER_FOLDER, $a_load_items=true)
 Constructor. More...
 
 readUserDefinedFieldsDefinitions ()
 Read user defined fields definitions. More...
 
 getUserDefinedField ($a_key)
 Get user defined field. More...
 
 isUdfColumn ($a_key)
 Field key. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 getItems ()
 Get user items. More...
 
 getUserIdsForFilter ()
 
 initFilter ()
 Init filter. More...
 
 addFilterItemByUdfType ($id, $type, $a_optional=false, $caption=null, $a_options=array())
 Add filter by standard type. More...
 
- Public Member Functions inherited from ilTable2GUI
 __construct ($a_parent_obj, $a_parent_cmd="", $a_template_context="")
 ilTable2GUI constructor. More...
 
 setOpenFormTag ($a_val)
 Set open form tag. More...
 
 getOpenFormTag ()
 Get open form tag. More...
 
 setCloseFormTag ($a_val)
 Set close form tag. More...
 
 getCloseFormTag ()
 Get close form tag. More...
 
 determineLimit ()
 Determine the limit. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 Determine selected columns. More...
 
 isColumnSelected ($a_col)
 Is given column selected? More...
 
 getSelectedColumns ()
 Get selected columns. More...
 
 executeCommand ()
 Execute command. More...
 
 resetOffset ($a_in_determination=false)
 Reset offset. More...
 
 initFilter ()
 Init filter. More...
 
 getParentObject ()
 Get parent object. More...
 
 getParentCmd ()
 Get parent command. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setNoEntriesText ($a_text)
 Set text for an empty table. More...
 
 getNoEntriesText ()
 Get text for an empty table. More...
 
 setIsDataTable ($a_val)
 Set is data table. More...
 
 getIsDataTable ()
 Get is data table. More...
 
 setEnableTitle ($a_enabletitle)
 Set Enable Title. More...
 
 getEnableTitle ()
 Get Enable Title. More...
 
 setEnableHeader ($a_enableheader)
 Set Enable Header. More...
 
 getEnableHeader ()
 Get Enable Header. More...
 
 setEnableNumInfo ($a_val)
 Set enable num info. More...
 
 getEnableNumInfo ()
 Get enable num info. More...
 
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 Set title and title icon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setOrderField ($a_order_field)
 set order column More...
 
 getOrderField ()
 
 setData ($a_data)
 
 getData ()
 
 dataExists ()
 
 setPrefix ($a_prefix)
 
 getPrefix ()
 
 addFilterItem ($a_input_item, $a_optional=false)
 Add filter item. More...
 
 addFilterItemByMetaType ($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
 Add filter by standard type. More...
 
 getFilterItems ($a_optionals=false)
 Get filter items. More...
 
 getFilterItemByPostVar ($a_post_var)
 
 setFilterCols ($a_val)
 Set filter columns. More...
 
 getFilterCols ()
 Get filter columns. More...
 
 setDisableFilterHiding ($a_val=true)
 Set disable filter hiding. More...
 
 getDisableFilterHiding ()
 Get disable filter hiding. More...
 
 isFilterSelected ($a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 Get selected filters. More...
 
 determineSelectedFilters ()
 Determine selected filters. More...
 
 setCustomPreviousNext ($a_prev_link, $a_next_link)
 Set custom previous/next links. More...
 
 setFormAction ($a_form_action, $a_multipart=false)
 Set Form action parameter. More...
 
 getFormAction ()
 Get Form action parameter. More...
 
 setFormName ($a_formname="")
 Set Form name. More...
 
 getFormName ()
 Get Form name. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get element id. More...
 
 setDisplayAsBlock ($a_val)
 Set display as block. More...
 
 getDisplayAsBlock ()
 Get display as block. More...
 
 getSelectAllCheckbox ()
 Get the name of the checkbox that should be toggled with a select all button. More...
 
 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. More...
 
 setExternalSorting ($a_val)
 Set external sorting. More...
 
 getExternalSorting ()
 Get external sorting. More...
 
 setFilterCommand ($a_val, $a_caption=null)
 Set filter command. More...
 
 getFilterCommand ()
 Get filter command. More...
 
 setResetCommand ($a_val, $a_caption=null)
 Set reset filter command. More...
 
 getResetCommand ()
 Get reset filter command. More...
 
 setExternalSegmentation ($a_val)
 Set external segmentation. More...
 
 getExternalSegmentation ()
 Get external segmentation. More...
 
 setRowTemplate ($a_template, $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField ($a_defaultorderfield)
 Set Default order field. More...
 
 getDefaultOrderField ()
 Get Default order field. More...
 
 setDefaultOrderDirection ($a_defaultorderdirection)
 Set Default order direction. More...
 
 getDefaultOrderDirection ()
 Get Default order direction. More...
 
 setDefaultFilterVisiblity ($a_status)
 Set default filter visiblity. More...
 
 getDefaultFilterVisibility ()
 Get default filter visibility. More...
 
 clearCommandButtons ()
 
 addCommandButton ($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
 Add Command button. More...
 
 addCommandButtonInstance (ilButtonBase $a_button)
 Add Command button instance. More...
 
 addSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection='')
 Add Selection List + Command button. More...
 
 addMultiItemSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection='')
 Add Selection List + Command button for selected items. More...
 
 setCloseCommand ($a_link)
 Add command for closing table. More...
 
 addMultiCommand ($a_cmd, $a_text)
 Add Command button. More...
 
 addHiddenInput ($a_name, $a_value)
 Add Hidden Input field. More...
 
 addHeaderCommand ($a_href, $a_text, $a_target="", $a_img="")
 Add Header Command (Link) (Image needed for now) More...
 
 setTopCommands ($a_val)
 Set top commands (display command buttons on top of table, too) More...
 
 getTopCommands ()
 Get top commands (display command buttons on top of table, too) More...
 
 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. More...
 
 getNavParameter ()
 
 setOrderLink ($sort_field, $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder ($a_omit_offset=false)
 Determine offset and order. More...
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering ($a_field)
 Should this field be sorted numeric? More...
 
 render ()
 render table public More...
 
 writeFilterToSession ()
 Write filter values to session. More...
 
 resetFilter ()
 Reset filter. More...
 
 fillFooter ()
 Fill footer row. More...
 
 getLinkbar ($a_num)
 Get previous/next linkbar. More...
 
 fillHiddenRow ()
 
 fillActionRow ()
 Fill Action Row. More...
 
 setHeaderHTML ($html)
 set header html More...
 
 storeProperty ($type, $value)
 Store table property. More...
 
 loadProperty ($type)
 Load table property. More...
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext ($id)
 Set context. More...
 
 getContext ()
 Get context. More...
 
 setShowRowsSelector ($a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 Get rows-per-page selector state. More...
 
 setShowTemplates ($a_value)
 Toggle templates. More...
 
 getShowTemplates ()
 Get template state. More...
 
 restoreTemplate ($a_name)
 Restore state from template. More...
 
 saveTemplate ($a_name)
 Save current state as template. More...
 
 deleteTemplate ($a_name)
 Delete template. More...
 
 getLimit ()
 Get limit. More...
 
 getOffset ()
 Get offset. More...
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode ($a_value=false)
 Toogle print mode. More...
 
 getPrintMode ()
 Get print mode. More...
 
 getExportMode ()
 Was export activated? More...
 
 exportData ($format, $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand ($a_value)
 Enable actions for all entries in current result. More...
 
 setRowSelectorLabel ($row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 setLimit ($a_limit=0, $a_default_limit=0)
 
- Public Member Functions inherited from ilTableGUI
 __construct ($a_data=0, $a_global_tpl=true)
 Constructor. More...
 
 setTemplate ($a_tpl)
 set template public More...
 
getTemplateObject ()
 
 setData ($a_data)
 set table data public More...
 
 getData ()
 
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 set table title public More...
 
 setHelp ($a_help_page, $a_help_icon, $a_help_icon_alt=0)
 set table help page public More...
 
 setHeaderNames ($a_header_names)
 set table header names public More...
 
 getColumnCount ()
 Returns the column count based on the number of the header row columns public. More...
 
 setHeaderVars ($a_header_vars, $a_header_params=0)
 set table header vars public More...
 
 setColumnWidth ($a_column_width)
 set table column widths public More...
 
 setOneColumnWidth ($a_column_width, $a_column_number)
 set one table column width public More...
 
 setMaxCount ($a_max_count)
 set max. More...
 
 setLimit ($a_limit=0, $a_default_limit=0)
 set max. More...
 
 getLimit ()
 Get limit. More...
 
 setPrefix ($a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) public More...
 
 setOffset ($a_offset)
 set dataset offset public More...
 
 getOffset ()
 Get offset. More...
 
 setOrderColumn ($a_order_column=0, $a_default_column=0)
 set order column public More...
 
 getOrderColumn ()
 Get order column. More...
 
 setOrderDirection ($a_order_direction)
 set order direction public More...
 
 getOrderDirection ()
 Get order direction. More...
 
 setFooter ($a_style, $a_previous=0, $a_next=0)
 set order direction public More...
 
 enable ($a_module_name)
 enables particular modules of table More...
 
 disable ($a_module_name)
 diesables particular modules of table More...
 
 sortData ()
 
 render ()
 render table public More...
 
 renderHeader ()
 
 setOrderLink ($key, $order_dir)
 
 setStyle ($a_element, $a_style)
 
 getStyle ($a_element)
 
 setBase ($a_base)
 Set Base script name (deprecated, only use this for workarounds). More...
 
 getBase ()
 Get Base script name (deprecated, only use this for workarounds). More...
 
 getFormName ()
 
 setFormName ($a_name="cmd")
 
 getSelectAllCheckbox ()
 
 setSelectAllCheckbox ($a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton ($btn_name, $btn_value)
 

Data Fields

const MODE_USER_FOLDER = 1
 
const MODE_LOCAL_USER = 2
 
- Data Fields inherited from ilTable2GUI
const FILTER_TEXT = 1
 
const FILTER_SELECT = 2
 
const FILTER_DATE = 3
 
const FILTER_LANGUAGE = 4
 
const FILTER_NUMBER_RANGE = 5
 
const FILTER_DATE_RANGE = 6
 
const FILTER_DURATION_RANGE = 7
 
const FILTER_DATETIME_RANGE = 8
 
const FILTER_CHECKBOX = 9
 
const EXPORT_EXCEL = 1
 
const EXPORT_CSV = 2
 
const ACTION_ALL_LIMIT = 1000
 
- Data Fields inherited from ilTableGUI
 $title
 
 $icon
 
 $icon_alt
 
 $help_page
 
 $help_icon
 
 $help_icon_alt
 
 $header_names
 
 $header_vars
 
 $linkbar_vars
 
 $data
 
 $column_count
 
 $column_width
 
 $max_count
 
 $limit
 
 $max_limit = false
 
 $offset
 
 $order_column
 
 $order_direction
 
 $footer_style
 
 $footer_previous
 
 $footer_next
 
 $lang_support = true
 
 $global_tpl
 
 $form_name
 
 $select_all_checkbox
 
 $action_buttons
 
 $prefix
 
 $base = ""
 
 $enabled
 
 $styles
 

Protected Member Functions

 setMode ($a_mode)
 
 getMode ()
 
 getUserFolderId ()
 
 fillRow ($user)
 Fill table row. More...
 
- Protected Member Functions inherited from ilTable2GUI
 prepareOutput ()
 Anything that must be done before HTML is generated. More...
 
 isFilterVisible ()
 Check if filter is visible: manually shown (session, db) or default value set. More...
 
 isAdvMDFilter (ilAdvancedMDRecordGUI $a_gui, $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow ($a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilFormPropertyGUI $a_item)
 Get current filter value. More...
 
 SetFilterValue (ilFormPropertyGUI $a_item, $a_value)
 Set current filter value. More...
 
 fillMetaExcel (ilExcel $a_excel, &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, &$a_row, $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV ($a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV ($a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV ($a_csv, $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

 $udf_fields = array()
 
- Protected Attributes inherited from ilTable2GUI
 $ctrl
 
 $tpl
 
 $parent_obj
 
 $parent_cmd
 
 $close_command = ""
 
 $top_anchor = "il_table_top"
 
 $filters = array()
 
 $optional_filters = array()
 
 $filter_cmd = 'applyFilter'
 
 $reset_cmd = 'resetFilter'
 
 $filter_cols = 5
 
 $ext_sort = false
 
 $ext_seg = false
 
 $context = ""
 
 $mi_sel_buttons = []
 
 $disable_filter_hiding = false
 
 $selected_filter = false
 
 $top_commands = true
 
 $selectable_columns = array()
 
 $selected_column = array()
 
 $show_templates = false
 
 $show_rows_selector = true
 
 $rows_selector_off = false
 
 $nav_determined = false
 
 $limit_determined = false
 
 $filters_determined = false
 
 $columns_determined = false
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $export_formats = []
 
 $export_mode
 
 $print_mode
 
 $enable_command_for_all
 
 $restore_filter
 
 $restore_filter_values
 
 $default_filter_visibility = false
 
 $sortable_fields = array()
 
 $prevent_double_submission = true
 
 $row_selector_label
 
 $select_all_on_top = false
 
 $sel_buttons = []
 
- Protected Attributes inherited from ilTableGUI
 $tpl
 
 $lng
 

Private Attributes

 $mode = null
 
 $user_folder_id = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 Get maximum number of entries to enable actions for all. More...
 

Detailed Description

TableGUI class for user administration.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilUserTableGUI: ilFormPropertyDispatchGUI

Definition at line 15 of file class.ilUserTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserTableGUI::__construct (   $a_parent_obj,
  $a_parent_cmd,
  $a_mode = self::MODE_USER_FOLDER,
  $a_load_items = true 
)

Constructor.

Definition at line 31 of file class.ilUserTableGUI.php.

References $c, $DIC, $f, $ilCtrl, ilTableGUI\$lng, ilTable2GUI\addColumn(), ilTable2GUI\addMultiCommand(), getItems(), getMode(), ilTable2GUI\getSelectedColumns(), getUserDefinedField(), getUserFolderId(), initFilter(), isUdfColumn(), readUserDefinedFieldsDefinitions(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setEnableAllCommand(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setEnableTitle(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFilterCommand(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), setMode(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), ilTable2GUI\setShowRowsSelector(), and ilTable2GUI\setTopCommands().

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  }
getUserDefinedField($a_key)
Get user defined field.
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
global $DIC
Definition: saml.php:7
setExternalSegmentation($a_val)
Set external segmentation.
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
readUserDefinedFieldsDefinitions()
Read user defined fields definitions.
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.
addMultiCommand($a_cmd, $a_text)
Add Command button.
getSelectedColumns()
Get selected columns.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
getItems()
Get user items.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
+ Here is the call graph for this function:

Member Function Documentation

◆ addFilterItemByUdfType()

ilUserTableGUI::addFilterItemByUdfType (   $id,
  $type,
  $a_optional = false,
  $caption = null,
  $a_options = array() 
)

Add filter by standard type.

Parameters
string$id
int$type
bool$a_optional
string$caption
Returns
object

Definition at line 589 of file class.ilUserTableGUI.php.

References $DIC, $id, ilTableGUI\$lng, $type, ilTable2GUI\addFilterItem(), UDF_TYPE_SELECT, and UDF_TYPE_TEXT.

Referenced by initFilter().

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  }
const UDF_TYPE_SELECT
This class represents a selection list property in a property form.
$type
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
const UDF_TYPE_TEXT
This class represents a text property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilUserTableGUI::fillRow (   $user)
protected

Fill table row.

Definition at line 635 of file class.ilUserTableGUI.php.

References $_GET, $c, $DIC, $ilCtrl, ilTableGUI\$lng, $user, ilAuthUtils\_getAuthMode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilDatePresentation\formatDate(), ilAuthUtils\getAuthModeTranslation(), getMode(), ilTable2GUI\getParentObject(), ilTable2GUI\getSelectedColumns(), getUserFolderId(), IL_CAL_DATE, and IL_CAL_DATETIME.

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  }
const IL_CAL_DATETIME
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static getAuthModeTranslation($a_auth_key, $auth_name='')
static _getAuthMode($a_auth_mode, $a_db_handler='')
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
getParentObject()
Get parent object.
global $ilCtrl
Definition: ilias.php:18
Class for single dates.
static _lookupObjId($a_id)
Date and time handling
getSelectedColumns()
Get selected columns.
$user
Definition: migrateto20.php:57
const IL_CAL_DATE
+ Here is the call graph for this function:

◆ getItems()

ilUserTableGUI::getItems ( )

Get user items.

Definition at line 259 of file class.ilUserTableGUI.php.

References $_GET, $DIC, ilTableGUI\$lng, $query, $user, ilLocalUser\_getFolderIds(), ilTable2GUI\determineOffsetAndOrder(), ilDatePresentation\formatDate(), ilTable2GUI\getLimit(), getMode(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilTable2GUI\getSelectedColumns(), IL_CAL_UNIX, ilObjUser\lookupOrgUnitsRepresentation(), ilTable2GUI\resetOffset(), ilTable2GUI\setData(), ilTableGUI\setMaxCount(), and ilUtil\stripSlashes().

Referenced by __construct().

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  }
User query class.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
resetOffset($a_in_determination=false)
Reset offset.
const IL_CAL_UNIX
getOrderDirection()
Get order direction.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation
getOffset()
Get offset.
Date and time handling
getSelectedColumns()
Get selected columns.
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$user
Definition: migrateto20.php:57
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
getLimit()
Get limit.
static _getFolderIds()
setMaxCount($a_max_count)
set max.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMode()

ilUserTableGUI::getMode ( )
protected

Definition at line 106 of file class.ilUserTableGUI.php.

References $mode.

Referenced by __construct(), fillRow(), getItems(), getSelectableColumns(), getUserIdsForFilter(), and initFilter().

107  {
108  return $this->mode;
109  }
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilUserTableGUI::getSelectableColumns ( )

Get selectable columns.

Parameters

LTI, showing depending by mode user?

Definition at line 167 of file class.ilUserTableGUI.php.

References $cols, $DIC, $f, ilTableGUI\$lng, and getMode().

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  }
global $DIC
Definition: saml.php:7
Class ilUserProfile.
$cols
Definition: xhr_table.php:11
+ Here is the call graph for this function:

◆ getUserDefinedField()

ilUserTableGUI::getUserDefinedField (   $a_key)

Get user defined field.

Parameters
string$a_keyfield key
Returns
array

Definition at line 139 of file class.ilUserTableGUI.php.

Referenced by __construct().

140  {
141  if (isset($this->udf_fields[$a_key])) {
142  return $this->udf_fields[$a_key];
143  }
144  return array();
145  }
+ Here is the caller graph for this function:

◆ getUserFolderId()

ilUserTableGUI::getUserFolderId ( )
protected

Definition at line 111 of file class.ilUserTableGUI.php.

References $user_folder_id.

Referenced by __construct(), fillRow(), and initFilter().

112  {
113  return $this->user_folder_id;
114  }
+ Here is the caller graph for this function:

◆ getUserIdsForFilter()

ilUserTableGUI::getUserIdsForFilter ( )

Definition at line 360 of file class.ilUserTableGUI.php.

References $_GET, $query, ilLocalUser\_getFolderIds(), ilTable2GUI\getLimit(), getMode(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), and ilUtil\stripSlashes().

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  }
User query class.
$_GET["client_id"]
getOrderDirection()
Get order direction.
getOffset()
Get offset.
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
getLimit()
Get limit.
static _getFolderIds()
+ Here is the call graph for this function:

◆ initFilter()

ilUserTableGUI::initFilter ( )

Init filter.

Definition at line 414 of file class.ilUserTableGUI.php.

References $DIC, $f, $id, $ilCtrl, $ilUser, ilTableGUI\$lng, PHPMailer\PHPMailer\$options, $si, ilAuthUtils\_getActiveAuthModes(), ilAuthUtils\_getAuthModeName(), ilLocalUser\_getFolderIds(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilTable2GUI\addFilterItem(), addFilterItemByUdfType(), ilAuthUtils\getAuthModeTranslation(), getMode(), getUserFolderId(), IL_CAL_DAY, IL_CAL_UNIX, ilTextInputGUI\setDataSource(), ilDateTimeInputGUI\setDate(), ilSelectInputGUI\setOptions(), ilRepositorySelectorInputGUI\setSelectText(), and USER_FOLDER_ID.

Referenced by __construct().

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  }
setDataSource($href, $a_delimiter=null)
set datasource link for js autocomplete
This class represents a selection list property in a property form.
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
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
static _getAuthModeName($a_auth_key)
This class represents a date/time property in a property form.
global $ilCtrl
Definition: ilias.php:18
const IL_CAL_DAY
This class represents a repository selector in a property form.
static _lookupObjId($a_id)
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
setOptions($a_options)
Set Options.
const USER_FOLDER_ID
Class ilObjUserFolder.
static _getFolderIds()
addFilterItemByUdfType($id, $type, $a_optional=false, $caption=null, $a_options=array())
Add filter by standard type.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isUdfColumn()

ilUserTableGUI::isUdfColumn (   $a_key)

Field key.

Parameters
string$a_keyfield key
Returns
bool

Definition at line 152 of file class.ilUserTableGUI.php.

Referenced by __construct().

153  {
154  if (substr($a_key, 0, 4) == "udf_") {
155  return true;
156  }
157  return false;
158  }
+ Here is the caller graph for this function:

◆ readUserDefinedFieldsDefinitions()

ilUserTableGUI::readUserDefinedFieldsDefinitions ( )

Read user defined fields definitions.

Definition at line 119 of file class.ilUserTableGUI.php.

References ilUserDefinedFields\_getInstance(), UDF_TYPE_SELECT, and UDF_TYPE_TEXT.

Referenced by __construct().

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  }
const UDF_TYPE_SELECT
static _getInstance()
Get instance.
const UDF_TYPE_TEXT
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMode()

ilUserTableGUI::setMode (   $a_mode)
protected

Definition at line 101 of file class.ilUserTableGUI.php.

Referenced by __construct().

102  {
103  $this->mode = $a_mode;
104  }
+ Here is the caller graph for this function:

Field Documentation

◆ $mode

ilUserTableGUI::$mode = null
private

Definition at line 20 of file class.ilUserTableGUI.php.

Referenced by getMode().

◆ $udf_fields

ilUserTableGUI::$udf_fields = array()
protected

Definition at line 26 of file class.ilUserTableGUI.php.

◆ $user_folder_id

ilUserTableGUI::$user_folder_id = 0
private

Definition at line 21 of file class.ilUserTableGUI.php.

Referenced by getUserFolderId().

◆ MODE_LOCAL_USER

◆ MODE_USER_FOLDER

const ilUserTableGUI::MODE_USER_FOLDER = 1

Definition at line 17 of file class.ilUserTableGUI.php.

Referenced by ilObjUserFolderGUI\getActionUserIds().


The documentation for this class was generated from the following file: