ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 
 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 ()
 
 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)
 
- 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)
 
 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...
 

Protected Attributes

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

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 10 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 17 of file class.ilLPCollectionSettingsTableGUI.php.

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

22  {
23  global $DIC;
24 
25  $this->obj_definition = $DIC["objDefinition"];
26  $this->node_id = $a_node_id;
27  $this->mode = $a_mode;
28 
29  $this->setId('lpobjs_' . $this->getNode());
30  parent::__construct($a_parent_obj, $a_parent_cmd);
31 
32  $this->setShowRowsSelector(false);
33  }
setId(string $a_val)
global $DIC
Definition: feed.php:28
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ fillRow()

ilLPCollectionSettingsTableGUI::fillRow ( array  $a_set)
protected

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

References $i, $path, ilFrameTargetInfo\_getFrame(), ilObject\_getIcon(), ilLink\_getLink(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilLearningProgressAccess\checkPermission(), ILIAS\Repository\ctrl(), ilLegacyFormElementsUtil\formSelect(), ilUtil\getImagePath(), getMode(), getNode(), 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().

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

◆ getMode()

ilLPCollectionSettingsTableGUI::getMode ( )

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

References $mode.

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

40  : int
41  {
42  return $this->mode;
43  }
+ Here is the caller graph for this function:

◆ getNode()

ilLPCollectionSettingsTableGUI::getNode ( )

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

References $node_id.

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

35  : int
36  {
37  return $this->node_id;
38  }
+ Here is the caller graph for this function:

◆ initTable()

ilLPCollectionSettingsTableGUI::initTable ( )
protected

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

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().

343  : void
344  {
345  $this->setFormAction(
346  $this->ctrl->getFormAction($this->getParentObject())
347  );
348  switch ($this->getMode()) {
351  $this->setRowTemplate(
352  'tpl.lp_collection_row.html',
353  'Services/Tracking'
354  );
355  $this->setTitle($this->lng->txt('trac_lp_determination'));
356  $this->setDescription(
357  $this->lng->txt('trac_lp_determination_info_crs')
358  );
359  break;
360 
362  $this->setRowTemplate(
363  'tpl.lp_collection_row.html',
364  'Services/Tracking'
365  );
366  $this->setTitle($this->lng->txt('trac_lp_determination_tutor'));
367  $this->setDescription(
368  $this->lng->txt('trac_lp_determination_info_crs_tutor')
369  );
370  break;
371 
373  $this->setRowTemplate(
374  'tpl.lp_collection_scorm_row.html',
375  'Services/Tracking'
376  );
377  $this->setTitle($this->lng->txt('trac_lp_determination'));
378  $this->setDescription(
379  $this->lng->txt('trac_lp_determination_info_sco')
380  );
381  break;
382 
384  $this->setRowTemplate(
385  'tpl.lp_collection_subitem_row.html',
386  'Services/Tracking'
387  );
388  $this->setTitle($this->lng->txt('trac_lp_determination'));
389  $this->setDescription(
390  $this->lng->txt('trac_lp_determination_info_crs')
391  );
392  $this->lng->loadLanguageModule("meta");
393 
394  $this->addCommandButton('updateTLT', $this->lng->txt('save'));
395  break;
396 
398  $this->setRowTemplate(
399  'tpl.lp_collection_subitem_row.html',
400  'Services/Tracking'
401  );
402  $this->setTitle($this->lng->txt('trac_lp_determination'));
403  $this->setDescription(
404  $this->lng->txt('trac_lp_determination_info_mob')
405  );
406  break;
407  }
408 
409  $this->addColumn('', '', '1px');
410  $this->addColumn($this->lng->txt('item'), 'title', '50%');
411 
412  if ($this->getMode() != ilLPObjSettings::LP_MODE_SCORM &&
416  $this->addColumn($this->lng->txt('trac_mode'), 'mode');
417  } elseif ($this->getMode() == ilLPObjSettings::LP_MODE_COLLECTION_TLT) {
418  $this->addColumn(
419  $this->lng->txt('meta_typical_learning_time'),
420  'tlt'
421  );
422  }
423 
425  $this->addMultiCommand(
426  'assign',
427  $this->lng->txt('trac_collection_assign')
428  );
429  $this->addMultiCommand(
430  'deassign',
431  $this->lng->txt('trac_collection_deassign')
432  );
433  $this->addColumn(
434  $this->lng->txt('trac_determines_learning_progress'),
435  'status'
436  );
437  } else {
438  $this->addMultiCommand(
439  'assign',
440  $this->lng->txt('trac_manual_display')
441  );
442  $this->addMultiCommand(
443  'deassign',
444  $this->lng->txt('trac_manual_no_display')
445  );
446  $this->addColumn(
447  $this->lng->txt('trac_manual_is_displayed'),
448  'status'
449  );
450  }
451 
452  $this->enable('select_all');
453  $this->setSelectAllCheckbox('item_ids');
454 
456  $this->addMultiCommand(
457  'groupMaterials',
458  $this->lng->txt('trac_group_materials')
459  );
460  }
461  }
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setDescription(string $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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)
addMultiCommand(string $a_cmd, string $a_text)
+ 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 48 of file class.ilLPCollectionSettingsTableGUI.php.

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

Referenced by ilLPListOfSettingsGUI\getTableByMode().

48  : void
49  {
50  $this->setData($a_collection->getTableGUIData($this->getNode()));
51  $this->initTable();
52 
53  // grouping actions
57  )) {
58  $this->addMultiCommand(
59  'releaseMaterials',
60  $this->lng->txt('trac_release_materials')
61  );
62 
63  foreach ($this->row_data as $item) {
64  if ($item["grouped"]) {
65  $this->addCommandButton(
66  'saveObligatoryMaterials',
67  $this->lng->txt(
68  'trac_group_materials_save'
69  )
70  );
71  break;
72  }
73  }
74  }
75  }
setData(array $a_data)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
static _lookupObjId(int $ref_id)
addMultiCommand(string $a_cmd, string $a_text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $mode

int ilLPCollectionSettingsTableGUI::$mode
private

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

Referenced by getMode().

◆ $node_id

int ilLPCollectionSettingsTableGUI::$node_id
private

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

Referenced by getNode().

◆ $obj_definition

ilObjectDefinition ilLPCollectionSettingsTableGUI::$obj_definition
protected

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


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