ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 addFilterItemValue ($filter, $value)
 
 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()
 
 $filter = 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
 
 $logger = null
 

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 39 of file class.ilUserTableGUI.php.

References Vendor\Package\$c, $DIC, Vendor\Package\$f, $ilCtrl, ilTableGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), 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().

40  {
41  global $DIC;
42 
43  $ilCtrl = $DIC->ctrl();
44  $lng = $DIC->language();
45 
46  $this->logger = $DIC->logger()->usr();
47 
48  $this->user_folder_id = $a_parent_obj->object->getRefId();
49 
50  $this->setMode($a_mode);
51  $this->setId("user" . $this->getUserFolderId());
53 
54  parent::__construct($a_parent_obj, $a_parent_cmd);
55  // $this->setTitle($this->lng->txt("users"));
56 
57  $this->addColumn("", "", "1", true);
58  $this->addColumn($this->lng->txt("login"), "login");
59 
60  foreach ($this->getSelectedColumns() as $c) {
61  if ($this->isUdfColumn($c)) {
62  $f = $this->getUserDefinedField($c);
63  $this->addColumn($f["txt"], $f["sortable"] ? $c : "");
64  } else { // usual column
65  $this->addColumn($this->lng->txt($c), $c);
66  }
67  }
68 
69  if ($this->getMode() == self::MODE_LOCAL_USER) {
70  $this->addColumn($this->lng->txt('context'), 'time_limit_owner');
71  $this->addColumn($this->lng->txt('role_assignment'));
72  }
73 
74  $this->setShowRowsSelector(true);
75  $this->setExternalSorting(true);
76  $this->setExternalSegmentation(true);
77  $this->setEnableHeader(true);
78 
79  $this->setFormAction($ilCtrl->getFormAction($this->parent_obj, "applyFilter"));
80  $this->setRowTemplate("tpl.user_list_row.html", "Services/User");
81  //$this->disable("footer");
82  $this->setEnableTitle(true);
83  $this->initFilter();
84  $this->setFilterCommand("applyFilter");
85  $this->setDefaultOrderField("login");
86  $this->setDefaultOrderDirection("asc");
87 
88  $this->setSelectAllCheckbox("id[]");
89  $this->setTopCommands(true);
90 
91 
92  if ($this->getMode() == self::MODE_USER_FOLDER) {
93  $this->setEnableAllCommand(true);
94 
95  $cmds = $a_parent_obj->getUserMultiCommands();
96  foreach ($cmds as $cmd => $caption) {
97  $this->addMultiCommand($cmd, $caption);
98  }
99  } else {
100  $this->addMultiCommand("deleteUsers", $lng->txt("delete"));
101  }
102 
103  if ($a_load_items) {
104  $this->getItems();
105  }
106  }
getUserDefinedField($a_key)
Get user defined field.
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
__construct(Container $dic, ilPlugin $plugin)
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.
$DIC
Definition: xapitoken.php:46
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 617 of file class.ilUserTableGUI.php.

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

Referenced by initFilter().

618  {
619  global $DIC;
620 
621  $lng = $DIC['lng'];
622 
623  if (!$caption) {
624  $caption = $lng->txt($id);
625  }
626 
627  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
628 
629  switch ($type) {
630  case UDF_TYPE_SELECT:
631  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
632  $item = new ilSelectInputGUI($caption, $id);
633  $sel_options = array("" => $this->lng->txt("user_all"));
634  foreach ($a_options as $o) {
635  $sel_options[$o] = $o;
636  }
637  $item->setOptions($sel_options);
638  break;
639 
640  case UDF_TYPE_TEXT:
641  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
642  $item = new ilTextInputGUI($caption, $id);
643  $item->setMaxLength(64);
644  $item->setSize(20);
645  // $item->setSubmitFormOnEnter(true);
646  break;
647 
648  default:
649  return null;
650  }
651 
652  if ($item) {
653  $this->addFilterItem($item, $a_optional);
654  $item->readFromSession();
655  $this->filter[$id] = $item->getValue();
656  }
657  return $item;
658  }
const UDF_TYPE_SELECT
$type
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
const UDF_TYPE_TEXT
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addFilterItemValue()

