ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilLPCollectionSettingsTableGUI Class Reference

Description of class. More...

+ Inheritance diagram for ilLPCollectionSettingsTableGUI:
+ Collaboration diagram for ilLPCollectionSettingsTableGUI:

Public Member Functions

 __construct (?object $a_parent_obj, string $a_parent_cmd, int $a_node_id, int $a_mode)
 
 getNode ()
 
 getMode ()
 
 parse (ilLPCollection $a_collection)
 Read and parse items. More...
 
- 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

 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 initTable ()
 
- 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...
 
 setColumnHeaderTooltip (array $column)
 

Protected Attributes

ilObjectDefinition $obj_definition
 
- 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
 

Private Attributes

int $node_id
 
int $mode
 

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

Description of class.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

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

Constructor & Destructor Documentation

◆ __construct()

ilLPCollectionSettingsTableGUI::__construct ( ?object  $a_parent_obj,
string  $a_parent_cmd,
int  $a_node_id,
int  $a_mode 
)

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

38 {
39 global $DIC;
40
41 $this->obj_definition = $DIC["objDefinition"];
42 $this->node_id = $a_node_id;
43 $this->mode = $a_mode;
44
45 $this->setId('lpobjs_' . $this->getNode());
46 parent::__construct($a_parent_obj, $a_parent_cmd);
47 }
setId(string $a_val)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), getNode(), and ilTable2GUI\setId().

+ Here is the call graph for this function:

Member Function Documentation

◆ fillRow()

ilLPCollectionSettingsTableGUI::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 91 of file class.ilLPCollectionSettingsTableGUI.php.

