ILIAS  release_8 Revision v8.24
ilLearningSequenceParticipantsTableGUI Class Reference
+ Inheritance diagram for ilLearningSequenceParticipantsTableGUI:
+ Collaboration diagram for ilLearningSequenceParticipantsTableGUI:

Public Member Functions

 __construct (ilLearningSequenceMembershipGUI $parent_gui, ilObjLearningSequence $ls_object, ilObjUserTracking $obj_user_tracking, ilPrivacySettings $privacy_settings, ilLanguage $lng, ilAccess $access, ilRbacReview $rbac_review, ilSetting $settings)
 
 parse ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
- Public Member Functions inherited from ilParticipantTableGUI
 initFilter ()
 Init table filter. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 checkAcceptance (int $a_usr_id)
 
- 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 ()
 
 setShowTemplates (bool $a_value)
 
 getShowTemplates ()
 
 restoreTemplate (string $a_name)
 Restore state from template. More...
 
 saveTemplate (string $a_name)
 Save current state as template. More...
 
 deleteTemplate (string $a_name)
 
 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

 initForm ()
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFirstAccess (int $user_id)
 
 getLastAccess (int $user_id)
 
 getCompletedSteps (int $user_id)
 
 getLastVisitedStep (int $user_id)
 Different to the concept we decide to use the title of the object instead of its actually number in the ls items list. More...
 
 getTitleFor (int $ref_id)
 
 getExportFieldsInfo ()
 
- Protected Member Functions inherited from ilParticipantTableGUI
 getRepositoryObject ()
 
 getParticipants ()
 
 initSettings ()
 
 showActionLinks ($a_set)
 
- 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

ilLearningSequenceMembershipGUI $parent_gui
 
ilObjLearningSequence $ls_object
 
ilObjUserTracking $obj_user_tracking
 
ilPrivacySettings $privacy_settings
 
ilAccess $access
 
ilRbacReview $rbac_review
 
ilSetting $settings
 
- Protected Attributes inherited from ilParticipantTableGUI
ilParticipants $participants = null
 
array $current_filter = []
 
ilObject $rep_object
 
- Protected Attributes inherited from ilTable2GUI
string $requested_tmpl_delete
 
string $requested_tmpl_create
 
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_templates = false
 
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
 

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
 
- Static Protected Attributes inherited from ilParticipantTableGUI
static bool $export_allowed = false
 
static bool $confirmation_required = true
 
static array $accepted_ids = null
 
static array $all_columns = null
 
static bool $has_odf_definitions = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLearningSequenceParticipantsTableGUI::__construct ( ilLearningSequenceMembershipGUI  $parent_gui,
ilObjLearningSequence  $ls_object,
ilObjUserTracking  $obj_user_tracking,
ilPrivacySettings  $privacy_settings,
ilLanguage  $lng,
ilAccess  $access,
ilRbacReview  $rbac_review,
ilSetting  $settings 
)

Definition at line 30 of file class.ilLearningSequenceParticipantsTableGUI.php.