ilUserTableGUI::addFilterItemValue (   $filter,
  $value 
)

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

References $filter.

378  {
379  $this->filter[$filter] = $value;
380  }

◆ fillRow()

ilUserTableGUI::fillRow (   $user)
protected

Fill table row.

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

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

664  {
665  global $DIC;
666 
667  $ilCtrl = $DIC['ilCtrl'];
668  $lng = $DIC['lng'];
669 
670  $ilCtrl->setParameterByClass("ilobjusergui", "letter", $_GET["letter"]);
671 
672  foreach ($this->getSelectedColumns() as $c) {
673  if ($c == "access_until") {
674  $this->tpl->setCurrentBlock("access_until");
675  $this->tpl->setVariable("VAL_ACCESS_UNTIL", $user["access_until"]);
676  $this->tpl->setVariable("CLASS_ACCESS_UNTIL", $user["access_class"]);
677  } elseif ($c == "last_login") {
678  $this->tpl->setCurrentBlock("last_login");
679  $this->tpl->setVariable(
680  "VAL_LAST_LOGIN",
682  );
683  } elseif (in_array($c, array("firstname", "lastname"))) {
684  $this->tpl->setCurrentBlock($c);
685  $this->tpl->setVariable("VAL_" . strtoupper($c), (string) $user[$c]);
686  } elseif ($c == 'auth_mode') {
687  $this->tpl->setCurrentBlock('user_field');
688  $this->tpl->setVariable('VAL_UF', ilAuthUtils::getAuthModeTranslation(ilAuthUtils::_getAuthMode($user['auth_mode'])));
689  $this->tpl->parseCurrentBlock();
690  } else { // all other fields
691  $this->tpl->setCurrentBlock("user_field");
692  $val = (trim($user[$c]) == "")
693  ? " "
694  : $user[$c];
695  if ($user[$c] != "") {
696  switch ($c) {
697  case "birthday":
699  break;
700 
701  case "gender":
702  $val = $lng->txt("gender_" . $user[$c]);
703  break;
704 
705  case "create_date":
706  case "agree_date":
707  case "approve_date":
708  // $val = ilDatePresentation::formatDate(new ilDateTime($val,IL_CAL_DATETIME));
710  break;
711  }
712  }
713  $this->tpl->setVariable("VAL_UF", $val);
714  }
715 
716  $this->tpl->parseCurrentBlock();
717  }
718 
719  if ($user["usr_id"] != 6) {
720  if ($this->getMode() == self::MODE_USER_FOLDER or $user['time_limit_owner'] == $this->getUserFolderId()) {
721  $this->tpl->setCurrentBlock("checkb");
722  $this->tpl->setVariable("ID", $user["usr_id"]);
723  $this->tpl->parseCurrentBlock();
724  }
725  }
726 
727  if ($this->getMode() == self::MODE_USER_FOLDER or $user['time_limit_owner'] == $this->getUserFolderId()) {
728  $this->tpl->setVariable("VAL_LOGIN", $user["login"]);
729  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", $user["usr_id"]);
730  $this->tpl->setVariable(
731  "HREF_LOGIN",
732  $ilCtrl->getLinkTargetByClass("ilobjusergui", "view")
733  );
734  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", "");
735  } else {
736  $this->tpl->setVariable('VAL_LOGIN_PLAIN', $user['login']);
737  }
738 
739  if ($this->getMode() == self::MODE_LOCAL_USER) {
740  $this->tpl->setCurrentBlock('context');
741  $this->tpl->setVariable('VAL_CONTEXT', (string) ilObject::_lookupTitle(ilObject::_lookupObjId($user['time_limit_owner'])));
742  $this->tpl->parseCurrentBlock();
743 
744  $this->tpl->setCurrentBlock('roles');
745  $ilCtrl->setParameter($this->getParentObject(), 'obj_id', $user['usr_id']);
746  $this->tpl->setVariable('ROLE_LINK', $ilCtrl->getLinkTarget($this->getParentObject(), 'assignRoles'));
747  $this->tpl->setVariable('TXT_ROLES', $this->lng->txt('edit'));
748  $ilCtrl->clearParameters($this->getParentObject());
749  $this->tpl->parseCurrentBlock();
750  }
751  }
const IL_CAL_DATETIME
$_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)
getSelectedColumns()
Get selected columns.
const IL_CAL_DATE
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getItems()