91 : void
92 {
93 $this->tpl->setCurrentBlock('item_row');
94 $this->tpl->setVariable('ITEM_ID', $a_set['id']);
95 $this->tpl->setVariable('COLL_TITLE', $a_set['title'] ?? "");
96 $this->tpl->setVariable('COLL_DESC', $a_set['description'] ?? "");
97
98 if ($this->obj_definition->isPluginTypeName($a_set["type"])) {
100 $a_set['type'],
101 "obj_" . $a_set['type']
102 );
103 } else {
104 $alt = $this->lng->txt('obj_' . $a_set['type']);
105 }
106 $this->tpl->setVariable('ALT_IMG', $alt);
107 $this->tpl->setVariable(
108 'TYPE_IMG',
110 (int) ($a_set['obj_id'] ?? 0),
111 'tiny',
112 $a_set['type']
113 )
114 );
115
116 if (
119 if ($a_set['ref_id']) {
120 $this->tpl->setVariable(
121 'COLL_LINK',
122 ilLink::_getLink(
123 $a_set['ref_id'],
124 $a_set['type']
125 )
126 );
127 $this->tpl->setVariable(
128 'COLL_FRAME',
130 'MainContent'
131 )
132 );
133
134 $path = new ilPathGUI();
135 $this->tpl->setVariable(
136 'COLL_PATH',
137 $this->lng->txt('path') . ': ' . $path->getPath(
138 $this->getNode(),
139 $a_set['ref_id']
140 )
141 );
142
143 $mode_suffix = '';
144 if (
145 ($a_set['grouped'] ?? false) ||
146 ($a_set['group_item'] ?? null)) {
147 // #14941
148 $mode_suffix = '_INLINE';
149
150 if (!($a_set['group_item'] ?? false)) {
151 $this->tpl->setVariable("COLL_MODE", "");
152 }
153 }
155 'edit_learning_progress',
156 (int) $a_set['ref_id']
157 )) {
158 $gui_class = "ilObj" . $this->obj_definition->getClassName(
159 $a_set['type']
160 ) . "GUI";
161 $this->ctrl->setParameterByClass(
162 ilLearningProgressGUI::class,
163 'ref_id',
164 $a_set['ref_id']
165 );
166 if ('sahs' === $a_set['type']) {
167 $obj_id = ilObject::_lookupObjectId((int) $a_set['ref_id']);
169 $obj_id
170 )) {
171 case "scorm2004":
172 $gui_class = ilSAHSEditGUI::class;
173 $scorm_class = ilObjSCORM2004LearningModuleGUI::class;
174 break;
175
176 case "scorm":
177 $gui_class = ilSAHSEditGUI::class;
178 $scorm_class = ilObjSCORMLearningModuleGUI::class;
179 break;
180
181 default:
182 $scorm_class = '';
183 break;
184 }
185
186 $lp_settings_link = $this->ctrl->getLinkTargetByClass(
187 [
188 $gui_class,
189 $scorm_class,
190 ilLearningProgressGUI::class,
191 ilLPListOfSettingsGUI::class,
192 ]
193 );
194 } elseif ('lm' === $a_set['type']) {
195 $lp_settings_link = $this->ctrl->getLinkTargetByClass(
196 [
197 ilLMEditorGUI::class,
198 ilObjLearningModuleGUI::class,
199 ilLearningProgressGUI::class,
200 ]
201 );
202 } else {
203 $lp_settings_link = $this->ctrl->getLinkTargetByClass(
204 [
205 ilRepositoryGUI::class,
206 $gui_class,
207 ilLearningProgressGUI::class,
208 ]
209 );
210 }
211
212 $this->ctrl->clearParameterByClass(
213 ilLearningProgressGUI::class,
214 'ref_id'
215 );
216
217 $a_set["mode"] = '<a href="' . $lp_settings_link . '">' . $a_set['mode'] . '</a>'; // :TODO: il_ItemAlertProperty?
218 }
219
220 $mode = $a_set['mode_id'];
222 $this->tpl->setVariable(
223 "COLL_MODE" . $mode_suffix,
224 $a_set['mode']
225 );
226 } else {
227 $this->tpl->setVariable("COLL_MODE" . $mode_suffix, "");
228 $this->tpl->setVariable(
229 "COLL_MODE_DEACTIVATED" . $mode_suffix,
230 $a_set['mode']
231 );
232 }
233 if ($a_set["anonymized"]) {
234 $this->tpl->setVariable(
235 "ANONYMIZED" . $mode_suffix,
236 $this->lng->txt(
237 'trac_anonymized_info_short'
238 )
239 );
240 }
241
242 if ($mode_suffix) {
243 $this->tpl->setVariable(
244 "COLL_MODE_LABEL",
245 $this->lng->txt("trac_mode")
246 );
247 }
248 }
249 } else {
250 $this->tpl->setVariable('COLL_LINK', $a_set['url']);
251
253 // handle tlt settings
254 $this->tpl->setCurrentBlock("tlt");
255 $this->tpl->setVariable(
256 "TXT_MONTH",
257 $this->lng->txt('md_months')
258 );
259 $this->tpl->setVariable("TXT_DAYS", $this->lng->txt('md_days'));
260 $this->tpl->setVariable("TXT_TIME", $this->lng->txt('md_time'));
261 $this->tpl->setVariable("TLT_HINT", '(hh:mm)');
262
263 // seconds to units
264 $mon = floor($a_set["tlt"] / (60 * 60 * 24 * 30));
265 $tlt = $a_set["tlt"] % (60 * 60 * 24 * 30);
266 $day = floor($tlt / (60 * 60 * 24));
267 $tlt = $tlt % (60 * 60 * 24);
268 $hr = floor($tlt / (60 * 60));
269 $tlt = $tlt % (60 * 60);
270 $min = floor($tlt / 60);
271
272 $options = array();
273 for ($i = 0; $i <= 24; $i++) {
274 $options[$i] = sprintf('%02d', $i);
275 }
276 $this->tpl->setVariable(
277 "SEL_MONTHS",
279 $mon,
280 'tlt[' . $a_set['id'] . '][mo]',
281 $options,
282 false,
283 true
284 )
285 );
286
287 for ($i = 0; $i <= 31; $i++) {
288 $options[$i] = sprintf('%02d', $i);
289 }
290 $this->tpl->setVariable(
291 "SEL_DAYS",
293 $day,
294 'tlt[' . $a_set['id'] . '][d]',
295 $options,
296 false,
297 true
298 )
299 );
300
301 $this->tpl->setVariable(
302 "SEL_TLT",
304 'tlt[' . $a_set['id'] . ']',
305 true,
306 (int) $hr,
307 (int) $min,
308 0,
309 false
310 )
311 );
312
313 $this->tpl->parseCurrentBlock();
314 }
315 }
316
317 // Assigned ?
318 $this->tpl->setVariable(
319 "ASSIGNED_IMG_OK",
320 $a_set['status']
321 ? ilUtil::getImagePath('standard/icon_ok.svg')
322 : ilUtil::getImagePath('standard/icon_not_ok.svg')
323 );
324 $this->tpl->setVariable(
325 "ASSIGNED_STATUS",
326 $a_set['status']
327 ? $this->lng->txt('trac_assigned')
328 : $this->lng->txt('trac_not_assigned')
329 );
330 $this->tpl->parseCurrentBlock();
331
332 // Parse grouped items
333 if (isset($a_set['grouped'])) {
334 foreach ((array) $a_set['grouped'] as $item) {
335 $item['group_item'] = true;
336 $this->fillRow($item);
337 }
338 }
339
340 // show num obligatory info
341 if (
342 is_array($a_set) &&
343 array_key_exists('grouped', $a_set) &&
344 count($a_set['grouped'])
345 ) {
346 $this->tpl->setCurrentBlock('num_passed_items');
347 $this->tpl->setVariable(
348 'MIN_PASSED_TXT',
349 $this->lng->txt('trac_min_passed')
350 );
351 $this->tpl->setVariable('NUM_OBLIGATORY', $a_set['num_obligatory']);
352 $this->tpl->setVariable('GRP_ID', $a_set['grouping_id']);
353 $this->tpl->parseCurrentBlock();
354 }
355 }
static _getFrame(string $a_class)
fillRow(array $a_set)
Standard Version of Fill Row.
const int LP_MODE_COLLECTION_MANUAL
const int LP_MODE_COLLECTION_TLT
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
static makeTimeSelect(string $prefix, bool $short=true, int $hour=0, int $minute=0, int $second=0, bool $a_use_default=true, array $a_further_options=[])
Creates a combination of HTML selects for time inputs.
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
static lookupTxtById(string $plugin_id, string $lang_var)
static _lookupObjectId(int $ref_id)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References $mode, ILIAS\UI\Implementation\Component\Input\Field\$options, ilFrameTargetInfo\_getFrame(), ilObject\_getIcon(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilLearningProgressAccess\checkPermission(), ILIAS\Repository\ctrl(), fillRow(), ilLegacyFormElementsUtil\formSelect(), ilUtil\getImagePath(), getMode(), ILIAS\Repository\lng(), ilObjectPlugin\lookupTxtById(), ilLPObjSettings\LP_MODE_COLLECTION_MANUAL, ilLPObjSettings\LP_MODE_COLLECTION_TLT, ilLPObjSettings\LP_MODE_DEACTIVATED, ilLPObjSettings\LP_MODE_UNDEFINED, and ilLegacyFormElementsUtil\makeTimeSelect().

Referenced by fillRow().

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

◆ getMode()

ilLPCollectionSettingsTableGUI::getMode ( )

Definition at line 54 of file class.ilLPCollectionSettingsTableGUI.php.

54 : int
55 {
56 return $this->mode;
57 }

References $mode.

Referenced by fillRow(), initTable(), and parse().

+ Here is the caller graph for this function:

◆ getNode()

ilLPCollectionSettingsTableGUI::getNode ( )

Definition at line 49 of file class.ilLPCollectionSettingsTableGUI.php.

References $node_id.

Referenced by __construct(), and parse().

+ Here is the caller graph for this function:

◆ initTable()

ilLPCollectionSettingsTableGUI::initTable ( )
protected

Definition at line 357 of file class.ilLPCollectionSettingsTableGUI.php.

357 : void
358 {
359 $this->setFormAction(
360 $this->ctrl->getFormAction($this->getParentObject())
361 );
362 switch ($this->getMode()) {
365 $this->setRowTemplate(
366 'tpl.lp_collection_row.html',
367 'components/ILIAS/Tracking'
368 );
369 $this->setTitle($this->lng->txt('trac_lp_determination'));
370 $this->setDescription(
371 $this->lng->txt('trac_lp_determination_info_crs')
372 );
373 break;
374
376 $this->setRowTemplate(
377 'tpl.lp_collection_row.html',
378 'components/ILIAS/Tracking'
379 );
380 $this->setTitle($this->lng->txt('trac_lp_determination_tutor'));
381 $this->setDescription(
382 $this->lng->txt('trac_lp_determination_info_crs_tutor')
383 );
384 break;
385
387 $this->setRowTemplate(
388 'tpl.lp_collection_scorm_row.html',
389 'components/ILIAS/Tracking'
390 );
391 $this->setTitle($this->lng->txt('trac_lp_determination'));
392 $this->setDescription(
393 $this->lng->txt('trac_lp_determination_info_sco')
394 );
395 break;
396
398 $this->setRowTemplate(
399 'tpl.lp_collection_subitem_row.html',
400 'components/ILIAS/Tracking'
401 );
402 $this->setTitle($this->lng->txt('trac_lp_determination'));
403 $this->setDescription(
404 $this->lng->txt('trac_lp_determination_info_crs')
405 );
406 $this->lng->loadLanguageModule("meta");
407
408 $this->addCommandButton('updateTLT', $this->lng->txt('save'));
409 break;
410
412 $this->setRowTemplate(
413 'tpl.lp_collection_subitem_row.html',
414 'components/ILIAS/Tracking'
415 );
416 $this->setTitle($this->lng->txt('trac_lp_determination'));
417 $this->setDescription(
418 $this->lng->txt('trac_lp_determination_info_mob')
419 );
420 break;
421 }
422
423 $this->addColumn('', '', '1px');
424 $this->addColumn($this->lng->txt('item'), 'title', '50%');
425
426 if ($this->getMode() != ilLPObjSettings::LP_MODE_SCORM &&
430 $this->addColumn($this->lng->txt('trac_mode'), 'mode');
431 } elseif ($this->getMode() == ilLPObjSettings::LP_MODE_COLLECTION_TLT) {
432 $this->addColumn(
433 $this->lng->txt('meta_typical_learning_time'),
434 'tlt'
435 );
436 }
437
439 $this->addMultiCommand(
440 'assign',
441 $this->lng->txt('trac_collection_assign')
442 );
443 $this->addMultiCommand(
444 'deassign',
445 $this->lng->txt('trac_collection_deassign')
446 );
447 $this->addColumn(
448 $this->lng->txt('trac_determines_learning_progress'),
449 'status'
450 );
451 } else {
452 $this->addMultiCommand(
453 'assign',
454 $this->lng->txt('trac_manual_display')
455 );
456 $this->addMultiCommand(
457 'deassign',
458 $this->lng->txt('trac_manual_no_display')
459 );
460 $this->addColumn(
461 $this->lng->txt('trac_manual_is_displayed'),
462 'status'
463 );
464 }
465
466 $this->enable('select_all');
467 $this->setSelectAllCheckbox('item_ids');
468
470 $this->addMultiCommand(
471 'groupMaterials',
472 $this->lng->txt('trac_group_materials')
473 );
474 }
475 }
const int LP_MODE_COLLECTION_MOBS
const int LP_MODE_MANUAL_BY_TUTOR
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setDescription(string $a_val)
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)
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 ilTable2GUI\addColumn(), ilTable2GUI\addCommandButton(), ilTable2GUI\addMultiCommand(), ILIAS\Repository\ctrl(), ilTableGUI\enable(), getMode(), ILIAS\Repository\lng(), ilLPObjSettings\LP_MODE_COLLECTION, ilLPObjSettings\LP_MODE_COLLECTION_MANUAL, ilLPObjSettings\LP_MODE_COLLECTION_MOBS, ilLPObjSettings\LP_MODE_COLLECTION_TLT, ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, ilLPObjSettings\LP_MODE_SCORM, ilTable2GUI\setDescription(), ilTable2GUI\setFormAction(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), and ilTable2GUI\setTitle().