39 {
40 $this->parent_gui = $parent_gui;
41 $this->rep_object = $ls_object;
42
43 $this->obj_user_tracking = $obj_user_tracking;
44 $this->privacy_settings = $privacy_settings;
45 $this->lng = $lng;
46 $this->access = $access;
47 $this->rbac_review = $rbac_review;
48 $this->settings = $settings;
49
50 $this->lng->loadLanguageModule('lso');
51 $this->lng->loadLanguageModule('trac');
52 $this->lng->loadLanguageModule('rbac');
53 $this->lng->loadLanguageModule('mmbr');
54 $this->lng->loadLanguageModule('user');
55 $this->lng->loadLanguageModule('ps');
56
57 $this->participants = $ls_object->getLSParticipants();
58
59 $this->setPrefix('participants');
60
61 $this->setId('lso_' . $this->getRepositoryObject()->getId());
62 parent::__construct($parent_gui, 'participants');
63
64 $this->initSettings();
65 $this->initForm();
66 }
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...
setId(string $a_val)
ilLanguage $lng
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $access, ilTableGUI\$lng, $ls_object, $obj_user_tracking, $parent_gui, $privacy_settings, $rbac_review, $settings, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ilTable2GUI\getId(), ilObjLearningSequence\getLSParticipants(), ilParticipantTableGUI\getRepositoryObject(), initForm(), ilParticipantTableGUI\initSettings(), ILIAS\Repository\lng(), ilTable2GUI\setId(), ilTable2GUI\setPrefix(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ fillRow()

ilLearningSequenceParticipantsTableGUI::fillRow ( array  $a_set)
protected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
array$a_setdata array

Reimplemented from ilTable2GUI.

Definition at line 112 of file class.ilLearningSequenceParticipantsTableGUI.php.

112 : void
113 {
114 $this->tpl->setVariable('VAL_ID', $a_set['usr_id']);
115 $this->tpl->setVariable('VAL_NAME', $a_set['lastname'] . ', ' . $a_set['firstname']);
116 $this->tpl->setVariable('VAL_LOGIN', $a_set['login']);
117
118 if (
119 !$this->access->checkAccessOfUser((int) $a_set['usr_id'], 'read', '', $this->getRepositoryObject()->getRefId()) &&
120 is_array($info = $this->access->getInfo())
121 ) {
122 $this->tpl->setCurrentBlock('access_warning');
123 $this->tpl->setVariable('PARENT_ACCESS', $info[0]['text']);
124 $this->tpl->parseCurrentBlock();
125 }
126
127 if (!ilObjUser::_lookupActive((int) $a_set['usr_id'])) {
128 $this->tpl->setCurrentBlock('access_warning');
129 $this->tpl->setVariable('PARENT_ACCESS', $this->lng->txt('usr_account_inactive'));
130 $this->tpl->parseCurrentBlock();
131 }
132
133 foreach ($this->getSelectedColumns() as $field) {
134 switch ($field) {
135 case 'prtf':
136 $tmp = array();
137 if (array_key_exists('prtf', $a_set) && is_array($a_set['prtf'])) {
138 foreach ($a_set['prtf'] as $prtf_url => $prtf_txt) {
139 $tmp[] = '<a href="' . $prtf_url . '">' . $prtf_txt . '</a>';
140 }
141 }
142 $this->tpl->setCurrentBlock('custom_fields');
143 $this->tpl->setVariable('VAL_CUST', implode('<br />', $tmp));
144 $this->tpl->parseCurrentBlock();
145 break;
146 case 'roles':
147 $this->tpl->setCurrentBlock('custom_fields');
148 $this->tpl->setVariable('VAL_CUST', (string) $a_set['roles_label']);
149 $this->tpl->parseCurrentBlock();
150 break;
151 case 'org_units':
152 $this->tpl->setCurrentBlock('custom_fields');
153 $this->tpl->setVariable('VAL_CUST', ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((int) $a_set['usr_id']));
154 $this->tpl->parseCurrentBlock();
155 break;
156 default:
157 $this->tpl->setCurrentBlock('custom_fields');
158 $this->tpl->setVariable('VAL_CUST', isset($a_set[$field]) ? (string) $a_set[$field] : '');
159 $this->tpl->parseCurrentBlock();
160 break;
161 }
162 }
163
164 $this->tpl->setVariable('VAL_POSTNAME', 'participants');
165
166 if (
167 $this->obj_user_tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS) &&
169
170 ) {
171 $this->tpl->setVariable('FIRST_ACCESS', $this->getFirstAccess((int) $a_set['usr_id']));
172 $this->tpl->setVariable('LAST_ACCESS', $this->getLastAccess((int) $a_set['usr_id']));
173 }
174
175 $this->tpl->setVariable('COMPLETED_STEPS', $this->getCompletedSteps((int) $a_set['usr_id']));
176 $this->tpl->setVariable('LAST_VISITED_STEP', $this->getLastVisitedStep((int) $a_set['usr_id']));
177
178 if ($this->getParticipants()->isAdmin((int) $a_set['usr_id'])) {
179 $this->tpl->setVariable('VAL_NOTIFICATION_ID', (int) $a_set['usr_id']);
180 $this->tpl->setVariable(
181 'VAL_NOTIFICATION_CHECKED',
182 $a_set['notification'] ? 'checked="checked"' : ''
183 );
184 }
185
186 $this->showActionLinks($a_set);
187 $this->tpl->setVariable('VAL_LOGIN', $a_set['login']);
188 }
getLastVisitedStep(int $user_id)
Different to the concept we decide to use the title of the object instead of its actually number in t...
static _lookupActive(int $a_usr_id)