ilUserTableGUI::getItems ( )

Get user items.

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

References $_GET, $DIC, ilTableGUI\$lng, $query, 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().

267  {
268  global $DIC;
269 
270  $lng = $DIC['lng'];
271 
272  $this->determineOffsetAndOrder();
273  if ($this->getMode() == self::MODE_USER_FOLDER) {
274  // All accessible users
275  include_once './Services/User/classes/class.ilLocalUser.php';
276  $user_filter = ilLocalUser::_getFolderIds(true);
277  } else {
278  if ($this->filter['time_limit_owner']) {
279  $user_filter = array($this->filter['time_limit_owner']);
280  } else {
281  // All accessible users
282  include_once './Services/User/classes/class.ilLocalUser.php';
283  $user_filter = ilLocalUser::_getFolderIds();
284  }
285  }
286 
287 
288 
289  //#13221 don't show all users if user filter is empty!
290  if (!count($user_filter)) {
291  $this->setMaxCount(0);
292  $this->setData([]);
293  return;
294  }
295 
296  if (is_array($this->filter['user_ids']) && !count($this->filter['user_ids'])) {
297  $this->setMaxCount(0);
298  $this->setData([]);
299  return;
300  }
301 
302  $additional_fields = $this->getSelectedColumns();
303  unset($additional_fields["firstname"]);
304  unset($additional_fields["lastname"]);
305  unset($additional_fields["email"]);
306  unset($additional_fields["second_email"]);
307  unset($additional_fields["last_login"]);
308  unset($additional_fields["access_until"]);
309  unset($additional_fields['org_units']);
310 
311  $udf_filter = array();
312  foreach ($this->filter as $k => $v) {
313  if (substr($k, 0, 4) == "udf_") {
314  $udf_filter[$k] = $v;
315  }
316  }
317 
318  $query = new ilUserQuery();
319  $order_field = $this->getOrderField();
320  if (substr($order_field, 0, 4) != "udf_" || isset($additional_fields[$order_field])) {
321  $query->setOrderField($order_field);
322  $query->setOrderDirection($this->getOrderDirection());
323  }
324  $query->setOffset($this->getOffset());
325  $query->setLimit($this->getLimit());
326  $query->setTextFilter($this->filter['query']);
327  $query->setActionFilter($this->filter['activation']);
328  $query->setLastLogin($this->filter['last_login']);
329  $query->setLimitedAccessFilter($this->filter['limited_access']);
330  $query->setNoCourseFilter($this->filter['no_courses']);
331  $query->setNoGroupFilter($this->filter['no_groups']);
332  $query->setCourseGroupFilter($this->filter['course_group']);
333  $query->setRoleFilter($this->filter['global_role']);
334  $query->setAdditionalFields($additional_fields);
335  $query->setUserFolder($user_filter);
336  $query->setUserFilter($this->filter['user_ids']);
337  $query->setUdfFilter($udf_filter);
338  $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
339  $query->setAuthenticationFilter($this->filter['authentication']);
340  $usr_data = $query->query();
341 
342  if (count($usr_data["set"]) == 0 && $this->getOffset() > 0) {
343  $this->resetOffset();
344  $query->setOffset($this->getOffset());
345  $usr_data = $query->query();
346  }
347 
348  foreach ($usr_data["set"] as $k => $user) {
349  if (in_array('org_units', $this->getSelectedColumns())) {
350  $usr_data['set'][$k]['org_units'] = ilObjUser::lookupOrgUnitsRepresentation($user['usr_id']);
351  }
352 
353 
354  $current_time = time();
355  if ($user['active']) {
356  if ($user["time_limit_unlimited"]) {
357  $txt_access = $lng->txt("access_unlimited");
358  $usr_data["set"][$k]["access_class"] = "smallgreen";
359  } elseif ($user["time_limit_until"] < $current_time) {
360  $txt_access = $lng->txt("access_expired");
361  $usr_data["set"][$k]["access_class"] = "smallred";
362  } else {
363  $txt_access = ilDatePresentation::formatDate(new ilDateTime($user["time_limit_until"], IL_CAL_UNIX));
364  $usr_data["set"][$k]["access_class"] = "small";
365  }
366  } else {
367  $txt_access = $lng->txt("inactive");
368  $usr_data["set"][$k]["access_class"] = "smallred";
369  }
370  $usr_data["set"][$k]["access_until"] = $txt_access;
371  }
372 
373  $this->setMaxCount($usr_data["cnt"]);
374  $this->setData($usr_data["set"]);
375  }
User query class.
$_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
static _getFolderIds($access_with_orgunit=false)
getOffset()
Get offset.
getSelectedColumns()
Get selected columns.
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
$DIC
Definition: xapitoken.php:46
getLimit()
Get limit.
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 113 of file class.ilUserTableGUI.php.

