19 declare(strict_types=1);
    34         ?
object $a_parent_obj,
    41         $this->obj_definition = $DIC[
"objDefinition"];
    42         $this->node_id = $a_node_id;
    43         $this->mode = $a_mode;
    66         $this->
setData($a_collection->getTableGUIData($this->getNode()));
    76                 $this->
lng->txt(
'trac_release_materials')
    79             foreach ($this->row_data as $item) {
    80                 if ($item[
"grouped"]) {
    82                         'saveObligatoryMaterials',
    84                             'trac_group_materials_save'    93     protected function fillRow(array $a_set): void
    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'] ?? 
"");
   100         if ($this->obj_definition->isPluginTypeName($a_set[
"type"])) {
   103                 "obj_" . $a_set[
'type']
   106             $alt = $this->
lng->txt(
'obj_' . $a_set[
'type']);
   108         $this->tpl->setVariable(
'ALT_IMG', $alt);
   109         $this->tpl->setVariable(
   112                 (
int) ($a_set[
'obj_id'] ?? 0),
   121             if ($a_set[
'ref_id']) {
   122                 $this->tpl->setVariable(
   129                 $this->tpl->setVariable(
   137                 $this->tpl->setVariable(
   139                     $this->
lng->txt(
'path') . 
': ' . 
$path->getPath(
   147                     ($a_set[
'grouped'] ?? 
false) ||
   148                     ($a_set[
'group_item'] ?? null)) {
   150                     $mode_suffix = 
'_INLINE';
   152                     if (!($a_set[
'group_item'] ?? 
false)) {
   153                         $this->tpl->setVariable(
"COLL_MODE", 
"");
   157                     'edit_learning_progress',
   158                     (
int) $a_set[
'ref_id']
   160                     $gui_class = 
"ilObj" . $this->obj_definition->getClassName(
   163                     $this->
ctrl->setParameterByClass(
   164                         ilLearningProgressGUI::class,
   168                     if (
'sahs' === $a_set[
'type']) {
   174                                 $gui_class = ilSAHSEditGUI::class;
   175                                 $scorm_class = ilObjSCORM2004LearningModuleGUI::class;
   179                                 $gui_class = ilSAHSEditGUI::class;
   180                                 $scorm_class = ilObjSCORMLearningModuleGUI::class;
   188                         $lp_settings_link = $this->
ctrl->getLinkTargetByClass(
   192                                 ilLearningProgressGUI::class,
   193                                 ilLPListOfSettingsGUI::class,
   196                     } elseif (
'lm' === $a_set[
'type']) {
   197                         $lp_settings_link = $this->
ctrl->getLinkTargetByClass(
   199                                 ilLMEditorGUI::class,
   200                                 ilObjLearningModuleGUI::class,
   201                                 ilLearningProgressGUI::class,
   205                         $lp_settings_link = $this->
ctrl->getLinkTargetByClass(
   207                                 ilRepositoryGUI::class,
   209                                 ilLearningProgressGUI::class,
   214                     $this->
ctrl->clearParameterByClass(
   215                         ilLearningProgressGUI::class,
   219                     $a_set[
"mode"] = 
'<a href="' . $lp_settings_link . 
'">' . $a_set[
'mode'] . 
'</a>'; 
   222                 $mode = $a_set[
'mode_id'];
   224                     $this->tpl->setVariable(
   225                         "COLL_MODE" . $mode_suffix,
   229                     $this->tpl->setVariable(
"COLL_MODE" . $mode_suffix, 
"");
   230                     $this->tpl->setVariable(
   231                         "COLL_MODE_DEACTIVATED" . $mode_suffix,
   235                 if ($a_set[
"anonymized"]) {
   236                     $this->tpl->setVariable(
   237                         "ANONYMIZED" . $mode_suffix,
   239                             'trac_anonymized_info_short'   245                     $this->tpl->setVariable(
   247                         $this->
lng->txt(
"trac_mode")
   252             $this->tpl->setVariable(
'COLL_LINK', $a_set[
'url']);
   256                 $this->tpl->setCurrentBlock(
"tlt");
   257                 $this->tpl->setVariable(
   259                     $this->
lng->txt(
'md_months')
   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)');
   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);
   275                 for ($i = 0; $i <= 24; $i++) {
   276                     $options[$i] = sprintf(
'%02d', $i);
   278                 $this->tpl->setVariable(
   282                         'tlt[' . $a_set[
'id'] . 
'][mo]',
   289                 for ($i = 0; $i <= 31; $i++) {
   290                     $options[$i] = sprintf(
'%02d', $i);
   292                 $this->tpl->setVariable(
   296                         'tlt[' . $a_set[
'id'] . 
'][d]',
   303                 $this->tpl->setVariable(
   306                         'tlt[' . $a_set[
'id'] . 
']',
   315                 $this->tpl->parseCurrentBlock();
   320         $this->tpl->setVariable(
   326         $this->tpl->setVariable(
   329                 ? $this->
lng->txt(
'trac_assigned')
   330                 : $this->
lng->txt(
'trac_not_assigned')
   332         $this->tpl->parseCurrentBlock();
   335         if (isset($a_set[
'grouped'])) {
   336             foreach ((array) $a_set[
'grouped'] as $item) {
   337                 $item[
'group_item'] = 
true;
   345             array_key_exists(
'grouped', $a_set) &&
   346             count($a_set[
'grouped'])
   348             $this->tpl->setCurrentBlock(
'num_passed_items');
   349             $this->tpl->setVariable(
   351                 $this->
lng->txt(
'trac_min_passed')
   353             $this->tpl->setVariable(
'NUM_OBLIGATORY', $a_set[
'num_obligatory']);
   354             $this->tpl->setVariable(
'GRP_ID', $a_set[
'grouping_id']);
   355             $this->tpl->parseCurrentBlock();
   362             $this->
ctrl->getFormAction($this->getParentObject())
   368                     'tpl.lp_collection_row.html',
   369                     'components/ILIAS/Tracking'   371                 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
   373                     $this->
lng->txt(
'trac_lp_determination_info_crs')
   379                     'tpl.lp_collection_row.html',
   380                     'components/ILIAS/Tracking'   382                 $this->
setTitle($this->
lng->txt(
'trac_lp_determination_tutor'));
   384                     $this->
lng->txt(
'trac_lp_determination_info_crs_tutor')
   390                     'tpl.lp_collection_scorm_row.html',
   391                     'components/ILIAS/Tracking'   393                 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
   395                     $this->
lng->txt(
'trac_lp_determination_info_sco')
   401                     'tpl.lp_collection_subitem_row.html',
   402                     'components/ILIAS/Tracking'   404                 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
   406                     $this->
lng->txt(
'trac_lp_determination_info_crs')
   408                 $this->
lng->loadLanguageModule(
"meta");
   415                     'tpl.lp_collection_subitem_row.html',
   416                     'components/ILIAS/Tracking'   418                 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
   420                     $this->
lng->txt(
'trac_lp_determination_info_mob')
   426         $this->
addColumn($this->
lng->txt(
'item'), 
'title', 
'50%');
   435                 $this->
lng->txt(
'meta_typical_learning_time'),
   443                 $this->
lng->txt(
'trac_collection_assign')
   447                 $this->
lng->txt(
'trac_collection_deassign')
   450                 $this->
lng->txt(
'trac_determines_learning_progress'),
   456                 $this->
lng->txt(
'trac_manual_display')
   460                 $this->
lng->txt(
'trac_manual_no_display')
   463                 $this->
lng->txt(
'trac_manual_is_displayed'),
   468         $this->
enable(
'select_all');
   474                 $this->
lng->txt(
'trac_group_materials')
 
ilObjectDefinition $obj_definition
 
enable(string $a_module_name)
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
const LP_MODE_MANUAL_BY_TUTOR
 
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)
 
const LP_MODE_COLLECTION_MANUAL
 
const LP_MODE_COLLECTION_TLT
 
parse(ilLPCollection $a_collection)
Read and parse items. 
 
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, ) 
 
static _lookupObjId(int $ref_id)
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
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 hasGroupedItems(int $a_obj_id)
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
static lookupTxtById(string $plugin_id, string $lang_var)
 
LP collection base class. 
 
const LP_MODE_DEACTIVATED
 
const LP_MODE_COLLECTION_MOBS
 
__construct(Container $dic, ilPlugin $plugin)
 
__construct(?object $a_parent_obj, string $a_parent_cmd, int $a_node_id, int $a_mode)
 
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks 
 
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)