References ilObjUserTracking\_enabledLearningProgress(), ilObjUser\_lookupActive(), ILIAS\Repository\access(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, getCompletedSteps(), getFirstAccess(), getLastAccess(), getLastVisitedStep(), ilParticipantTableGUI\getParticipants(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), and ilParticipantTableGUI\showActionLinks().

+ Here is the call graph for this function:

◆ getCompletedSteps()

ilLearningSequenceParticipantsTableGUI::getCompletedSteps ( int  $user_id)
protected

Definition at line 218 of file class.ilLearningSequenceParticipantsTableGUI.php.

218 : string
219 {
220 $passed = 0;
221
222 $learner_items = $this->getRepositoryObject()->getLSLearnerItems(
223 $user_id
224 );
225
226 $completion_states = $this->rep_object->getLPCompletionStates();
227
228 foreach ($learner_items as $learner_item) {
229 if (in_array($learner_item->getLearningProgressStatus(), $completion_states)) {
230 $passed++;
231 }
232 }
233
234 return $passed . " / " . count($learner_items);
235 }

References ilParticipantTableGUI\getRepositoryObject().

Referenced by fillRow().

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

◆ getExportFieldsInfo()

ilLearningSequenceParticipantsTableGUI::getExportFieldsInfo ( )
protected

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

415 {
417 $this->getRepositoryObject()->getType()
418 );
419 }
static _getInstanceByType(string $a_type)
Get Singleton Instance.

References ilExportFieldsInfo\_getInstanceByType(), and ilParticipantTableGUI\getRepositoryObject().

Referenced by getSelectableColumns().

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

◆ getFirstAccess()

ilLearningSequenceParticipantsTableGUI::getFirstAccess ( int  $user_id)
protected

Definition at line 190 of file class.ilLearningSequenceParticipantsTableGUI.php.

190 : string
191 {
192 $data = $this->getRepositoryObject()->getStateDB()->getFirstAccessFor(
193 $this->getRepositoryObject()->getRefId(),
194 [$user_id]
195 );
196
197 if ($data[$user_id] === '-1') {
198 return "-";
199 }
200
201 return $data[$user_id];
202 }

References ilTableGUI\$data, and ilParticipantTableGUI\getRepositoryObject().

Referenced by fillRow().

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

◆ getLastAccess()

ilLearningSequenceParticipantsTableGUI::getLastAccess ( int  $user_id)
protected

Definition at line 204 of file class.ilLearningSequenceParticipantsTableGUI.php.

204 : string
205 {
206 $data = $this->getRepositoryObject()->getStateDB()->getLastAccessFor(
207 $this->getRepositoryObject()->getRefId(),
208 [$user_id]
209 );
210
211 if ($data[$user_id] === '-1') {
212 return "-";
213 }
214
215 return $data[$user_id];
216 }

References ilTableGUI\$data, and ilParticipantTableGUI\getRepositoryObject().

Referenced by fillRow().

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

◆ getLastVisitedStep()

ilLearningSequenceParticipantsTableGUI::getLastVisitedStep ( int  $user_id)
protected

Different to the concept we decide to use the title of the object instead of its actually number in the ls items list.

The ls item list could change and the number isn't very revealing.

Definition at line 242 of file class.ilLearningSequenceParticipantsTableGUI.php.

242 : string
243 {
244 $data = $this->getRepositoryObject()->getStateDB()->getCurrentItemsFor(
245 $this->getRepositoryObject()->getRefId(),
246 [$user_id]
247 );
248
249 if ($data[$user_id] === -1) {
250 return "-";
251 }
252
253 return $this->getTitleFor((int) $data[$user_id]);
254 }

References ilTableGUI\$data, ilParticipantTableGUI\getRepositoryObject(), and getTitleFor().

Referenced by fillRow().

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

◆ getSelectableColumns()

ilLearningSequenceParticipantsTableGUI::getSelectableColumns ( )

Get selectable columns.

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

Reimplemented from ilParticipantTableGUI.

Definition at line 383 of file class.ilLearningSequenceParticipantsTableGUI.php.

383 : array
384 {
385 $ef = $this->getExportFieldsInfo();
386 $columns = $ef->getSelectableFieldsInfo(
387 $this->getRepositoryObject()->getId()
388 );
389
390 if ($this->settings->get('user_portfolios')) {
391 $columns['prtf'] = array(
392 'txt' => $this->lng->txt('obj_prtf'),
393 'default' => false
394 );
395 }
396
397 return array_merge(
398 [
399 'roles' => [
400 'txt' => $this->lng->txt('objs_role'),
401 'default' => true
402 ]
403 ],
404 [
405 'org_units' => [
406 'txt' => $this->lng->txt("org_units"),
407 'default' => false
408 ]
409 ],
410 $columns
411 );
412 }