References $mode.

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

114  {
115  return $this->mode;
116  }
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilUserTableGUI::getSelectableColumns ( )

Get selectable columns.

Parameters

LTI, showing depending by mode user?

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

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

175  {
176  global $DIC;
177 
178  $lng = $DIC['lng'];
179 
180  include_once("./Services/User/classes/class.ilUserProfile.php");
181  $up = new ilUserProfile();
182  $up->skipGroup("preferences");
183  $up->skipGroup("interests");
184  $up->skipGroup("settings");
185 
186  // default fields
187  $cols = array();
188 
189  // first and last name cannot be hidden
190  $cols["firstname"] = array(
191  "txt" => $lng->txt("firstname"),
192  "default" => true);
193  $cols["lastname"] = array(
194  "txt" => $lng->txt("lastname"),
195  "default" => true);
196  if ($this->getMode() == self::MODE_USER_FOLDER) {
197  $ufs = $up->getStandardFields();
198 
199  $cols["access_until"] = array(
200  "txt" => $lng->txt("access_until"),
201  "default" => true);
202  $cols["last_login"] = array(
203  "txt" => $lng->txt("last_login"),
204  "default" => true);
205 
206  // #13967
207  $cols["create_date"] = array(
208  "txt" => $lng->txt("create_date"));
209  $cols["approve_date"] = array(
210  "txt" => $lng->txt("approve_date"));
211  $cols["agree_date"] = array(
212  "txt" => $lng->txt("agree_date"));
213  } else {
214  $ufs = $up->getLocalUserAdministrationFields();
215  }
216 
217  // email should be the 1st "optional" field (can be hidden)
218  if (isset($ufs["email"])) {
219  $cols["email"] = array(
220  "txt" => $lng->txt("email"),
221  "default" => true);
222  }
223  if (isset($ufs["second_email"])) {
224  $cols["second_email"] = array(
225  "txt" => $lng->txt("second_email"),
226  "default" => true);
227  }
228  // other user profile fields
229  foreach ($ufs as $f => $fd) {
230  if (!isset($cols[$f]) && !$fd["lists_hide"]) {
231  // #18795
232  $caption = $fd["lang_var"]
233  ? $fd["lang_var"]
234  : $f;
235  $cols[$f] = array(
236  "txt" => $lng->txt($caption),
237  "default" => false);
238  }
239  }
240 
241 
245  $cols["auth_mode"] = array(
246  "txt" => $lng->txt("auth_mode"),
247  "default" => false);
248 
249 
250  // custom user fields
251  if ($this->getMode() == self::MODE_USER_FOLDER) {
252  foreach ($this->udf_fields as $k => $field) {
253  $cols[$k] = $field;
254  }
255  }
256 
257  // fields that are always shown
258  unset($cols["username"]);
259 
260  return $cols;
261  }
Class ilUserProfile.
$DIC
Definition: xapitoken.php:46
$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 146 of file class.ilUserTableGUI.php.