Referenced by parse().

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

◆ parse()

ilLPCollectionSettingsTableGUI::parse ( ilLPCollection  $a_collection)

Read and parse items.

Definition at line 62 of file class.ilLPCollectionSettingsTableGUI.php.

62 : void
63 {
64 $this->setData($a_collection->getTableGUIData($this->getNode()));
65 $this->initTable();
66
67 // grouping actions
71 )) {
72 $this->addMultiCommand(
73 'releaseMaterials',
74 $this->lng->txt('trac_release_materials')
75 );
76
77 foreach ($this->row_data as $item) {
78 if ($item["grouped"]) {
79 $this->addCommandButton(
80 'saveObligatoryMaterials',
81 $this->lng->txt(
82 'trac_group_materials_save'
83 )
84 );
85 break;
86 }
87 }
88 }
89 }
static _lookupObjId(int $ref_id)
setData(array $a_data)
Set table data.

References ilObject\_lookupObjId(), ilTable2GUI\addCommandButton(), ilTable2GUI\addMultiCommand(), getMode(), getNode(), ilLPCollectionOfRepositoryObjects\hasGroupedItems(), initTable(), ILIAS\Repository\lng(), ilLPObjSettings\LP_MODE_COLLECTION, and ilTable2GUI\setData().

+ Here is the call graph for this function:

Field Documentation

◆ $mode

int ilLPCollectionSettingsTableGUI::$mode
private

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

Referenced by fillRow(), and getMode().

◆ $node_id

int ilLPCollectionSettingsTableGUI::$node_id
private

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

Referenced by getNode().

◆ $obj_definition

ilObjectDefinition ilLPCollectionSettingsTableGUI::$obj_definition
protected

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


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