References getExportFieldsInfo(), ilTable2GUI\getId(), ilParticipantTableGUI\getRepositoryObject(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

Referenced by initForm().

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

◆ getTitleFor()

ilLearningSequenceParticipantsTableGUI::getTitleFor ( int  $ref_id)
protected

Definition at line 256 of file class.ilLearningSequenceParticipantsTableGUI.php.

256 : string
257 {
259 }
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
$ref_id
Definition: ltiauth.php:67

References $ref_id, ilObject\_lookupObjId(), and ilObject\_lookupTitle().

Referenced by getLastVisitedStep().

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

◆ initForm()

ilLearningSequenceParticipantsTableGUI::initForm ( )
protected

Definition at line 68 of file class.ilLearningSequenceParticipantsTableGUI.php.

68 : void
69 {
70 $this->setFormName('participants');
71 $this->setDefaultOrderField('roles');
72 $this->setRowTemplate("tpl.show_participants_row.html", "Modules/LearningSequence");
73 $this->setShowRowsSelector(true);
74 $this->setSelectAllCheckbox('participants');
75
76 $this->addColumn('', 'f', "1");
77 $this->addColumn($this->lng->txt('name'), 'lastname', '20%');
78 $this->addColumn($this->lng->txt('login'), 'login');
79
80 $all_cols = $this->getSelectableColumns();
81 foreach ($this->getSelectedColumns() as $col) {
82 $this->addColumn($all_cols[$col]['txt'], $col);
83 }
84
85 if (
86 $this->obj_user_tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS) &&
88
89 ) {
90 $this->addColumn($this->lng->txt('first_access'), "first_access");
91 $this->addColumn($this->lng->txt('last_access'), "last_access");
92 }
93 $this->addColumn($this->lng->txt('completed_steps'), "completed_steps");
94 $this->addColumn($this->lng->txt('last_visited_step'), "last_visited_step");
95 $this->addColumn($this->lng->txt('lso_notification'), 'notification');
96 $this->addColumn($this->lng->txt(''), 'optional');
97
98 $this->enable('sort');
99 $this->enable('header');
100 $this->enable('numinfo');
101 $this->enable('select_all');
102
103 $this->initFilter();
104
105 $this->addMultiCommand('editParticipants', $this->lng->txt('edit'));
106 $this->addMultiCommand('confirmDeleteParticipants', $this->lng->txt('remove'));
107 $this->addMultiCommand('sendMailToSelectedUsers', $this->lng->txt('mmbr_btn_mail_selected_users'));
108 $this->addMultiCommand('addToClipboard', $this->lng->txt('clipboard_add_btn'));
109 $this->addCommandButton('updateParticipantsStatus', $this->lng->txt('save'));
110 }
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormName(string $a_name="")
addMultiCommand(string $a_cmd, string $a_text)
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)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
enable(string $a_module_name)