Referenced by __construct().

147  {
148  if (isset($this->udf_fields[$a_key])) {
149  return $this->udf_fields[$a_key];
150  }
151  return array();
152  }
+ Here is the caller graph for this function:

◆ getUserFolderId()

ilUserTableGUI::getUserFolderId ( )
protected

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

References $user_folder_id.

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

119  {
120  return $this->user_folder_id;
121  }
+ Here is the caller graph for this function:

◆ getUserIdsForFilter()

ilUserTableGUI::getUserIdsForFilter ( )

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

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

383  {
384  if ($this->getMode() == self::MODE_USER_FOLDER) {
385  // All accessible users
386  include_once './Services/User/classes/class.ilLocalUser.php';
387  $user_filter = ilLocalUser::_getFolderIds(true);
388  } else {
389  if ($this->filter['time_limit_owner']) {
390  $user_filter = array($this->filter['time_limit_owner']);
391  } else {
392  // All accessible users
393  include_once './Services/User/classes/class.ilLocalUser.php';
394  $user_filter = ilLocalUser::_getFolderIds();
395  }
396  }
397 
398  if (!isset($this->filter['user_ids'])) {
399  $this->filter['user_ids'] = array();
400  $this->filter['user_ids'] = null;
401  }
402 
403  include_once("./Services/User/classes/class.ilUserQuery.php");
404  $query = new ilUserQuery();
405  $query->setOffset($this->getOffset());
406  $query->setLimit($this->getLimit());
407 
408  $query->setTextFilter($this->filter['query']);
409  $query->setActionFilter($this->filter['activation']);
410  $query->setAuthenticationFilter($this->filter['authentication']);
411  $query->setLastLogin($this->filter['last_login']);
412  $query->setLimitedAccessFilter($this->filter['limited_access']);
413  $query->setNoCourseFilter($this->filter['no_courses']);
414  $query->setNoGroupFilter($this->filter['no_groups']);
415  $query->setCourseGroupFilter($this->filter['course_group']);
416  $query->setRoleFilter($this->filter['global_role']);
417  $query->setUserFolder($user_filter);
418  $query->setUserFilter($this->filter['user_ids']);
419  $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
420 
421  if ($this->getOrderField()) {
422  $query->setOrderField(ilUtil::stripSlashes($this->getOrderField()));
423  $query->setOrderDirection(ilUtil::stripSlashes($this->getOrderDirection()));
424  }
425 
426  $usr_data = $query->query();
427  $user_ids = array();
428 
429  foreach ($usr_data["set"] as $item) {
430  // #11632
431  if ($item["usr_id"] != SYSTEM_USER_ID) {
432  $user_ids[] = $item["usr_id"];
433  }
434  }
435  return $user_ids;
436  }
User query class.
$_GET["client_id"]
getOrderDirection()
Get order direction.
static _getFolderIds($access_with_orgunit=false)
getOffset()
Get offset.
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
getLimit()
Get limit.
+ Here is the call graph for this function:

◆ initFilter()

ilUserTableGUI::initFilter ( )

Init filter.

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

References $DIC, Vendor\Package\$f, $ilCtrl, $ilUser, ilTableGUI\$lng, $si, ilAuthUtils\_getActiveAuthModes(), ilAuthUtils\_getAuthModeName(), ilLocalUser\_getFolderIds(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilTable2GUI\addFilterItem(), addFilterItemByUdfType(), ilAuthUtils\getAuthModeTranslation(), getMode(), getUserFolderId(), IL_CAL_DAY, IL_CAL_UNIX, ilDateTimeInputGUI\setDate(), and USER_FOLDER_ID.

Referenced by __construct().

443  {
444  global $DIC;
445 
446  $lng = $DIC['lng'];
447  $rbacreview = $DIC['rbacreview'];
448  $ilUser = $DIC['ilUser'];
449  $ilCtrl = $DIC['ilCtrl'];
450 
451 
452  // Show context filter
453  if ($this->getMode() == self::MODE_LOCAL_USER) {
454  include_once './Services/User/classes/class.ilLocalUser.php';
455  $parent_ids = ilLocalUser::_getFolderIds();
456 
457  if (count($parent_ids) > 1) {
458  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
459  $co = new ilSelectInputGUI($lng->txt('context'), 'time_limit_owner');
460 
461  $ref_id = $this->getUserFolderId();
462 
463  $opt[0] = $this->lng->txt('all_users');
464  $opt[$this->getUserFolderId()] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($this->getUserFolderId())) . ')';
465 
466  foreach ($parent_ids as $parent_id) {
467  if ($parent_id == $this->getUserFolderId()) {
468  continue;
469  }
470  switch ($parent_id) {
471  case USER_FOLDER_ID:
472  $opt[USER_FOLDER_ID] = $lng->txt('global_user');
473  break;
474 
475  default:
476  $opt[$parent_id] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($parent_id)) . ')';
477  break;
478  }
479  }
480  $co->setOptions($opt);
481  $this->addFilterItem($co);
482  $co->readFromSession();
483  $this->filter['time_limit_owner'] = $co->getValue();
484  }
485  }
486 
487  // User name, login, email filter
488  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
489  $ul = new ilTextInputGUI($lng->txt("login") . "/" . $lng->txt("email") . "/" .
490  $lng->txt("name"), "query");
491  $ul->setDataSource($ilCtrl->getLinkTarget(
492  $this->getParentObject(),
493  "addUserAutoComplete",
494  "",
495  true
496  ));
497  $ul->setSize(20);
498  $ul->setSubmitFormOnEnter(true);
499  $this->addFilterItem($ul);
500  $ul->readFromSession();
501  $this->filter["query"] = $ul->getValue();
502 
503  /*
504  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
505  $ti = new ilTextInputGUI($lng->txt("login")."/".$lng->txt("email")."/".$lng->txt("name"), "query");
506  $ti->setMaxLength(64);
507  $ti->setSize(20);
508  $ti->setSubmitFormOnEnter(true);
509  $this->addFilterItem($ti);
510  $ti->readFromSession();
511  $this->filter["query"] = $ti->getValue();
512  */
513 
514  // activation
515  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
516  $options = array(
517  "" => $lng->txt("user_all"),
518  "active" => $lng->txt("active"),
519  "inactive" => $lng->txt("inactive"),
520  );
521  $si = new ilSelectInputGUI($this->lng->txt("user_activation"), "activation");
522  $si->setOptions($options);
523  $this->addFilterItem($si);
524  $si->readFromSession();
525  $this->filter["activation"] = $si->getValue();
526 
527  // limited access
528  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
529  $cb = new ilCheckboxInputGUI($this->lng->txt("user_limited_access"), "limited_access");
530  $this->addFilterItem($cb);
531  $cb->readFromSession();
532  $this->filter["limited_access"] = $cb->getChecked();
533 
534  // last login
535  include_once("./Services/Form/classes/class.ilDateTimeInputGUI.php");
536  $di = new ilDateTimeInputGUI($this->lng->txt("user_last_login_before"), "last_login");
537  $default_date = new ilDateTime(time(), IL_CAL_UNIX);
538  $default_date->increment(IL_CAL_DAY, 1);
539  $di->setDate($default_date);
540  $this->addFilterItem($di);
541  $di->readFromSession();
542  $this->filter["last_login"] = $di->getDate();
543 
544  if ($this->getMode() == self::MODE_USER_FOLDER) {
545  // no assigned courses
546  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
547  $cb = new ilCheckboxInputGUI($this->lng->txt("user_no_courses"), "no_courses");
548  $this->addFilterItem($cb);
549  $cb->readFromSession();
550  $this->filter["no_courses"] = $cb->getChecked();
551 
552  // no assigned groups
553  include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
554  $ng = new ilCheckboxInputGUI($this->lng->txt("user_no_groups"), "no_groups");
555  $this->addFilterItem($ng);
556  $ng->readFromSession();
557  $this->filter['no_groups'] = $ng->getChecked();
558 
559  // course/group members
560  include_once("./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
561  $rs = new ilRepositorySelectorInputGUI($lng->txt("user_member_of_course_group"), "course_group");
562  $rs->setSelectText($lng->txt("user_select_course_group"));
563  $rs->setHeaderMessage($lng->txt("user_please_select_course_group"));
564  $rs->setClickableTypes(array("crs", "grp"));
565  $this->addFilterItem($rs);
566  $rs->readFromSession();
567  $this->filter["course_group"] = $rs->getValue();
568  }
569 
570  // global roles
571  $options = array(
572  "" => $lng->txt("user_any"),
573  );
574  $roles = $rbacreview->getRolesByFilter(2, $ilUser->getId());
575  foreach ($roles as $role) {
576  $options[$role["rol_id"]] = $role["title"];
577  }
578  $si = new ilSelectInputGUI($this->lng->txt("user_global_role"), "global_role");
579  $si->setOptions($options);
580  $this->addFilterItem($si);
581  $si->readFromSession();
582  $this->filter["global_role"] = $si->getValue();
583 
584  // authentication mode
585  $auth_methods = ilAuthUtils::_getActiveAuthModes();
586  $options = array(
587  "" => $lng->txt("user_any"),
588  );
589  foreach ($auth_methods as $method => $value) {
590  if ($method == 'default') {
591  $options[$method] = $this->lng->txt('auth_' . $method) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($value)) . ")";
592  } else {
593  $options[$method] = ilAuthUtils::getAuthModeTranslation($value);
594  }
595  }
596  $si = new ilSelectInputGUI($this->lng->txt("auth_mode"), "authentication_method");
597  $si->setOptions($options);
598  $this->addFilterItem($si);
599  $si->readFromSession();
600  $this->filter["authentication"] = $si->getValue();
601 
602  // udf fields
603  foreach ($this->udf_fields as $id => $f) {
604  $this->addFilterItemByUdfType($id, $f["type"], true, $f["txt"], $f["options"]);
605  }
606  }
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
static _getFolderIds($access_with_orgunit=false)
static _lookupObjId($a_id)
setDate(ilDateTime $a_date=null)
set date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTim...
$ilUser
Definition: imgupload.php:18
$DIC
Definition: xapitoken.php:46
const USER_FOLDER_ID
Class ilObjUserFolder.
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 159 of file class.ilUserTableGUI.php.

