3declare(strict_types=1);
38 protected \ILIAS\DI\Container
$dic;
45 public function __construct(array $a_data,
int $a_id,
bool $a_call_by_reference, ?
bool $a_prepare_output =
true)
49 $this->
lng = $DIC->language();
50 $this->
access = $DIC->access();
51 $this->
ctrl = $DIC->ctrl();
52 $this->tpl =
$DIC[
"tpl"];
53 $this->
tabs = $DIC->tabs();
54 $this->rbacsystem =
$DIC->rbac()->system();
55 $this->tree =
$DIC->repositoryTree();
56 $this->
toolbar = $DIC->toolbar();
58 $this->
help = $DIC[
"ilHelp"];
59 $this->
error = $DIC[
"ilErr"];
60 $this->
user = $DIC->user();
61 $this->tool_context =
$DIC->globalScreen()->tool()->context();
70 #$this->tabs_gui = new ilTabsGUI();
79 if ($this->call_by_reference) {
92 $cmd = $ilCtrl->getCmd();
93 parent::executeCommand();
112 $ilTabs->setSubTabActive(
'cont_settings');
114 $ilToolbar->addButtonInstance($this->
object->getViewButton());
132 $this->
object->checkMasteryScoreValues();
135 $this->
form->setFormAction($ilCtrl->getFormAction($this));
136 $this->
form->setTitle($this->
lng->txt(
"cont_lm_properties"));
140 $ti->setMaxLength(200);
141 $this->
form->addItem($ti);
145 $this->
form->addItem($ti);
150 $this->
form->addItem($ne);
154 $ne->setValue($this->
object->getModuleVersion());
155 $ne->setInfo($this->
lng->txt(
"cont_sc_version_info"));
156 $this->
form->addItem($ne);
162 $sh->setTitle($this->
lng->txt(
"activation"));
163 $this->
form->addItem($sh);
167 $cb->setInfo($this->
lng->txt(
"cont_online_info"));
168 $this->
form->addItem($cb);
175 $sh->setTitle($this->
lng->txt(
"cont_presentation"));
176 $this->
form->addItem($sh);
193 $radg->addOption($op0);
195 $radg->addOption($op1);
197 $radg->addOption($op2);
200 $ni->setMaxLength(4);
202 $op1->addSubItem($ni);
204 $ni->setMaxLength(4);
206 $op2->addSubItem($ni);
209 $ni->setMaxLength(4);
211 $ni->setInfo($this->
lng->txt(
"cont_width_height_info"));
212 $op1->addSubItem($ni);
214 $ni->setMaxLength(4);
216 $ni->setInfo($this->
lng->txt(
"cont_width_height_info"));
217 $op2->addSubItem($ni);
222 $cb->setInfo($this->
lng->txt(
"cont_ie_force_render_info"));
223 $op2->addSubItem($cb);
225 $this->
form->addItem($radg);
232 $cb->setInfo($this->
lng->txt(
"cont_nomenu_info"));
233 $this->
form->addItem($cb);
239 $cb->setInfo($this->
lng->txt(
"cont_hidenavig_info"));
240 $this->
form->addItem($cb);
245 $cb->setInfo($this->
lng->txt(
"cont_auto_last_visited_info"));
246 $this->
form->addItem($cb);
249 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->addTileImage();
255 $sh->setTitle($this->
lng->txt(
"cont_scorm_options"));
256 $this->
form->addItem($sh);
260 $op0 =
new ilRadioOption($this->
lng->txt(
"cont_sc_less_mode_normal"),
"normal");
261 $radg->addOption($op0);
262 $op1 =
new ilRadioOption($this->
lng->txt(
"cont_sc_less_mode_browse"),
"browse");
263 $radg->addOption($op1);
267 $cmradg->addOption($cmop0);
268 $cmop1 =
new ilRadioOption($this->
lng->txt(
"cont_credit_off"),
"no_credit");
269 $cmradg->addOption($cmop1);
270 $op0->addSubItem($cmradg);
273 "n" => $this->
lng->txt(
"cont_sc_auto_review_no"),
274 "r" => $this->lng->txt(
"cont_sc_auto_review_completed_not_failed_or_passed"),
275 "p" => $this->lng->txt(
"cont_sc_auto_review_passed"),
276 "q" => $this->lng->txt(
"cont_sc_auto_review_passed_or_failed"),
277 "c" => $this->lng->txt(
"cont_sc_auto_review_completed"),
278 "d" => $this->lng->txt(
"cont_sc_auto_review_completed_and_passed"),
279 "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
280 "s" => $this->lng->txt(
"cont_sc_store_if_previous_score_was_lower")
283 $si->setOptions($options);
284 $si->setInfo($this->
lng->txt(
"cont_sc_auto_review_info_2004"));
285 $op0->addSubItem($si);
287 $this->
form->addItem($radg);
290 if ($this->
object->getMasteryScoreValues() !=
"") {
292 $ni->setMaxLength(3);
294 $ni->setInfo($this->
lng->txt(
"cont_mastery_score_2004_info") .
' ' . $this->object->getMasteryScoreValues());
295 $this->
form->addItem($ni);
302 $sh->setTitle($this->
lng->txt(
"cont_rte_settings"));
303 $this->
form->addItem($sh);
308 $cb->setInfo($this->
lng->txt(
"cont_sc_usession_info"));
309 $this->
form->addItem($cb);
314 $cb->setInfo($this->
lng->txt(
"cont_fourth_edition_info"));
315 $this->
form->addItem($cb);
320 $cb->setInfo($this->
lng->txt(
"cont_sequencing_info"));
321 $this->
form->addItem($cb);
326 $cb->setInfo($this->
lng->txt(
"cont_interactions_info"));
327 $this->
form->addItem($cb);
332 $cb->setInfo($this->
lng->txt(
"cont_objectives_info"));
333 $this->
form->addItem($cb);
338 $cb->setInfo($this->
lng->txt(
"cont_comments_info"));
339 $this->
form->addItem($cb);
344 $cb->setInfo($this->
lng->txt(
"cont_time_from_lms_info"));
345 $this->
form->addItem($cb);
350 $cb->setInfo($this->
lng->txt(
"cont_check_values_info"));
351 $this->
form->addItem($cb);
356 $cb->setInfo($this->
lng->txt(
"cont_auto_suspend_info"));
357 $this->
form->addItem($cb);
361 0 => $this->
lng->txt(
"cont_sc_id_setting_user_id"),
362 1 => $this->lng->txt(
"cont_sc_id_setting_user_login"),
363 2 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_ref_id"),
364 3 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_ref_id"),
365 4 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_obj_id"),
366 5 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_obj_id")
369 $si->setOptions($options);
370 $si->setInfo($this->
lng->txt(
"cont_sc_id_setting_info"));
371 $this->
form->addItem($si);
375 0 => $this->
lng->txt(
"cont_sc_name_setting_last_firstname"),
376 1 => $this->lng->txt(
"cont_sc_name_setting_first_lastname"),
377 2 => $this->lng->txt(
"cont_sc_name_setting_fullname"),
378 3 => $this->lng->txt(
"cont_sc_name_setting_salutation_lastname"),
379 4 => $this->lng->txt(
"cont_sc_name_setting_first_name"),
380 9 => $this->lng->txt(
"cont_sc_name_setting_no_name")
383 $si->setOptions($options);
384 $si->setInfo($this->
lng->txt(
"cont_sc_name_setting_info"));
385 $this->
form->addItem($si);
391 $sh->setTitle($this->
lng->txt(
"cont_debugging"));
392 $this->
form->addItem($sh);
397 if ($this->
object->getDebugActivated() ==
false) {
398 $cb->setDisabled(
true);
399 $cb->setInfo($this->
lng->txt(
"cont_debug_deactivated"));
401 $cb->setInfo($this->
lng->txt(
"cont_debug_deactivate"));
403 $this->
form->addItem($cb);
404 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
414 $values[
"Fobject_title"] = $this->
object->getTitle();
415 $values[
"Fobject_description"] = $this->
object->getLongDescription();
416 if (!$this->
object->getOfflineStatus()) {
417 $values[
"cobj_online"] =
true;
419 $values[
"open_mode"] = $this->
object->getOpenMode();
420 $values[
"width_0"] = $this->
object->getWidth();
421 $values[
"width_1"] = $this->
object->getWidth();
422 $values[
"height_0"] = $this->
object->getHeight();
423 $values[
"height_1"] = $this->
object->getHeight();
424 $values[
"cobj_ie_force_render"] = $this->
object->getIe_force_render();
425 $values[
"cobj_nomenu"] = $this->
object->getNoMenu();
426 $values[
"cobj_hidenavig"] = $this->
object->getHideNavig();
427 $values[
"cobj_auto_last_visited"] = $this->
object->getAuto_last_visited();
428 $values[
"lesson_mode"] = $this->
object->getDefaultLessonMode();
429 $values[
"credit_mode"] = $this->
object->getCreditMode();
430 $values[
"auto_review"] = $this->
object->getAutoReviewChar();
431 $values[
"mastery_score"] = $this->
object->getMasteryScore();
432 $values[
"cobj_session"] = $this->
object->getSession();
433 $values[
"cobj_fourth_edition"] = $this->
object->getFourth_edition();
434 $values[
"cobj_sequencing"] = $this->
object->getSequencing();
435 $values[
"cobj_interactions"] = $this->
object->getInteractions();
436 $values[
"cobj_objectives"] = $this->
object->getObjectives();
437 $values[
"cobj_comments"] = $this->
object->getComments();
438 $values[
"cobj_time_from_lms"] = $this->
object->getTime_from_lms();
439 $values[
"cobj_check_values"] = $this->
object->getCheck_values();
440 $values[
"cobj_auto_suspend"] = $this->
object->getAutoSuspend();
441 $values[
"id_setting"] = $this->
object->getIdSetting();
442 $values[
"name_setting"] = $this->
object->getNameSetting();
443 $values[
"cobj_debug"] = $this->
object->getDebug();
444 $this->
form->setValuesByArray($values);
455 $this->
form->checkInput();
456 if ($this->dic->http()->wrapper()->post()->has(
'mastery_score')) {
457 $sMasteryScore = $this->dic->http()->wrapper()->post()->retrieve(
'mastery_score', $this->dic->refinery()->kindlyTo()->string());
458 if ($sMasteryScore !==
"") {
459 $this->
object->setMasteryScore((
int) $sMasteryScore);
461 $this->
object->setMasteryScore(
null);
465 $t_auto_review = $this->dic->http()->wrapper()->post()->retrieve(
'auto_review', $this->dic->refinery()->kindlyTo()->string());
466 $t_auto_suspend = $this->dic->http()->wrapper()->post()->has(
'cobj_auto_suspend');
467 $t_session = $this->dic->http()->wrapper()->post()->has(
'cobj_session');
468 if ($t_auto_review ===
"s") {
469 $t_auto_suspend =
true;
474 $t_height = $this->
object->getHeight();
475 if ($this->dic->http()->wrapper()->post()->retrieve(
'height_0', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getHeight()) {
476 $t_height = $this->dic->http()->wrapper()->post()->retrieve(
'height_0', $this->dic->refinery()->kindlyTo()->int());
478 if ($this->dic->http()->wrapper()->post()->retrieve(
'height_1', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getHeight()) {
479 $t_height = $this->dic->http()->wrapper()->post()->retrieve(
'height_1', $this->dic->refinery()->kindlyTo()->int());
482 $t_width = $this->
object->getWidth();
483 if ($this->dic->http()->wrapper()->post()->retrieve(
'width_0', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getWidth()) {
484 $t_width = $this->dic->http()->wrapper()->post()->retrieve(
'width_0', $this->dic->refinery()->kindlyTo()->int());
486 if ($this->dic->http()->wrapper()->post()->retrieve(
'width_1', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getWidth()) {
487 $t_width = $this->dic->http()->wrapper()->post()->retrieve(
'width_1', $this->dic->refinery()->kindlyTo()->int());
490 $this->
object->setOfflineStatus(!($this->dic->http()->wrapper()->post()->has(
'cobj_online')));
491 $this->
object->setOpenMode($this->dic->http()->wrapper()->post()->retrieve(
'open_mode', $this->dic->refinery()->kindlyTo()->int()));
492 $this->
object->setWidth($t_width);
493 $this->
object->setHeight($t_height);
494 $this->
object->setCreditMode($this->dic->http()->wrapper()->post()->retrieve(
'credit_mode', $this->dic->refinery()->kindlyTo()->string()));
496 $this->
object->setAutoReviewChar($t_auto_review);
497 $this->
object->setDefaultLessonMode($this->dic->http()->wrapper()->post()->retrieve(
'lesson_mode', $this->dic->refinery()->kindlyTo()->string()));
498 $this->
object->setSession($t_session);
499 $this->
object->setNoMenu($this->dic->http()->wrapper()->post()->has(
'cobj_nomenu'));
500 $this->
object->setHideNavig($this->dic->http()->wrapper()->post()->has(
'cobj_hidenavig'));
501 $this->
object->setAuto_last_visited($this->dic->http()->wrapper()->post()->has(
'cobj_auto_last_visited'));
502 $this->
object->setIe_force_render($this->dic->http()->wrapper()->post()->has(
'cobj_ie_force_render'));
503 $this->
object->setFourth_edition($this->dic->http()->wrapper()->post()->has(
'cobj_fourth_edition'));
504 $this->
object->setSequencing($this->dic->http()->wrapper()->post()->has(
'cobj_sequencing'));
505 $this->
object->setInteractions($this->dic->http()->wrapper()->post()->has(
'cobj_interactions'));
506 $this->
object->setObjectives($this->dic->http()->wrapper()->post()->has(
'cobj_objectives'));
507 $this->
object->setComments($this->dic->http()->wrapper()->post()->has(
'cobj_comments'));
508 $this->
object->setTime_from_lms($this->dic->http()->wrapper()->post()->has(
'cobj_time_from_lms'));
509 $this->
object->setCheck_values($this->dic->http()->wrapper()->post()->has(
'cobj_check_values'));
510 $this->
object->setAutoSuspend($t_auto_suspend);
512 $this->
object->setDebug($this->dic->http()->wrapper()->post()->has(
'cobj_debug'));
513 $this->
object->setIdSetting($this->dic->http()->wrapper()->post()->retrieve(
'id_setting', $this->dic->refinery()->kindlyTo()->int()));
514 $this->
object->setNameSetting($this->dic->http()->wrapper()->post()->retrieve(
'name_setting', $this->dic->refinery()->kindlyTo()->int()));
515 $this->
object->setTitle($this->dic->http()->wrapper()->post()->retrieve(
'Fobject_title', $this->dic->refinery()->kindlyTo()->string()));
516 $this->
object->setDescription($this->dic->http()->wrapper()->post()->retrieve(
'Fobject_description', $this->dic->refinery()->kindlyTo()->string()));
519 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->saveTileImage();
521 $this->
object->update();
522 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
523 $this->
ctrl->redirect($this,
"properties");
534 $ilTabs->setTabActive(
"cont_tracking_data");
535 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
537 $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'tracInteractionItem',
'tracInteractionUser',
'tracInteractionUserAnswers');
539 $scoSelected =
"all";
540 if ($this->dic->http()->wrapper()->query()->has(
'scoSelected')) {
541 $scoSelected =
ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve(
'scoSelected', $this->dic->refinery()->kindlyTo()->string()));
543 if ($this->dic->http()->wrapper()->post()->has(
'scoSelected')) {
544 $scoSelected =
ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve(
'scoSelected', $this->dic->refinery()->kindlyTo()->string()));
547 $this->
ctrl->setParameter($this,
'scoSelected', $scoSelected);
550 if ($this->dic->http()->wrapper()->query()->has(
'report')) {
551 $report =
ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve(
'report', $this->dic->refinery()->kindlyTo()->string()));
553 if ($this->dic->http()->wrapper()->post()->has(
'report')) {
554 $report =
ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve(
'report', $this->dic->refinery()->kindlyTo()->string()));
556 $this->
ctrl->setParameter($this,
'report', $report);
558 $filter->parse($scoSelected, $report, $reports);
559 if ($report ===
"choose") {
560 $this->tpl->setContent($filter->form->getHTML());
562 $scosSelected = array();
563 if ($scoSelected !==
"all") {
564 $scosSelected[] = $scoSelected;
566 $tmpscos = $this->
object->getTrackedItems();
567 foreach ($tmpscos as
$i => $value) {
568 $scosSelected[] = $value[
"id"];
573 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
583 $ilTabs->setTabActive(
'cont_tracking_data');
585 if ($ilAccess->checkAccess(
"read_learning_progress",
"", $this->object->getRefId())) {
587 $ilTabs->setSubTabActive(
'cont_tracking_byuser');
589 $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportObjGlobalToSystem');
591 $userSelected =
"all";
592 if ($this->dic->http()->wrapper()->query()->has(
'userSelected')) {
593 $userSelected =
ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve(
'userSelected', $this->dic->refinery()->kindlyTo()->string()));
595 if ($this->dic->http()->wrapper()->post()->has(
'userSelected')) {
596 $userSelected =
ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve(
'userSelected', $this->dic->refinery()->kindlyTo()->string()));
598 $this->
ctrl->setParameter($this,
'userSelected', $userSelected);
601 if ($this->dic->http()->wrapper()->query()->has(
'report')) {
602 $report =
ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve(
'report', $this->dic->refinery()->kindlyTo()->string()));
604 if ($this->dic->http()->wrapper()->post()->has(
'report')) {
605 $report =
ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve(
'report', $this->dic->refinery()->kindlyTo()->string()));
607 $this->
ctrl->setParameter($this,
'report', $report);
609 $filter->parse($userSelected, $report, $reports);
610 if ($report ===
"choose") {
611 $this->tpl->setContent($filter->form->getHTML());
613 $usersSelected = array();
614 if ($userSelected !==
"all") {
615 $usersSelected[] = $userSelected;
618 foreach ($users as $usr) {
621 $usersSelected[] =
$user;
625 $scosSelected = array();
626 $tmpscos = $this->
object->getTrackedItems();
627 foreach ($tmpscos as
$i => $value) {
628 $scosSelected[] = $value[
"id"];
631 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
633 } elseif ($ilAccess->checkAccess(
"edit_learning_progress",
"", $this->object->getRefId())) {
getNextClass($a_gui_class=null)
@inheritDoc
Error Handling & global info handling uses PEAR error class.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
properties()
Scorm 2004 module properties.
getPropertiesFormValues()
Get values for properties form.
assignObject()
assign scorm object to scorm gui object
showTrackingItems()
Show tracking table.
initPropertiesForm()
Initialize properties form.
executeCommand()
execute command
showTrackingItemsBySco()
show tracking data
ContextServices $tool_context
saveProperties()
save scorm 2004 module properties
__construct(array $a_data, int $a_id, bool $a_call_by_reference, ?bool $a_prepare_output=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjSCORMLearningModuleGUI.
ilGlobalTemplateInterface $tpl
addHeaderAction()
Add header action menu.
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getParticipantsForObject(int $a_ref_id)
Get participant ids for given object.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
setContent(string $a_html)
Sets content for standard template.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form( $class_path, string $cmd)