References ilObjUserTracking\_enabledLearningProgress(), ilTable2GUI\addColumn(), ilTable2GUI\addCommandButton(), ilTable2GUI\addMultiCommand(), ilTableGUI\enable(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ilParticipantTableGUI\initFilter(), ILIAS\Repository\lng(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setFormName(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), and ilTable2GUI\setShowRowsSelector().

Referenced by __construct().

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

◆ parse()

ilLearningSequenceParticipantsTableGUI::parse ( )

Definition at line 261 of file class.ilLearningSequenceParticipantsTableGUI.php.

261 : void
262 {
263 $this->determineOffsetAndOrder(true);
264
265 $ls_participants = $this->participants->getParticipants();
266
267 $ls_participants = $this->access->filterUserIdsByRbacOrPositionOfCurrentUser(
268 'manage_members',
269 'manage_members',
270 $this->getRepositoryObject()->getRefId(),
271 $ls_participants
272 );
273
274 if (!$ls_participants) {
275 $this->setData(array());
276 return;
277 }
278
279 $lso_user_data = $this->parent_gui->readMemberData(
280 $ls_participants,
281 $this->getSelectedColumns()
282 );
283
284 $additional_fields = $this->getSelectedColumns();
285 unset($additional_fields['prtf']);
286 unset($additional_fields['roles']);
287 unset($additional_fields['org_units']);
288
289 $udf_ids = $usr_data_fields = $odf_ids = array();
290 foreach ($additional_fields as $field) {
291 if (substr($field, 0, 3) == 'udf') {
292 $udf_ids[] = substr($field, 4);
293 continue;
294 }
295
296 if (substr($field, 0, 3) == 'odf') {
297 $odf_ids[] = substr($field, 4);
298 continue;
299 }
300
301 $usr_data_fields[] = $field;
302 }
303
305 $this->getOrderField(),
306 $this->getOrderDirection(),
307 0,
308 9999,
309 $this->current_filter['login'],
310 '',
311 null,
312 false,
313 false,
314 0,
315 0,
316 null,
317 $usr_data_fields,
318 $ls_participants
319 );
320
321 $user_data = array();
322 $filtered_user_ids = array();
323 $local_roles = $this->parent_gui->getLocalRoles();
324
325 foreach ($usr_data['set'] as $ud) {
326 $user_id = $ud['usr_id'];
327
328 if ($this->current_filter['roles']) {
329 if (!$this->rbac_review->isAssigned($user_id, $this->current_filter['roles'])) {
330 continue;
331 }
332 }
333
334 if (array_key_exists('org_units', $this->current_filter)
335 && $this->current_filter['org_units'] !== ''
336 ) {
337 $org_unit = $this->current_filter['org_units'];
338 $title = ilObjectFactory::getInstanceByRefId($org_unit)->getTitle();
339 $user_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((int) $user_id);
340 if (strpos($user_units, $title) === false) {
341 continue;
342 }
343 }
344
345 $filtered_user_ids[] = $user_id;
346 $user_data[$user_id] = array_merge($ud, $lso_user_data[$user_id]);
347
348 $roles = array();
349 foreach ($local_roles as $role_id => $role_name) {
350 if ($this->rbac_review->isAssigned((int) $user_id, $role_id)) {
351 $roles[] = $role_name;
352 }
353 }
354
355 $user_data[$user_id]['name'] = $user_data[$user_id]['lastname'] . ', ' . $user_data[$user_id]['firstname'];
356 $user_data[$user_id]['roles_label'] = implode('<br />', $roles);
357 $user_data[$user_id]['roles'] = $this->participants->setRoleOrderPosition((int) $user_id);
358 }
359
360 // Custom user data fields
361 if ($udf_ids !== []) {
362 $data = ilUserDefinedData::lookupData($ls_participants, $udf_ids);
363 foreach ($data as $usr_id => $fields) {
364 if (!$this->checkAcceptance((int) $usr_id)) {
365 continue;
366 }
367
368 foreach ($fields as $field_id => $value) {
369 $user_data[$usr_id]['udf_' . $field_id] = $value;
370 }
371 }
372 }
373
374 $user_data = ilArrayUtil::sortArray(
375 $user_data,
376 'name',
377 $this->getOrderDirection()
378 );
379
380 $this->setData($user_data);
381 }
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
determineOffsetAndOrder(bool $a_omit_offset=false)
setData(array $a_data)
Set table data.
static lookupData(array $a_user_ids, array $a_field_ids)
Lookup data.
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.

References ilTableGUI\$data, ilTableGUI\$title, ILIAS\Repository\access(), ilParticipantTableGUI\checkAcceptance(), ilTable2GUI\determineOffsetAndOrder(), ilObjectFactory\getInstanceByRefId(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilParticipantTableGUI\getRepositoryObject(), ilTable2GUI\getSelectedColumns(), ilUserQuery\getUserListData(), ilUserDefinedData\lookupData(), ilTable2GUI\setData(), and ilArrayUtil\sortArray().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccess ilLearningSequenceParticipantsTableGUI::$access
protected

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

Referenced by __construct().

◆ $ls_object

ilObjLearningSequence ilLearningSequenceParticipantsTableGUI::$ls_object
protected

Definition at line 23 of file class.ilLearningSequenceParticipantsTableGUI.php.

Referenced by __construct().

◆ $obj_user_tracking

ilObjUserTracking ilLearningSequenceParticipantsTableGUI::$obj_user_tracking
protected

Definition at line 24 of file class.ilLearningSequenceParticipantsTableGUI.php.

Referenced by __construct().

◆ $parent_gui

ilLearningSequenceMembershipGUI ilLearningSequenceParticipantsTableGUI::$parent_gui
protected

Definition at line 22 of file class.ilLearningSequenceParticipantsTableGUI.php.

Referenced by __construct().

◆ $privacy_settings

ilPrivacySettings ilLearningSequenceParticipantsTableGUI::$privacy_settings
protected

Definition at line 25 of file class.ilLearningSequenceParticipantsTableGUI.php.

Referenced by __construct().

◆ $rbac_review

ilRbacReview ilLearningSequenceParticipantsTableGUI::$rbac_review
protected

Definition at line 27 of file class.ilLearningSequenceParticipantsTableGUI.php.

Referenced by __construct().

◆ $settings

ilSetting ilLearningSequenceParticipantsTableGUI::$settings
protected

Definition at line 28 of file class.ilLearningSequenceParticipantsTableGUI.php.

Referenced by __construct().


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