Referenced by __construct().

160  {
161  if (substr($a_key, 0, 4) == "udf_") {
162  return true;
163  }
164  return false;
165  }
+ Here is the caller graph for this function:

◆ readUserDefinedFieldsDefinitions()

ilUserTableGUI::readUserDefinedFieldsDefinitions ( )

Read user defined fields definitions.

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

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

Referenced by __construct().

127  {
128  include_once './Services/User/classes/class.ilUserDefinedFields.php';
129  $user_defined_fields = ilUserDefinedFields::_getInstance();
130  foreach ($user_defined_fields->getDefinitions() as $field => $definition) {
131  $this->udf_fields["udf_" . $field] = array(
132  "txt" => $definition["field_name"],
133  "default" => false,
134  "options" => $definition["field_values"],
135  "type" => $definition["field_type"],
136  "sortable" => in_array($definition["field_type"], array(UDF_TYPE_TEXT, UDF_TYPE_SELECT))
137  );
138  }
139  }
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 108 of file class.ilUserTableGUI.php.

Referenced by __construct().

109  {
110  $this->mode = $a_mode;
111  }
+ Here is the caller graph for this function:

Field Documentation

◆ $filter

ilUserTableGUI::$filter = array()
protected

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

Referenced by addFilterItemValue().

◆ $logger

ilUserTableGUI::$logger = null
private

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

◆ $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

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