ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
ilWaitingListTableGUI Class Reference

GUI class for course/group waiting list. More...

+ Inheritance diagram for ilWaitingListTableGUI:
+ Collaboration diagram for ilWaitingListTableGUI:

Public Member Functions

 __construct (object $a_parent_obj, ilObject $rep_object, ilWaitingList $waiting_list)
 
 setUserIds (array $a_user_ids)
 Set user ids. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 readUserData ()
 
 showActionLinks (array $a_set)
 
- Public Member Functions inherited from ilTable2GUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 determineLimit ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 
 isColumnSelected (string $col)
 
 getSelectedColumns ()
 
 resetOffset (bool $a_in_determination=false)
 
 initFilter ()
 
 getParentObject ()
 
 getParentCmd ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setNoEntriesText (string $a_text)
 
 getNoEntriesText ()
 
 setIsDataTable (bool $a_val)
 
 getIsDataTable ()
 
 setEnableTitle (bool $a_enabletitle)
 
 getEnableTitle ()
 
 setEnableHeader (bool $a_enableheader)
 
 getEnableHeader ()
 
 setEnableNumInfo (bool $a_val)
 
 getEnableNumInfo ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setOrderField (string $a_order_field)
 
 getOrderField ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $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) More...
 
 getPrefix ()
 
 addFilterItem (ilTableFilterItem $a_input_item, bool $a_optional=false)
 
 addFilterItemByMetaType (string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
 Add filter by standard type. More...
 
 getFilterItems (bool $a_optionals=false)
 
 getFilterItemByPostVar (string $a_post_var)
 
 setFilterCols (int $a_val)
 
 getFilterCols ()
 
 setDisableFilterHiding (bool $a_val=true)
 
 getDisableFilterHiding ()
 
 isFilterSelected (string $a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 
 determineSelectedFilters ()
 
 setCustomPreviousNext (string $a_prev_link, string $a_next_link)
 
 setFormAction (string $a_form_action, bool $a_multipart=false)
 
 getFormAction ()
 
 setFormName (string $a_name="")
 
 getFormName ()
 get the name of the parent form More...
 
 setId (string $a_val)
 
 getId ()
 
 setDisplayAsBlock (bool $a_val)
 
 getDisplayAsBlock ()
 
 setSelectAllCheckbox (string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
 setExternalSorting (bool $a_val)
 
 getExternalSorting ()
 
 setFilterCommand (string $a_val, string $a_caption="")
 
 getFilterCommand ()
 
 setResetCommand (string $a_val, string $a_caption="")
 
 getResetCommand ()
 
 setExternalSegmentation (bool $a_val)
 
 getExternalSegmentation ()
 
 setRowTemplate (string $a_template, string $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 getDefaultOrderField ()
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 getDefaultOrderDirection ()
 
 setDefaultFilterVisiblity (bool $a_status)
 
 getDefaultFilterVisibility ()
 
 clearCommandButtons ()
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 addCommandButtonInstance (ilButtonBase $a_button)
 
 addMultiItemSelectionButton (string $a_sel_var, array $a_options, string $a_cmd, string $a_text, string $a_default_selection='')
 
 setCloseCommand (string $a_link)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addHiddenInput (string $a_name, string $a_value)
 
 addHeaderCommand (string $a_href, string $a_text, string $a_target="", string $a_img="")
 
 setTopCommands (bool $a_val)
 
 getTopCommands ()
 
 addColumn (string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
 getNavParameter ()
 
 setOrderLink (string $key, string $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder (bool $a_omit_offset=false)
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 render ()
 
 writeFilterToSession ()
 
 resetFilter ()
 
 fillFooter ()
 
 getLinkbar (string $a_num)
 
 fillHiddenRow ()
 
 fillActionRow ()
 
 setHeaderHTML (string $html)
 
 storeProperty (string $type, string $value)
 
 loadProperty (string $type)
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext (string $id)
 
 getContext ()
 
 setShowRowsSelector (bool $a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 
 getLimit ()
 
 getOffset ()
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode (bool $a_value=false)
 
 getPrintMode ()
 
 getExportMode ()
 
 exportData (int $format, bool $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand (bool $a_value)
 
 setRowSelectorLabel (string $row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
- Public Member Functions inherited from ilTableGUI
 __construct (array $a_data=[], bool $a_global_tpl=true)
 
 setTemplate (ilTemplate $a_tpl)
 
 getTemplateObject ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setHelp (string $a_help_page, string $a_help_icon, string $a_help_icon_alt="")
 
 setHeaderNames (array $a_header_names)
 
 getColumnCount ()
 
 setHeaderVars (array $a_header_vars, array $a_header_params=[])
 
 setColumnWidth (array $a_column_width)
 set table column widths More...
 
 setOneColumnWidth (string $a_column_width, int $a_column_number)
 
 setMaxCount (int $a_max_count)
 set max. More...
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
 getLimit ()
 
 setPrefix (string $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) More...
 
 setOffset (int $a_offset)
 set dataset offset More...
 
 getOffset ()
 
 setOrderColumn (string $a_order_column="", string $a_default_column="")
 
 getOrderColumn ()
 
 setOrderDirection (string $a_order_direction)
 
 getOrderDirection ()
 
 setFooter (string $a_style, string $a_previous="", string $a_next="")
 
 enable (string $a_module_name)
 
 disable (string $a_module_name)
 
 sortData ()
 
 render ()
 
 renderHeader ()
 
 setOrderLink (string $key, string $order_dir)
 
 setStyle (string $a_element, string $a_style)
 
 getStyle (string $a_element)
 
 setBase (string $a_base)
 
 getBase ()
 
 getFormName ()
 get the name of the parent form More...
 
 setFormName (string $a_name="cmd")
 
 getSelectAllCheckbox ()
 get the name of the checkbox that should be toggled with a select all button More...
 
 setSelectAllCheckbox (string $a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton (string $btn_name, string $btn_value)
 

Protected Member Functions

 getWaitingList ()
 
 getRepositoryObject ()
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 checkAcceptance (int $a_usr_id)
 
- Protected Member Functions inherited from ilTable2GUI
 getRequestedValues ()
 
 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, ilTableFilterItem $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilTableFilterItem $a_item)
 Get current filter value. More...
 
 setFilterValue (ilTableFilterItem $a_item, $a_value)
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

array $wait = []
 
array $wait_user_ids = []
 
ilObject $rep_object
 
ilObjUser $user
 
ilWaitingList $waiting_list
 
- Protected Attributes inherited from ilTable2GUI
string $requested_nav_par2 = ""
 
string $requested_nav_par = ""
 
string $requested_nav_par1 = ""
 
ILIAS Table TableGUIRequest $table_request = null
 
array $selected_columns = []
 
ilCtrl $ctrl
 
object $parent_obj = null
 
string $parent_cmd = ""
 
string $close_command = ""
 
string $top_anchor = "il_table_top"
 
array $filters = array()
 
array $optional_filters = array()
 
string $filter_cmd = 'applyFilter'
 
string $reset_cmd = 'resetFilter'
 
int $filter_cols = 5
 
bool $ext_sort = false
 
bool $ext_seg = false
 
string $context = ""
 
array $mi_sel_buttons = []
 
bool $disable_filter_hiding = false
 
bool $top_commands = true
 
array $selectable_columns = array()
 
array $selected_column = array()
 
bool $show_rows_selector = true
 
bool $rows_selector_off = false
 
bool $nav_determined = false
 
bool $limit_determined = false
 
bool $filters_determined = false
 
bool $columns_determined = false
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
array $export_formats = []
 
int $export_mode = 0
 
bool $print_mode = false
 
bool $enable_command_for_all = false
 
bool $restore_filter = false
 
array $restore_filter_values = []
 
bool $default_filter_visibility = false
 
array $sortable_fields = array()
 
bool $prevent_double_submission = true
 
string $row_selector_label = ""
 
bool $select_all_on_top = false
 
array $sel_buttons = []
 
string $nav_value = ''
 
string $noentriestext = ''
 
string $css_row = ''
 
bool $display_as_block = false
 
string $description = ''
 
string $id = ""
 
bool $custom_prev_next = false
 
string $reset_cmd_txt = ""
 
string $defaultorderfield = ""
 
string $defaultorderdirection = ""
 
array $column = []
 
bool $datatable = false
 
bool $num_info = false
 
bool $form_multipart = false
 
array $row_data = []
 
string $order_field = ""
 
array $selected_filter = []
 
string $form_action = ""
 
string $formname = ""
 
string $sort_order = ""
 
array $buttons = []
 
array $multi = []
 
array $hidden_inputs = []
 
array $header_commands = []
 
string $row_template = ""
 
string $row_template_dir = ""
 
string $filter_cmd_txt = ""
 
string $custom_prev = ""
 
string $custom_next = ""
 
array $raw_post_data = null
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTableGUI
string $sort_order
 
string $link_params
 
array $header_params
 
 $tpl
 
ilLanguage $lng
 

Static Protected Attributes

static array $all_columns = null
 
static bool $has_odf_definitions
 

Private Attributes

UIRenderer $renderer
 
UIFactory $uiFactory
 
Profile $profile
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 
- Static Public Member Functions inherited from ilTableGUI
static linkbar (string $AScript, int $AHits, int $ALimit, int $AOffset, array $AParams=array(), array $ALayout=array(), string $prefix='')
 
- 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
string $title = ""
 
string $icon = ""
 
string $icon_alt = ""
 
string $help_page = ""
 
string $help_icon = ""
 
string $help_icon_alt = ""
 
array $header_names = []
 
array $header_vars = []
 
array $linkbar_vars = []
 
array $data = []
 
int $column_count = 0
 
array $column_width = []
 
int $max_count = 0
 
int $limit = 0
 
bool $max_limit = false
 
int $offset = 0
 
string $order_column = ""
 
string $order_direction = ""
 
string $footer_style = ""
 
string $footer_previous = ""
 
string $footer_next = ""
 
bool $lang_support = true
 
bool $global_tpl = false
 
string $form_name = ""
 
string $select_all_checkbox = ""
 
array $action_buttons = []
 
string $prefix = ""
 
string $base = ""
 
array $enabled
 
array $styles
 

Detailed Description

GUI class for course/group waiting list.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilWaitingListTableGUI::__construct ( object  $a_parent_obj,
ilObject  $rep_object,
ilWaitingList  $waiting_list 
)

Definition at line 45 of file class.ilWaitingListTableGUI.php.

49 {
50 global $DIC;
51 $this->renderer = $DIC->ui()->renderer();
52 $this->uiFactory = $DIC->ui()->factory();
53
54 $this->rep_object = $rep_object;
55 $this->profile = $DIC['user']->getProfile();
56 $this->user = $DIC['user']->getLoggedInUser();
57
58 $this->setId('crs_wait_' . $this->getRepositoryObject()->getId());
59 parent::__construct($a_parent_obj, 'participants');
60 $this->setFormName('waiting');
61
62 $this->lng->loadLanguageModule('grp');
63 $this->lng->loadLanguageModule('crs');
64 $this->lng->loadLanguageModule('sess');
65 $this->lng->loadLanguageModule('ps');
66
67 $this->setExternalSorting(false);
68 $this->setExternalSegmentation(true);
69
70 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, 'participants'));
71
72 $this->addColumn('', 'f', "1", true);
73 $this->addColumn($this->lng->txt('name'), 'lastname', '20%');
74
75 $all_cols = $this->getSelectableColumns();
76 foreach ($this->getSelectedColumns() as $col) {
77 $this->addColumn($all_cols[$col]['txt'], $col);
78 }
79
80 $this->addColumn($this->lng->txt('application_date'), 'sub_time', "10%");
81 $this->addColumn('', 'mail', '10%');
82
83 $this->addMultiCommand('confirmAssignFromWaitingList', $this->lng->txt('assign'));
84 $this->addMultiCommand('confirmRefuseFromList', $this->lng->txt('refuse'));
85 $this->addMultiCommand('sendMailToSelectedUsers', $this->lng->txt('crs_mem_send_mail'));
86
87 $this->setDefaultOrderField('sub_time');
88
89 // begin-patch clipboard
90 $this->lng->loadLanguageModule('user');
91 $this->addMultiCommand('addToClipboard', $this->lng->txt('clipboard_add_btn'));
92 // end-patch clipboard
93
94 $this->setSelectAllCheckbox('waiting', true);
95
96 $this->setRowTemplate("tpl.show_waiting_list_row.html", "components/ILIAS/Membership");
97
98 $this->enable('sort');
99 $this->enable('header');
100 $this->enable('numinfo');
101 $this->enable('select_all');
102
103 $this->waiting_list = $waiting_list;
104
105 self::$has_odf_definitions = (bool) ilCourseDefinedFieldDefinition::_hasFields($this->getRepositoryObject()->getId());
106 }
renderer()
static _hasFields(int $a_container_id)
Check if there are any define fields.
setExternalSegmentation(bool $a_val)
setFormName(string $a_name="")
addMultiCommand(string $a_cmd, string $a_text)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
enable(string $a_module_name)
getSelectableColumns()
Get selectable columns.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, $rep_object, $waiting_list, ILIAS\GlobalScreen\Provider\__construct(), ilCourseDefinedFieldDefinition\_hasFields(), ilTable2GUI\addColumn(), ilTable2GUI\addMultiCommand(), ILIAS\Repository\ctrl(), ilTableGUI\enable(), ilTable2GUI\getId(), getRepositoryObject(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), ILIAS\Repository\profile(), renderer(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setFormName(), ilTable2GUI\setId(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkAcceptance()

ilWaitingListTableGUI::checkAcceptance ( int  $a_usr_id)
protected

Definition at line 410 of file class.ilWaitingListTableGUI.php.

410 : bool
411 {
412 return true;
413 }

Referenced by readUserData().

+ Here is the caller graph for this function:

◆ fillRow()

ilWaitingListTableGUI::fillRow ( array  $a_set)
protected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
array<string,mixed>$a_set data array

Reimplemented from ilTable2GUI.

Definition at line 169 of file class.ilWaitingListTableGUI.php.

169 : void
170 {
171 if (
172 !ilObjCourseGrouping::_checkGroupingDependencies($this->getRepositoryObject(), (int) $a_set['usr_id']) &&
174 ) {
175 $prefix = $this->getRepositoryObject()->getType();
176 $this->tpl->setVariable(
177 'ALERT_MSG',
178 sprintf(
179 $this->lng->txt($prefix . '_lim_assigned'),
180 ilObject::_lookupTitle(current($ids))
181 )
182 );
183 }
184
185 $this->tpl->setVariable('VAL_ID', $a_set['usr_id']);
186 $this->tpl->setVariable('VAL_NAME', $a_set['lastname'] . ', ' . $a_set['firstname']);
187
188 foreach ($this->getSelectedColumns() as $field) {
189 switch ($field) {
190 case 'gender':
191 $a_set['gender'] = $a_set['gender'] ? $this->lng->txt('gender_' . $a_set['gender']) : '';
192 $this->tpl->setCurrentBlock('custom_fields');
193 $this->tpl->setVariable('VAL_CUST', $a_set[$field]);
194 $this->tpl->parseCurrentBlock();
195 break;
196
197 case 'birthday':
198 $a_set['birthday'] = $a_set['birthday'] ? ilDatePresentation::formatDate(new ilDate(
199 $a_set['birthday'],
201 )) : $this->lng->txt('no_date');
202 $this->tpl->setCurrentBlock('custom_fields');
203 $this->tpl->setVariable('VAL_CUST', $a_set[$field]);
204 $this->tpl->parseCurrentBlock();
205 break;
206
207 case 'odf_last_update':
208 $this->tpl->setVariable('VAL_CUST', (string) ($a_set['odf_info_txt'] ?? ''));
209 break;
210
211 case 'org_units':
212 $this->tpl->setCurrentBlock('custom_fields');
213 $this->tpl->setVariable(
214 'VAL_CUST',
215 ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((int) $a_set['usr_id'])
216 );
217 $this->tpl->parseCurrentBlock();
218 break;
219
220 default:
221 $this->tpl->setCurrentBlock('custom_fields');
222 $this->tpl->setVariable('VAL_CUST', isset($a_set[$field]) ? (string) $a_set[$field] : '');
223 $this->tpl->parseCurrentBlock();
224 break;
225 }
226 }
227 $this->tpl->setVariable(
228 'VAL_SUBTIME',
230 );
231 $this->showActionLinks($a_set);
232 }
const IL_CAL_DATE
const IL_CAL_UNIX
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
Class for single dates.
static _checkGroupingDependencies(ilObject $container_obj, ?int $a_user_id=null)
static _lookupTitle(int $obj_id)

References ilTableGUI\$prefix, ilObjCourseGrouping\_checkGroupingDependencies(), ilObject\_lookupTitle(), ilDatePresentation\formatDate(), ilObjCourseGrouping\getAssignedObjects(), getRepositoryObject(), ilTable2GUI\getSelectedColumns(), IL_CAL_DATE, IL_CAL_UNIX, ILIAS\Repository\lng(), and showActionLinks().

+ Here is the call graph for this function:

◆ getRepositoryObject()

ilWaitingListTableGUI::getRepositoryObject ( )
protected

Definition at line 113 of file class.ilWaitingListTableGUI.php.

113 : ilObject
114 {
115 return $this->rep_object;
116 }
Class ilObject Basic functions for all objects.

References $rep_object.

Referenced by __construct(), fillRow(), getSelectableColumns(), and readUserData().

+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilWaitingListTableGUI::getSelectableColumns ( )

Get selectable columns.

Returns
array key: column id, val: true/false -> default on/off

Reimplemented from ilTable2GUI.

Definition at line 140 of file class.ilWaitingListTableGUI.php.

140 : array
141 {
142 if (self::$all_columns) {
143 return self::$all_columns;
144 }
145
147 self::$all_columns = $ef->getSelectableFieldsInfo($this->getRepositoryObject()->getId());
148
149 // #25215
150 if (
151 is_array(self::$all_columns) &&
152 array_key_exists('consultation_hour', self::$all_columns)
153 ) {
154 unset(self::$all_columns['consultation_hour']);
155 }
156
157 if (
158 !is_array(self::$all_columns) ||
159 !array_key_exists('login', self::$all_columns)
160 ) {
161 self::$all_columns['login'] = [
162 'default' => 1,
163 'txt' => $this->lng->txt('login')
164 ];
165 }
166 return self::$all_columns;
167 }
static _getInstanceByType(string $a_type)
Get Singleton Instance.

References $all_columns, ilExportFieldsInfo\_getInstanceByType(), ilTable2GUI\getId(), getRepositoryObject(), and ILIAS\Repository\lng().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWaitingList()

ilWaitingListTableGUI::getWaitingList ( )
protected

Definition at line 108 of file class.ilWaitingListTableGUI.php.

109 {
110 return $this->waiting_list;
111 }
Base class for course and group waiting lists.

References $waiting_list.

Referenced by setUserIds().

+ Here is the caller graph for this function:

◆ numericOrdering()

ilWaitingListTableGUI::numericOrdering ( string  $a_field)

Should this field be sorted numeric?

Reimplemented from ilTable2GUI.

Definition at line 131 of file class.ilWaitingListTableGUI.php.

131 : bool
132 {
133 switch ($a_field) {
134 case 'sub_time':
135 return true;
136 }
137 return parent::numericOrdering($a_field);
138 }

◆ readUserData()

ilWaitingListTableGUI::readUserData ( )

Definition at line 234 of file class.ilWaitingListTableGUI.php.

234 : void
235 {
237
238 $additional_fields = $this->getSelectedColumns();
239 unset(
240 $additional_fields["firstname"],
241 $additional_fields["lastname"],
242 $additional_fields["last_login"],
243 $additional_fields["access_until"],
244 $additional_fields['org_units']
245 );
246
247 $udf_ids = $usr_data_fields = $odf_ids = array();
248 foreach ($additional_fields as $field) {
249 if (strpos($field, 'udf') === 0) {
250 $udf_ids[] = substr($field, 4);
251 continue;
252 }
253 if (strpos($field, 'odf') === 0) {
254 $odf_ids[] = substr($field, 4);
255 continue;
256 }
257
258 $usr_data_fields[] = $field;
259 }
260
262 $this->getOrderField(),
263 $this->getOrderDirection(),
264 $this->getOffset(),
265 $this->getLimit(),
266 '',
267 '',
268 null,
269 false,
270 false,
271 0,
272 0,
273 null,
274 $usr_data_fields,
275 $this->wait_user_ids
276 );
277 if (0 === count($usr_data['set']) && $this->getOffset() > 0 && $this->getExternalSegmentation()) {
278 $this->resetOffset();
279
281 $this->getOrderField(),
282 $this->getOrderDirection(),
283 $this->getOffset(),
284 $this->getLimit(),
285 '',
286 '',
287 null,
288 false,
289 false,
290 0,
291 0,
292 null,
293 $usr_data_fields,
294 $this->wait_user_ids
295 );
296 }
297 $usr_ids = [];
298 foreach ((array) $usr_data['set'] as $user) {
299 $usr_ids[] = (int) $user['usr_id'];
300 }
301
302 // merge course data
303 $course_user_data = $this->getParentObject()->readMemberData($usr_ids, array());
304 $a_user_data = array();
305 foreach ((array) $usr_data['set'] as $ud) {
306 $a_user_data[(int) $ud['usr_id']] = array_merge($ud, $course_user_data[(int) $ud['usr_id']]);
307 }
308
309 // Custom user data fields
310 if ($udf_ids) {
311 $a_user_data = array_reduce(
312 $this->profile->getDataForMultiple($usr_ids),
313 function (array $c, ProfileData $v) use ($udf_ids): array {
314 if (!$this->checkAcceptance($v->getId())) {
315 return $c;
316 }
317
318 foreach ($udf_ids as $field_id) {
319 $c[$v->getId()]['udf_' . $field_id] = $v->getAdditionalFieldByIdentifier($field_id);
320 }
321 },
322 $a_user_data
323 );
324 }
325 // Object specific user data fields
326 if ($odf_ids) {
328 foreach ($data as $usr_id => $fields) {
329 // #7264: as we get data for all course members filter against user data
330 if (!$this->checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) {
331 continue;
332 }
333
334 foreach ($fields as $field_id => $value) {
335 $a_user_data[$usr_id]['odf_' . $field_id] = $value;
336 }
337 }
338
339 // add last edit date
340 foreach (ilObjectCustomUserFieldHistory::lookupEntriesByObjectId($this->getRepositoryObject()->getId()) as $usr_id => $edit_info) {
341 if (!isset($a_user_data[$usr_id])) {
342 continue;
343 }
344
345 if ($usr_id == $edit_info['update_user']) {
346 $a_user_data[$usr_id]['odf_last_update'] = '';
347 $a_user_data[$usr_id]['odf_info_txt'] = $GLOBALS['DIC']['lng']->txt('cdf_edited_by_self');
348 if (ilPrivacySettings::getInstance()->enabledAccessTimesByType($this->getRepositoryObject()->getType())) {
349 $a_user_data[$usr_id]['odf_last_update'] .= ('_' . $edit_info['editing_time']->get(IL_CAL_UNIX));
350 $a_user_data[$usr_id]['odf_info_txt'] .= (', ' . ilDatePresentation::formatDate($edit_info['editing_time']));
351 }
352 } else {
353 $a_user_data[$usr_id]['odf_last_update'] = $edit_info['update_user'];
354 $a_user_data[$usr_id]['odf_last_update'] .= ('_' . $edit_info['editing_time']->get(IL_CAL_UNIX));
355
356 $name = ilObjUser::_lookupName($edit_info['update_user']);
357 $a_user_data[$usr_id]['odf_info_txt'] = ($name['firstname'] . ' ' . $name['lastname'] . ', ' . ilDatePresentation::formatDate($edit_info['editing_time']));
358 }
359 }
360 }
361
362 foreach ($usr_data['set'] as $user) {
363 // Check acceptance
364 if (!$this->checkAcceptance((int) $user['usr_id'])) {
365 continue;
366 }
367 // DONE: accepted
368 foreach ($usr_data_fields as $field) {
369 $a_user_data[(int) $user['usr_id']][$field] = $user[$field] ?: '';
370 }
371 }
372
373 // Waiting list subscription
374 foreach ($this->wait as $usr_id => $wait_usr_data) {
375 if (isset($a_user_data[$usr_id])) {
376 $a_user_data[$usr_id]['sub_time'] = $wait_usr_data['time'];
377 }
378 }
379
380 $this->setMaxCount((int) ($usr_data['cnt'] ?? 0));
381 $this->setData($a_user_data);
382 }
static _getValuesByObjId(int $a_obj_id)
static _lookupName(int $a_user_id)
determineOffsetAndOrder(bool $a_omit_offset=false)
resetOffset(bool $a_in_determination=false)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
static getUserListData(string $a_order_field, string $a_order_dir, int $a_offset, int $a_limit, string $a_string_filter="", string $a_activation_filter="", ?ilDateTime $a_last_login_filter=null, bool $a_limited_access_filter=false, bool $a_no_courses_filter=false, int $a_course_group_filter=0, int $a_role_filter=0, ?array $a_user_folder_filter=null, ?array $a_additional_fields=null, ?array $a_user_filter=null, string $a_first_letter="", string $a_authentication_filter="")
Get data for user administration list.
$c
Definition: deliver.php:25
$GLOBALS["DIC"]
Definition: wac.php:54

References $c, ilTableGUI\$data, $GLOBALS, $user, ilCourseUserData\_getValuesByObjId(), ilObjUser\_lookupName(), checkAcceptance(), ilTable2GUI\determineOffsetAndOrder(), ilDatePresentation\formatDate(), ilTable2GUI\getExternalSegmentation(), ilTable2GUI\getId(), ilPrivacySettings\getInstance(), ilTable2GUI\getLimit(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilTable2GUI\getParentObject(), getRepositoryObject(), ilTable2GUI\getSelectedColumns(), ilUserQuery\getUserListData(), IL_CAL_UNIX, ILIAS\Repository\int(), ilObjectCustomUserFieldHistory\lookupEntriesByObjectId(), ILIAS\Repository\profile(), ilTable2GUI\resetOffset(), ilTable2GUI\setData(), and ilTableGUI\setMaxCount().

+ Here is the call graph for this function:

◆ setUserIds()

ilWaitingListTableGUI::setUserIds ( array  $a_user_ids)

Set user ids.

Parameters
int[]$a_user_ids

Definition at line 122 of file class.ilWaitingListTableGUI.php.

122 : void
123 {
124 $this->wait_user_ids = $this->wait = [];
125 foreach ($a_user_ids as $usr_id) {
126 $this->wait_user_ids[] = $usr_id;
127 $this->wait[$usr_id] = $this->getWaitingList()->getUser($usr_id);
128 }
129 }

References getWaitingList().

+ Here is the call graph for this function:

◆ showActionLinks()

ilWaitingListTableGUI::showActionLinks ( array  $a_set)

Definition at line 384 of file class.ilWaitingListTableGUI.php.

384 : void
385 {
386 // tpl variables MAIL_LINK and MAIL_TITLE are unused but not removed
387 // from the template.
388 $this->ctrl->setParameterByClass(get_class($this->getParentObject()), 'member_id', $a_set['usr_id']);
389
390 $dropDownItems = array();
391 $dropDownItems[] = $this->uiFactory->button()->shy(
392 $this->lng->txt($this->getRepositoryObject()->getType() . '_mem_send_mail'),
393 $this->ctrl->getLinkTargetByClass(get_class($this->getParentObject()), 'sendMailToSelectedUsers')
394 );
395
396 if (self::$has_odf_definitions) {
397 $dropDownItems[] = $this->uiFactory->button()->shy(
398 $this->lng->txt($this->getRepositoryObject()->getType() . '_cdf_edit_member'),
399 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui', 'editMember')
400 );
401 }
402
403 $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
404 ->withLabel($this->lng->txt('actions'));
405
406 $this->tpl->setVariable('ACTION_USER', $this->renderer->render($dropDown));
407 $this->ctrl->setParameterByClass(get_class($this->getParentObject()), 'member_id', null);
408 }

References ILIAS\Repository\ctrl(), ilTable2GUI\getParentObject(), ILIAS\Repository\lng(), and renderer().

Referenced by fillRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $all_columns

array ilWaitingListTableGUI::$all_columns = null
staticprotected

Definition at line 33 of file class.ilWaitingListTableGUI.php.

Referenced by getSelectableColumns().

◆ $has_odf_definitions

bool ilWaitingListTableGUI::$has_odf_definitions
staticprotected

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

◆ $profile

Profile ilWaitingListTableGUI::$profile
private

Definition at line 43 of file class.ilWaitingListTableGUI.php.

◆ $renderer

UIRenderer ilWaitingListTableGUI::$renderer
private

Definition at line 41 of file class.ilWaitingListTableGUI.php.

◆ $rep_object

ilObject ilWaitingListTableGUI::$rep_object
protected

Definition at line 37 of file class.ilWaitingListTableGUI.php.

Referenced by __construct(), and getRepositoryObject().

◆ $uiFactory

UIFactory ilWaitingListTableGUI::$uiFactory
private

Definition at line 42 of file class.ilWaitingListTableGUI.php.

◆ $user

ilObjUser ilWaitingListTableGUI::$user
protected

Definition at line 38 of file class.ilWaitingListTableGUI.php.

Referenced by readUserData().

◆ $wait

array ilWaitingListTableGUI::$wait = []
protected

Definition at line 35 of file class.ilWaitingListTableGUI.php.

◆ $wait_user_ids

array ilWaitingListTableGUI::$wait_user_ids = []
protected

Definition at line 36 of file class.ilWaitingListTableGUI.php.

◆ $waiting_list

ilWaitingList ilWaitingListTableGUI::$waiting_list
protected

Definition at line 39 of file class.ilWaitingListTableGUI.php.

Referenced by __construct(), and getWaitingList().


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