ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 ()
 
 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_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.

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

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 
48  $this->setShowRowsSelector(false);
49  }
setId(string $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
global $DIC
Definition: shib_login.php:22
__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 93 of file class.ilLPCollectionSettingsTableGUI.php.

References $path, ilFrameTargetInfo\_getFrame(), ilObject\_getIcon(), 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, ilLegacyFormElementsUtil\makeTimeSelect(), and null.

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

References $mode.

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

56  : int
57  {
58  return $this->mode;
59  }
+ Here is the caller graph for this function:

◆ getNode()

ilLPCollectionSettingsTableGUI::getNode ( )

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

References $node_id.

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

51  : int
52  {
53  return $this->node_id;
54  }
+ Here is the caller graph for this function:

◆ initTable()

ilLPCollectionSettingsTableGUI::initTable ( )
protected

Definition at line 359 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().

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

64  : void
65  {
66  $this->setData($a_collection->getTableGUIData($this->getNode()));
67  $this->initTable();
68 
69  // grouping actions
73  )) {
74  $this->addMultiCommand(
75  'releaseMaterials',
76  $this->lng->txt('trac_release_materials')
77  );
78 
79  foreach ($this->row_data as $item) {
80  if ($item["grouped"]) {
81  $this->addCommandButton(
82  'saveObligatoryMaterials',
83  $this->lng->txt(
84  'trac_group_materials_save'
85  )
86  );
87  break;
88  }
89  }
90  }
91  }
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 29 of file class.ilLPCollectionSettingsTableGUI.php.

Referenced by 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: