18 ?
object $a_parent_obj,
25 $this->obj_definition = $DIC[
"objDefinition"];
26 $this->node_id = $a_node_id;
27 $this->mode = $a_mode;
50 $this->
setData($a_collection->getTableGUIData($this->getNode()));
60 $this->
lng->txt(
'trac_release_materials')
63 foreach ($this->row_data as $item) {
64 if ($item[
"grouped"]) {
66 'saveObligatoryMaterials',
68 'trac_group_materials_save' 77 protected function fillRow(array $a_set): void
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'] ??
"");
84 if ($this->obj_definition->isPluginTypeName($a_set[
"type"])) {
87 "obj_" . $a_set[
'type']
90 $alt = $this->
lng->txt(
'obj_' . $a_set[
'type']);
92 $this->tpl->setVariable(
'ALT_IMG', $alt);
93 $this->tpl->setVariable(
96 (
int) ($a_set[
'obj_id'] ?? 0),
105 if ($a_set[
'ref_id']) {
106 $this->tpl->setVariable(
113 $this->tpl->setVariable(
121 $this->tpl->setVariable(
123 $this->
lng->txt(
'path') .
': ' .
$path->getPath(
131 ($a_set[
'grouped'] ??
false) ||
132 ($a_set[
'group_item'] ?? null)) {
134 $mode_suffix =
'_INLINE';
136 if (!($a_set[
'group_item'] ??
false)) {
137 $this->tpl->setVariable(
"COLL_MODE",
"");
141 'edit_learning_progress',
142 (
int) $a_set[
'ref_id']
144 $gui_class =
"ilObj" . $this->obj_definition->getClassName(
147 $this->
ctrl->setParameterByClass(
148 ilLearningProgressGUI::class,
152 if (
'sahs' === $a_set[
'type']) {
158 $gui_class = ilSAHSEditGUI::class;
159 $scorm_class = ilObjSCORM2004LearningModuleGUI::class;
163 $gui_class = ilSAHSEditGUI::class;
164 $scorm_class = ilObjSCORMLearningModuleGUI::class;
172 $lp_settings_link = $this->
ctrl->getLinkTargetByClass(
176 ilLearningProgressGUI::class,
177 ilLPListOfSettingsGUI::class,
180 } elseif (
'lm' === $a_set[
'type']) {
181 $lp_settings_link = $this->
ctrl->getLinkTargetByClass(
183 ilLMEditorGUI::class,
184 ilObjLearningModuleGUI::class,
185 ilLearningProgressGUI::class,
189 $lp_settings_link = $this->
ctrl->getLinkTargetByClass(
191 ilRepositoryGUI::class,
193 ilLearningProgressGUI::class,
198 $this->
ctrl->clearParameterByClass(
199 ilLearningProgressGUI::class,
203 $a_set[
"mode"] =
'<a href="' . $lp_settings_link .
'">' . $a_set[
'mode'] .
'</a>';
206 $mode = $a_set[
'mode_id'];
208 $this->tpl->setVariable(
209 "COLL_MODE" . $mode_suffix,
213 $this->tpl->setVariable(
"COLL_MODE" . $mode_suffix,
"");
214 $this->tpl->setVariable(
215 "COLL_MODE_DEACTIVATED" . $mode_suffix,
219 if ($a_set[
"anonymized"]) {
220 $this->tpl->setVariable(
221 "ANONYMIZED" . $mode_suffix,
223 'trac_anonymized_info_short' 229 $this->tpl->setVariable(
231 $this->
lng->txt(
"trac_mode")
236 $this->tpl->setVariable(
'COLL_LINK', $a_set[
'url']);
240 $this->tpl->setCurrentBlock(
"tlt");
241 $this->tpl->setVariable(
243 $this->
lng->txt(
'md_months')
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)');
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);
259 for (
$i = 0;
$i <= 24;
$i++) {
260 $options[
$i] = sprintf(
'%02d',
$i);
262 $this->tpl->setVariable(
266 'tlt[' . $a_set[
'id'] .
'][mo]',
273 for (
$i = 0;
$i <= 31;
$i++) {
274 $options[
$i] = sprintf(
'%02d',
$i);
276 $this->tpl->setVariable(
280 'tlt[' . $a_set[
'id'] .
'][d]',
287 $this->tpl->setVariable(
290 'tlt[' . $a_set[
'id'] .
']',
299 $this->tpl->parseCurrentBlock();
304 $this->tpl->setVariable(
310 $this->tpl->setVariable(
313 ? $this->
lng->txt(
'trac_assigned')
314 : $this->
lng->txt(
'trac_not_assigned')
316 $this->tpl->parseCurrentBlock();
319 if (isset($a_set[
'grouped'])) {
320 foreach ((array) $a_set[
'grouped'] as $item) {
321 $item[
'group_item'] =
true;
329 array_key_exists(
'grouped', $a_set) &&
330 count($a_set[
'grouped'])
332 $this->tpl->setCurrentBlock(
'num_passed_items');
333 $this->tpl->setVariable(
335 $this->
lng->txt(
'trac_min_passed')
337 $this->tpl->setVariable(
'NUM_OBLIGATORY', $a_set[
'num_obligatory']);
338 $this->tpl->setVariable(
'GRP_ID', $a_set[
'grouping_id']);
339 $this->tpl->parseCurrentBlock();
346 $this->
ctrl->getFormAction($this->getParentObject())
352 'tpl.lp_collection_row.html',
355 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
357 $this->
lng->txt(
'trac_lp_determination_info_crs')
363 'tpl.lp_collection_row.html',
366 $this->
setTitle($this->
lng->txt(
'trac_lp_determination_tutor'));
368 $this->
lng->txt(
'trac_lp_determination_info_crs_tutor')
374 'tpl.lp_collection_scorm_row.html',
377 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
379 $this->
lng->txt(
'trac_lp_determination_info_sco')
385 'tpl.lp_collection_subitem_row.html',
388 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
390 $this->
lng->txt(
'trac_lp_determination_info_crs')
392 $this->
lng->loadLanguageModule(
"meta");
399 'tpl.lp_collection_subitem_row.html',
402 $this->
setTitle($this->
lng->txt(
'trac_lp_determination'));
404 $this->
lng->txt(
'trac_lp_determination_info_mob')
410 $this->
addColumn($this->
lng->txt(
'item'),
'title',
'50%');
419 $this->
lng->txt(
'meta_typical_learning_time'),
427 $this->
lng->txt(
'trac_collection_assign')
431 $this->
lng->txt(
'trac_collection_deassign')
434 $this->
lng->txt(
'trac_determines_learning_progress'),
440 $this->
lng->txt(
'trac_manual_display')
444 $this->
lng->txt(
'trac_manual_no_display')
447 $this->
lng->txt(
'trac_manual_is_displayed'),
452 $this->
enable(
'select_all');
458 $this->
lng->txt(
'trac_group_materials')
Creates a path for a start and endnode.
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)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
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)
parses the objects.xml it handles the xml-description of all ilias objects
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
static _lookupObjectId(int $ref_id)
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
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)