4require_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
5require_once(
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
6require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Export.php");
7include_once(
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
8include_once(
"./Services/Style/classes/class.ilPageLayout.php");
35 $lng->loadLanguageModule(
"content");
36 $lng->loadLanguageModule(
"sahs");
37 $lng->loadLanguageModule(
"search");
38 $lng->loadLanguageModule(
"exp");
40 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
41 #$this->tabs_gui =& new ilTabsGUI();
51 $next_class =
$ilCtrl->getNextClass($this);
54 if ($this->object->getEditable() &&
$cmd !=
"showEditTree")
60 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
63 $form_gui->updateExpanded();
71 switch(
$_GET[
"notes_mode"])
74 $ilTabs->setTabActive(
"sahs_organization");
80 case "ilscorm2004chaptergui":
81 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ChapterGUI.php");
83 $chap_gui->setParentGUI($this);
84 return $ilCtrl->forwardCommand($chap_gui);
87 case "ilscorm2004seqchaptergui":
88 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004SeqChapterGUI.php");
90 $chap_gui->setParentGUI($this);
91 return $ilCtrl->forwardCommand($chap_gui);
94 case "ilscorm2004scogui":
95 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
97 $sco_gui->setParentGUI($this);
98 return $ilCtrl->forwardCommand($sco_gui);
101 case "ilscorm2004assetgui":
102 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004AssetGUI.php");
104 $ass_gui->setParentGUI($this);
105 return $ilCtrl->forwardCommand($ass_gui);
108 case "ilscorm2004pagenodegui":
109 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
111 $page_gui->setParentGUI($this);
112 $ilCtrl->forwardCommand($page_gui);
116 parent::executeCommand();
132 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorerGUI.php");
134 if (!$exp->handleCommand())
136 $tpl->setLeftNavContent($exp->getHTML());
149 if (
$_GET[
"obj_id"] > 0)
151 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
154 if (in_array($type, array(
"sco",
"chap",
"seqc",
"page")))
156 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
157 $this->ctrl->redirect($this,
"jumpToNode");
161 if ($a_to_organization)
163 $this->ctrl->redirect($this,
"showOrganization");
167 $this->ctrl->redirect($this,
"properties");
181 if ($this->object->getEditable())
183$this->ctrl->redirect($this,
"properties");
184 include_once(
"./Services/Frameset/classes/class.ilFramesetGUI.php");
186 $fs_gui->setFramesetTitle($this->lng->txt(
"editor"));
187 $fs_gui->setMainFrameName(
"content");
188 $fs_gui->setSideFrameName(
"tree");
189 $this->ctrl->setParameter($this,
"active_node",
$_GET[
"obj_id"]);
190 $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this,
"showTree"));
191 $this->ctrl->setParameter($this,
"activeNode",
"");
192 if (
$_GET[
"obj_id"] > 0)
194 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
197 if (in_array($type, array(
"sco",
"chap",
"seqc",
"page")))
199 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
200 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"jumpToNode"));
204 if ($a_to_organization)
206 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"showOrganization"));
210 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"properties"));
218 $this->tpl =
new ilTemplate(
"tpl.sahs_edit_frameset.html",
false,
false,
"Modules/ScormAicc");
219 $this->tpl->setVariable(
"SRC",
220 $this->ctrl->getLinkTarget($this,
"properties"));
221 $this->tpl->show(
"DEFAULT",
false);
226 function jumpToNode($a_anchor_node =
"", $a_highlight_ids =
"")
230 $anchor = ($a_anchor_node !=
"")
231 ?
"node_".$a_anchor_node
234 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
236 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
240 $ilCtrl->setParameterByClass(
"ilscorm2004scogui",
"highlight", $a_highlight_ids);
241 $ilCtrl->redirectByClass(
"ilscorm2004scogui",
"showOrganization", $anchor);
243 $ilCtrl->setParameterByClass(
"ilscorm2004assetgui",
"highlight", $a_highlight_ids);
244 $ilCtrl->redirectByClass(
"ilscorm2004assetgui",
"showOrganization", $anchor);
246 $ilCtrl->setParameterByClass(
"ilscorm2004chaptergui",
"highlight", $a_highlight_ids);
247 $ilCtrl->redirectByClass(
"ilscorm2004chaptergui",
"showOrganization", $anchor);
249 $ilCtrl->setParameterByClass(
"ilscorm2004seqchaptergui",
"highlight", $a_highlight_ids);
250 $ilCtrl->redirectByClass(
"ilscorm2004seqchaptergui",
"showOrganization", $anchor);
252 $ilCtrl->redirectByClass(
"ilscorm2004pagenodegui",
"edit");
263 $this->
setSubTabs(
"settings",
"general_settings");
265 $lng->loadLanguageModule(
"style");
268 if ($this->object->editable != 1)
271 $ilTabs->setSubTabActive(
'cont_settings');
273 $ilToolbar->addButton($this->lng->txt(
"view"),
274 "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID(),
283 $parent_ref_id =
$tree->getParentId((
int)
$_GET[
"ref_id"]);
284 if ($rbacsystem->checkAccess(
"create", $parent_ref_id,
"glo"))
286 $ilToolbar->addButton($this->lng->txt(
"cont_glo_create"),
287 $ilCtrl->getLinkTarget($this,
"createGlossary"));
289 $ilToolbar->addButton($this->lng->txt(
"cont_glo_assign"),
290 $ilCtrl->getLinkTarget($this,
"assignGlossary"));
294 $ilToolbar->addButton($this->lng->txt(
"cont_glo_detach"),
295 $ilCtrl->getLinkTarget($this,
"detachGlossary"));
299 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
300 $style_id = $this->
object->getStyleSheetId();
302 if ($fixed_style == 0)
307 $st_styles[0] = $this->lng->txt(
"default");
315 $ilToolbar->addSeparator();
318 $ilToolbar->addButton($this->lng->txt(
"cont_edit_style"),
319 $ilCtrl->getLinkTarget($this,
"editStyle"));
320 $ilToolbar->addButton($this->lng->txt(
"cont_delete_style"),
321 $ilCtrl->getLinkTarget($this,
"deleteStyle"));
327 $ilToolbar->addSeparator();
329 $ilToolbar->addButton($this->lng->txt(
"sty_create_ind_style"),
330 $ilCtrl->getLinkTarget($this,
"createStyle"));
336 if ($this->object->editable != 1)
339 $tpl->setContent($this->form->getHTML());
345 $tpl->setContent($this->form->getHTML());
359 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
361 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
362 $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
367 $this->form->addItem($ne);
371 $ne->setValue($this->object->getModuleVersion());
372 $this->form->addItem($ne);
377 if ($this->object->getOnline())
379 $cb->setChecked(
true);
381 $this->form->addItem($cb);
384 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_offline_mode_allow"),
"cobj_offline_mode");
386 $cb->setChecked($this->object->getOfflineMode());
387 include_once(
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
389 $cb->setDisabled(
true);
390 $cb->setInfo($this->lng->txt(
"cont_offline_mode_disable_not_allowed_info"));
392 $cb->setInfo($this->lng->txt(
"cont_offline_mode_allow_info"));
394 $this->form->addItem($cb);
400 $sh->setTitle($this->lng->txt(
"cont_presentation"));
401 $this->form->addItem($sh);
405 "0" => $this->lng->txt(
"cont_open_normal"),
406 "1" => $this->lng->txt(
"cont_open_iframe_max"),
407 "2" => $this->lng->txt(
"cont_open_iframe_defined"),
408 "5" => $this->lng->txt(
"cont_open_window_undefined"),
409 "6" => $this->lng->txt(
"cont_open_window_defined")
413 $si->setValue($this->object->getOpenMode());
414 $this->form->addItem(
$si);
418 $ni->setMaxLength(4);
420 $ni->setValue($this->object->getWidth());
421 $this->form->addItem($ni);
425 $ni->setMaxLength(4);
427 $ni->setValue($this->object->getHeight());
428 $this->form->addItem($ni);
433 $cb->setChecked($this->object->getNoMenu());
434 $this->form->addItem($cb);
439 $cb->setChecked($this->object->getHideNavig());
440 $this->form->addItem($cb);
443 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_last_visited"),
"cobj_auto_last_visited");
445 $cb->setChecked($this->object->getAuto_last_visited());
446 $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
447 $this->form->addItem($cb);
450 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_ie_compatibility"),
"cobj_ie_compatibility");
452 $cb->setChecked($this->object->getIe_compatibility());
453 $cb->setInfo($this->lng->txt(
"cont_ie_compatibility_info"));
454 $this->form->addItem($cb);
457 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_ie_force_render"),
"cobj_ie_force_render");
459 $cb->setChecked($this->object->getIe_force_render());
460 $cb->setInfo($this->lng->txt(
"cont_ie_force_render_info"));
461 $this->form->addItem($cb);
467 $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
468 $this->form->addItem($sh);
471 $ni =
new ilNumberInputGUI($this->lng->txt(
"cont_sc_max_attempt"),
"max_attempt");
472 $ni->setMaxLength(3);
474 $ni->setValue($this->object->getMaxAttempt());
475 $this->form->addItem($ni);
478 $options = array(
"normal" => $this->lng->txt(
"cont_sc_less_mode_normal"),
479 "browse" => $this->lng->txt(
"cont_sc_less_mode_browse"));
482 $si->setValue($this->object->getDefaultLessonMode());
483 $this->form->addItem(
$si);
486 $options = array(
"credit" => $this->lng->txt(
"cont_credit_on"),
487 "no_credit" => $this->lng->txt(
"cont_credit_off"));
490 $si->setValue($this->object->getCreditMode());
491 $si->setInfo($this->lng->txt(
"cont_credit_mode_info"));
492 $this->form->addItem(
$si);
496 "n" => $this->lng->txt(
"cont_sc_auto_review_no"),
497 "r" => $this->lng->txt(
"cont_sc_auto_review_completed_not_failed_or_passed"),
498 "p" => $this->lng->txt(
"cont_sc_auto_review_passed"),
499 "q" => $this->lng->txt(
"cont_sc_auto_review_passed_or_failed"),
500 "c" => $this->lng->txt(
"cont_sc_auto_review_completed"),
501 "d" => $this->lng->txt(
"cont_sc_auto_review_completed_and_passed"),
502 "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
506 $si->setValue($this->object->getAutoReviewChar());
507 $si->setInfo($this->lng->txt(
"cont_sc_auto_review_info_2004"));
508 $this->form->addItem(
$si);
514 $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
515 $this->form->addItem($sh);
520 $cb->setChecked($this->object->getSession());
521 $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
522 $this->form->addItem($cb);
525 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_fourth_edition"),
"cobj_fourth_edition");
527 $cb->setChecked($this->object->getFourth_edition());
528 $cb->setInfo($this->lng->txt(
"cont_fourth_edition_info"));
529 $this->form->addItem($cb);
534 $cb->setChecked($this->object->getSequencing());
535 $cb->setInfo($this->lng->txt(
"cont_sequencing_info"));
536 $this->form->addItem($cb);
539 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"),
"cobj_interactions");
541 $cb->setChecked($this->object->getInteractions());
542 $this->form->addItem($cb);
547 $cb->setChecked($this->object->getObjectives());
548 $this->form->addItem($cb);
553 $cb->setChecked($this->object->getComments());
554 $this->form->addItem($cb);
557 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"),
"cobj_time_from_lms");
559 $cb->setChecked($this->object->getTime_from_lms());
560 $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
561 $this->form->addItem($cb);
564 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"),
"cobj_check_values");
566 $cb->setChecked($this->object->getCheck_values());
567 $this->form->addItem($cb);
570 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_suspend"),
"cobj_auto_suspend");
572 $cb->setChecked($this->object->getAutoSuspend());
573 $cb->setInfo($this->lng->txt(
"cont_auto_suspend_info"));
574 $this->form->addItem($cb);
580 $sh->setTitle($this->lng->txt(
"cont_debugging"));
581 $this->form->addItem($sh);
586 $cb->setChecked($this->object->getDebug());
587 if ($this->object->getDebugActivated() ==
false)
589 $cb->setDisabled(
true);
590 $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
594 $cb->setInfo($this->lng->txt(
"cont_debug_deactivate"));
596 $this->form->addItem($cb);
597 $this->form->addCommandButton(
"saveProperties",
$lng->txt(
"save"));
608 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
613 "" =>
$lng->txt(
"please_select"),
615 $langs =
$lng->getInstalledLanguages();
616 $lng->loadLanguageModule(
"meta");
617 foreach ($langs as $l)
621 $loc =
new ilSelectInputGUI($this->lng->txt(
"cont_localization"),
"localization");
623 $loc->setInfo($this->lng->txt(
"cont_localization_info"));
624 $this->form->addItem($loc);
628 $this->form->addItem($ne);
631 $lng->loadLanguageModule(
"style");
632 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
633 $style_id = $this->
object->getStyleSheetId();
635 if ($fixed_style > 0)
639 $this->lng->txt(
"global_fixed").
")");
640 $this->form->addItem($st);
647 $st_styles[0] = $this->lng->txt(
"default");
657 $this->form->addItem($st);
664 $st_styles,
false,
true);
666 $style_sel->setOptions($st_styles);
667 $style_sel->setValue($style_id);
668 $this->form->addItem($style_sel);
674 $ni->setInfo(
$lng->txt(
"cont_qtries_info"));
675 $ni->setMaxLength(3);
677 $this->form->addItem($ni);
680 $this->form->addCommandButton(
"saveProperties",
$lng->txt(
"save"));
682 $this->form->setTitle(
$lng->txt(
"cont_scorm_ed_properties"));
683 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
699 $values[
"glossary"] = $this->lng->txt(
"cont_no_glossary");
701 $values[
"q_tries"] = $this->
object->getTries();
702 $values[
"localization"] = $this->
object->getLocalization();
703 $values[
"style_id"] = $this->
object->getStyleSheetId();
705 $this->form->setValuesByArray($values);
715 if ($this->object->editable != 1)
721 if ($tmpOfflineMode ==
true) {
723 $tmpFourth_edition =
false;
724 if ($this->object->getOfflineMode() ==
false) {
725 $this->
object->zipLmForOfflineMode();
730 $this->
object->setOpenMode(
$_POST[
"open_mode"]);
731 $this->
object->setWidth(
$_POST[
"width"]);
732 $this->
object->setHeight(
$_POST[
"height"]);
733 $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
734 $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
735 $this->
object->setAutoReviewChar(
$_POST[
"auto_review"]);
736 $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
743 $this->
object->setFourth_edition($tmpFourth_edition);
744 $this->
object->setSequencing($tmpSequencing);
751 $this->
object->setOfflineMode($tmpOfflineMode);
759 if ($this->form->checkInput())
761 $this->
object->setTries(
$_POST[
"q_tries"]);
762 $this->
object->setLocalization(
$_POST[
"localization"]);
764 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
766 || $this->object->getStyleSheetId() == 0))
772 $this->
object->update();
774 $this->ctrl->redirect($this,
"properties");
784 $this->
object->setAssignedGlossary(0);
785 $this->
object->update();
786 $ilCtrl->redirect($this,
"properties");
797 $tpl->setContent($this->form->getHTML());
807 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
812 $ti->setRequired(
true);
813 $this->form->addItem($ti);
817 $this->form->addItem($ta);
819 $this->form->addCommandButton(
"saveGlossary",
$lng->txt(
"save"));
820 $this->form->addCommandButton(
"properties",
$lng->txt(
"cancel"));
822 $this->form->setTitle(
$lng->txt(
"cont_glo_create"));
823 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
833 $parent_ref_id =
$tree->getParentId((
int)
$_GET[
"ref_id"]);
834 if (!$rbacsystem->checkAccess(
"create", $parent_ref_id,
"glo"))
837 $ilCtrl->redirect($this,
"properties");
841 if ($this->form->checkInput())
843 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
845 $newObj->setType(
"glo");
846 $newObj->setTitle(
$_POST[
"title"]);
847 $newObj->setDescription(
$_POST[
"description"]);
848 $newObj->setVirtualMode(
"none");
850 $newObj->createReference();
851 $newObj->putInTree($parent_ref_id);
852 $newObj->setPermissions($parent_ref_id);
853 $newObj->notify(
"new",$parent_ref_id,
$_GET[
"parent_non_rbac_id"],$parent_ref_id,$newObj->getRefId());
856 $this->
object->setAssignedGlossary($newObj->getId());
857 $this->
object->update();
860 $ilCtrl->redirect($this,
"properties");
863 $this->form->setValuesByPost();
864 $tpl->setContent($this->form->getHtml());
874 include_once(
"./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
876 $ilCtrl->getLinkTarget($this,
"selectGlossary"),
"ilobjscorm2004learningmodulegui");
877 $exp->setSelectableTypes(array(
"glo"));
879 if (
$_GET[
"expand"] ==
"")
881 $expanded =
$tree->readRootId();
885 $expanded =
$_GET[
"expand"];
887 $exp->setExpand($expanded);
889 $exp->setTargetGet(
"glo_id");
892 $exp->setParamsGet($this->ctrl->getParameterArray($this,
"assignGlossary"));
895 $exp->setFiltered(
true);
897 $exp->addFilter(
"root");
898 $exp->addFilter(
"cat");
899 $exp->addFilter(
"grp");
900 $exp->addFilter(
"fold");
901 $exp->addFilter(
"crs");
902 $exp->addFilter(
"glo");
906 $tpl->setContent($exp->getOutput());
917 $this->
object->update();
918 $ilCtrl->redirect($this,
"properties");
928 if ($this->call_by_reference)
947 $tpl->setContent($this->form->getHTML());
957 $lng->loadLanguageModule(
"style");
959 $ilTabs->setTabActive(
"settings");
961 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
964 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
965 $style_id = $this->
object->getStyleSheetId();
967 if ($fixed_style > 0)
971 $this->lng->txt(
"global_fixed").
")");
972 $this->form->addItem($st);
979 $st_styles[0] = $this->lng->txt(
"default");
989 $this->form->addItem($st);
994 $this->form->addCommandButton(
"editStyle",
995 $lng->txt(
"cont_edit_style"));
996 $this->form->addCommandButton(
"deleteStyle",
997 $lng->txt(
"cont_delete_style"));
1005 $st_styles,
false,
true);
1007 $style_sel->setOptions($st_styles);
1008 $style_sel->setValue($style_id);
1009 $this->form->addItem($style_sel);
1011 $this->form->addCommandButton(
"saveStyleSettings",
1013 $this->form->addCommandButton(
"createStyle",
1014 $lng->txt(
"sty_create_ind_style"));
1017 $this->form->setTitle(
$lng->txt(
"cont_style"));
1018 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
1028 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1038 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1048 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1058 if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
1060 || $this->object->getStyleSheetId() == 0))
1063 $this->
object->update();
1066 $this->ctrl->redirect($this,
"editStyleProperties");
1078 $ilTabs->setTabActive(
"cont_tracking_data");
1079 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
1081 $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'tracInteractionItem',
'tracInteractionUser',
'tracInteractionUserAnswers');
1083 $scoSelected =
"all";
1086 $this->ctrl->setParameter($this,
'scoSelected',$scoSelected);
1091 $this->ctrl->setParameter($this,
'report',$report);
1093 include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerScoFilterGUI.php';
1095 $filter->parse($scoSelected,$report,$reports);
1096 if($report ==
"choose") {
1097 $this->tpl->setContent($filter->form->getHTML());
1099 $scosSelected = array();
1100 if ($scoSelected !=
"all") $scosSelected[] = $scoSelected;
1102 $tmpscos=$this->
object->getTrackedItems();
1103 for ($i=0; $i<count($tmpscos); $i++) {
1104 $scosSelected[] = $tmpscos[$i][
"id"];
1108 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
1111 include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1113 $this->tpl->setContent($filter->form->getHTML().$tbl->getHTML());
1119 global $ilTabs, $ilAccess;
1121 $ilTabs->setTabActive(
'cont_tracking_data');
1123 if($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
1126 $ilTabs->setSubTabActive(
'cont_tracking_byuser');
1128 $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportObjGlobalToSystem');
1130 $userSelected =
"all";
1133 $this->ctrl->setParameter($this,
'userSelected',$userSelected);
1138 $this->ctrl->setParameter($this,
'report',$report);
1140 include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerUserFilterGUI.php';
1142 $filter->parse($userSelected,$report,$reports);
1143 if($report ==
"choose") {
1144 $this->tpl->setContent($filter->form->getHTML());
1146 $usersSelected = array();
1147 if ($userSelected !=
"all") $usersSelected[] = $userSelected;
1149 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
1151 foreach($users as $user) {
1153 $usersSelected[] = $user;
1157 $scosSelected = array();
1158 $tmpscos=$this->
object->getTrackedItems();
1159 for ($i=0; $i<count($tmpscos); $i++) {
1160 $scosSelected[] = $tmpscos[$i][
"id"];
1166 include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1168 $this->tpl->setContent($filter->form->getHTML().$tbl->getHTML());
1171 else if($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
1184 foreach (
$_POST[
"user"] as $user)
1186 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004DeleteData.php");
1189 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1193 $this->ctrl->redirect($this,
"modifyTrackingItems");
1199 if (is_array(
$_POST[
"id"]))
1201 $this->
object->deleteTrackingDataOfUsers(
$_POST[
"id"]);
1213 $mtree =
new ilTree($this->object->getId());
1214 $mtree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1215 $mtree->setTreeTablePK(
"slm_id");
1217 if (
$_POST[
"expandAll"] !=
"")
1219 $_GET[
"scexpand"] =
"";
1220 $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
1222 foreach ($stree as
$n)
1224 $n_arr[] =
$n[
"child"];
1229 if (
$_POST[
"collapseAll"] !=
"")
1231 $_GET[
"scexpand"] =
"";
1232 $_SESSION[
"scexpand"] = array($mtree->readRootId());
1235 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1238 $ilCtrl->setParameter($this,
"active_node",
$_GET[
"active_node"]);
1240 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
1243 $this->tpl->setCurrentBlock(
"exp2_button");
1244 $this->tpl->setVariable(
"CMD_EXP2_BTN",
"expandAll");
1245 $this->tpl->setVariable(
"TXT_EXP2_BTN",
$lng->txt(
"expand_all"));
1246 $this->tpl->parseCurrentBlock();
1248 $this->tpl->setCurrentBlock(
"exp2_button");
1249 $this->tpl->setVariable(
"CMD_EXP2_BTN",
"collapseAll");
1250 $this->tpl->setVariable(
"TXT_EXP2_BTN",
$lng->txt(
"collapse_all"));
1251 $this->tpl->parseCurrentBlock();
1253 require_once (
"./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
1254 $exp =
new ilSCORM2004EditorExplorer($this->ctrl->getLinkTarget($this,
"edit"),
1256 $exp->setFrameUpdater(
"content",
"ilHierarchyFormUpdater");
1257 $exp->setTargetGet(
"obj_id");
1258 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"showTree"));
1260 if (
$_GET[
"scexpand"] ==
"")
1262 $expanded = $mtree->readRootId();
1266 $expanded =
$_GET[
"scexpand"];
1270 if (
$_GET[
"active_node"] !=
"")
1272 $path = $mtree->getPathId(
$_GET[
"active_node"]);
1273 $exp->setForceOpenPath(
$path);
1275 $exp->highlightNode(
$_GET[
"active_node"]);
1277 $exp->setExpand($expanded);
1281 $output = $exp->getOutput();
1289 $this->tpl->setCurrentBlock(
"content");
1290 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"sahs_organization"));
1291 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
1292 $this->tpl->setVariable(
"EXPLORER",$output);
1293 $this->ctrl->setParameter($this,
"scexpand",
$_GET[
"scexpand"]);
1294 $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this,
"showTree"));
1295 $this->tpl->parseCurrentBlock();
1297 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1300 $this->tpl->show(
false);
1313 $ilTabs->setTabActive(
"sahs_sequencing");
1315 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1317 if (!$this->object->getSequencingExpertMode())
1319 $ilToolbar->addButton(
$lng->txt(
"sahs_activate_expert_mode"),
1320 $ilCtrl->getLinkTarget($this,
"confirmExpertMode"));
1324 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
1326 $t = $this->
object->getTree();
1327 $root_node =
$t->getNodeData(
$t->getRootId());
1328 $nodes = $this->
object->getTree()->getSubtree($root_node);
1329 foreach ($nodes as $node)
1331 if (in_array($node[
"type"], array(
"",
"chap",
"sco")))
1333 $ntpl =
new ilTemplate(
"tpl.seq_node.html",
true,
true,
"Modules/Scorm2004");
1334 $ntpl->setVariable(
"NODE_ID", $node[
"child"]);
1335 if ($node[
"type"] ==
"")
1337 $ntpl->setVariable(
"TITLE", $this->object->getTitle());
1342 $ntpl->setVariable(
"TITLE", $node[
"title"]);
1345 $ntpl->setVariable(
"SEQ_INFO",
1347 $list->addListNode($ntpl->get(), $node[
"child"], $node[
"parent"]);
1352 $tb->addFormButton(
$lng->txt(
"save"),
"saveSequencing");
1353 $ftpl =
new ilTemplate(
"tpl.sequencing.html",
true,
true,
"Modules/Scorm2004");
1354 $ftpl->setVariable(
"CONTENT", $list->getHTML());
1355 $ftpl->setVariable(
"FORM_ACTION",
$ilCtrl->getFormAction($this));
1356 $ftpl->setVariable(
"TB", $tb->getHTML());
1357 $tpl->setContent($ftpl->get());
1368 $ilTabs->setTabActive(
"sahs_sequencing");
1370 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1372 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
1373 $cgui->setHeaderText(
$lng->txt(
"sahs_activate_expert_mode_info"));
1374 $cgui->setCancel(
$lng->txt(
"cancel"),
"showSequencing");
1375 $cgui->setConfirm(
$lng->txt(
"sahs_activate_expert_mode"),
"activateExpertMode");
1377 $tpl->setContent($cgui->getHTML());
1390 $this->
object->setSequencingExpertMode(
true);
1391 $this->
object->update();
1393 $ilCtrl->redirect($this,
"showSequencing");
1404 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1405 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
1406 $t = $this->
object->getTree();
1407 $root_node =
$t->getNodeData(
$t->getRootId());
1408 $nodes = $this->
object->getTree()->getSubtree($root_node);
1409 foreach ($nodes as $node)
1411 if (in_array($node[
"type"], array(
"",
"chap",
"sco")))
1413 if ($node[
"type"] ==
"")
1421 $xml =
'<?xml version="1.0"?>'.ilUtil::stripSlashes(
$_POST[
"seq"][$node[
"child"]],
false);
1423 $ob_texts = array();
1424 if ($node[
"type"] ==
"sco")
1427 $objectives = $sco->getObjectives();
1428 foreach ($objectives as $o)
1430 $ob_texts[$o->getId()] = $o->getObjectiveId();
1434 $item->setSeqXml($xml);
1438 if ($node[
"type"] ==
"sco")
1440 foreach ($ob_texts as $id =>
$t)
1442 $objective =
new ilScorm2004Objective($node[
"child"], $id);
1443 $objective->setObjectiveId(
$t);
1444 $objective->updateObjective();
1452 $ilCtrl->redirect($this,
"showSequencing");
1462 $chaps = $this->
object->getTree()->getChilds(
1463 $this->object->getTree()->getRootId());
1465 foreach($chaps as $chap)
1467 if ($chap[
"type"] ==
"chap")
1469 $s_chaps[$chap[
"child"]] = $chap[
"title"];
1476 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
1477 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1479 "0" =>
$lng->txt(
"all")
1484 $si->setValue($cur_chap);
1485 $ilToolbar->addInputItem(
$si,
true);
1486 $ilToolbar->addFormButton(
$lng->txt(
"change"),
"selectLObjChapter");
1488 include_once(
"./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
1491 $tpl->setContent($obj_table->getHTML());
1499 $ilCtrl->redirect($this,
"showLearningObjectivesAlignment");
1507 switch (
$_POST[
'select_export'])
1509 case "exportScorm12":
1510 case "exportScorm2004_3rd":
1511 case "exportScorm2004_4th":
1515 case "exportHTMLOne":
1516 $this->ctrl->redirect($this,
$_POST[
'select_export']);
1519 $this->ctrl->redirect($this,
'showExportList');
1529 global
$tpl, $ilToolbar;
1531 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
'selectExport'));
1532 $ilToolbar->setId(
"scorm2004export");
1546 "exportScorm2004_3rd" => $this->lng->txt(
"scorm_create_export_file_scrom2004"),
1547 "exportScorm2004_4th" => $this->lng->txt(
"scorm_create_export_file_scrom2004_4th"),
1548 "exportScorm12" => $this->lng->txt(
"scorm_create_export_file_scrom12"),
1549 "exportHTML" => $this->lng->txt(
"scorm_create_export_file_html"),
1550 "exportHTMLOne" => $this->lng->txt(
"scorm_create_export_file_html_one")
1554 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1556 $si->setOptions($buttons);
1557 $ilToolbar->addInputItem(
$si,
true);
1559 $ilToolbar->addFormButton($this->lng->txt(
'export'),
"selectExport");
1561 $export_files = $this->
object->getExportFiles();
1563 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
1566 foreach ($export_files as $exp_file)
1568 $filetype = $exp_file[
'type'];
1569 $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($filetype))
1570 ?
" <b>(".$this->lng->txt(
"public").
")<b>"
1572 $file_arr = explode(
"__", $exp_file[
"file"]);
1575 $table_gui->setData(
$data);
1577 $this->tpl->setContent($table_gui->getHTML());
1587 global $ilAccess, $ilHelp;
1589 if ($this->ctrl->getCmd() ==
"delete")
1594 if (!$this->object->getEditable())
1596 return parent::getTabs($tabs_gui);
1599 $ilHelp->setScreenIdComponent(
"sahsed");
1602 $tabs_gui->addTarget(
"sahs_organization",
1603 $this->ctrl->getLinkTarget($this,
"showOrganization"),
"showOrganization",
1607 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui")
1610 $tabs_gui->addTarget(
"info_short",
1611 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
1612 "ilinfoscreengui",
"", $force_active);
1615 $tabs_gui->addTarget(
"settings",
1616 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
1627 $tabs_gui->addTarget(
"sahs_objectives_alignment",
1628 $this->ctrl->getLinkTarget($this,
"showLearningObjectivesAlignment"),
"showLearningObjectivesAlignment",
1632 $tabs_gui->addTarget(
"sahs_sequencing",
1633 $this->ctrl->getLinkTarget($this,
"showSequencing"),
"showSequencing",
1649 $tabs_gui->addTarget(
"meta_data",
1650 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
1651 "",
"ilmdeditorgui");
1654 $tabs_gui->addTarget(
"export",
1655 $this->ctrl->getLinkTarget($this,
"showExportList"), array(
"showExportList",
'confirmDeleteExportFile'),
1659 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId()))
1661 $tabs_gui->addTarget(
"perm_settings",
1662 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1665 if ($this->object->editable==1)
1668 $tabs_gui->addNonTabbedLink(
"preview",
1669 $this->lng->txt(
"cont_sc_preview"),
1670 $this->ctrl->getLinkTarget($this,
"preview"),
1683 if ($a_main_tab ==
"settings" &&
1684 $this->object->editable == 1)
1696 $ilTabs->activateSubTab($a_active);
1706 $slm_tree =
new ilTree($this->object->getId());
1707 $slm_tree->setTreeTablePK(
"slm_id");
1708 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1716 $a_title =
"", $a_icon =
"", $a_gui_obj =
null, $a_gui_cmd =
"")
1720 if ($a_form_action ==
"")
1722 $a_form_action =
$ilCtrl->getFormAction($this);
1727 $a_title = $this->
object->getTitle();
1733 if ($a_top_node == 0)
1735 $a_top_node = $slm_tree->getRootId();
1738 if (is_null($a_gui_obj))
1741 $a_gui_cmd =
"showOrganization";
1744 $ilCtrl->setParameter($this,
"backcmd",
"showOrganization");
1745 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1747 $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
1748 $form_gui->setFormAction($a_form_action);
1751 $form_gui->setTree($slm_tree);
1752 $form_gui->setCurrentTopNodeId($a_top_node);
1753 $form_gui->addMultiCommand(
$lng->txt(
"delete"),
"deleteNodes");
1754 $form_gui->addMultiCommand(
$lng->txt(
"cut"),
"cutItems");
1755 $form_gui->addMultiCommand(
$lng->txt(
"copy"),
"copyItems");
1756 $form_gui->addCommand(
$lng->txt(
"cont_save_all_titles"),
"saveAllTitles");
1757 $form_gui->addCommand(
$lng->txt(
"expand_all"),
"expandAll");
1758 $form_gui->addCommand(
$lng->txt(
"collapse_all"),
"collapseAll");
1759 $form_gui->setTriggeredUpdateCommand(
"saveAllTitles");
1762 if (
$_GET[
"highlight"] !=
"")
1764 $hl = explode(
":",
$_GET[
"highlight"]);
1765 $form_gui->setHighlightedNodes($hl);
1766 $form_gui->setFocusId($hl[0]);
1769 $ilCtrl->setParameter($this,
"active_node",
$_GET[
"obj_id"]);
1772 $sc_tpl =
new ilTemplate(
"tpl.scormeditor_orga_screen.html",
true,
true,
"Modules/Scorm2004");
1773 $sc_tpl->setVariable(
"ORGANIZATION", $form_gui->getHTML());
1776 $tpl->setContent($sc_tpl->get());
1787 $ilCtrl->setParameter($this,
"nodes_mode", $a_mode);
1788 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1789 $node_id =
$_GET[
"obj_id"];
1790 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1791 $node_type = ($node_id > 0)
1795 $notes_gui =
new ilNoteGUI($this->object->getId(),
1796 (
int) $node_id, $node_type);
1797 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) &&
$ilSetting->get(
"comments_del_tutor", 1))
1799 $notes_gui->enablePublicNotesDeletion(
true);
1801 $notes_gui->enablePrivateNotes();
1802 $notes_gui->enablePublicNotes();
1804 $next_class =
$ilCtrl->getNextClass($this);
1805 if ($next_class ==
"ilnotegui")
1807 $html = $this->ctrl->forwardCommand($notes_gui);
1811 $html = $notes_gui->getNotesHTML();
1823 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1825 $slm_tree =&
new ilTree($this->object->getId());
1826 $slm_tree->setTreeTablePK(
"slm_id");
1827 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1834 $parent_id = $slm_tree->getParentId($node_id);
1839 $parent_id = $node_id;
1842 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
1843 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1845 $chap_ids = array();
1846 for ($i = 1; $i <= $num; $i++)
1849 $chap->setTitle(
$lng->txt(
"sahs_new_chapter"));
1850 $chap->setSLMId($this->object->getId());
1853 $chap_ids[] = $chap->getId();
1855 $chap_ids = array_reverse($chap_ids);
1856 $chap_ids = implode($chap_ids,
":");
1860 $ilCtrl->setParameter($this,
"highlight", $chap_ids);
1861 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
1863 return array(
"node_id" => $node_id,
"items" => $chap_ids);
1873 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1875 $slm_tree =&
new ilTree($this->object->getId());
1876 $slm_tree->setTreeTablePK(
"slm_id");
1877 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1882 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
1883 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1887 $parent_id = $slm_tree->getParentId($node_id);
1892 $parent_id = $node_id;
1897 for ($i = 1; $i <= $num; $i++)
1900 $sco->setTitle(
$lng->txt(
"sahs_new_sco"));
1901 $sco->setSLMId($this->object->getId());
1904 $sco_ids[] = $sco->getId();
1906 $sco_ids = array_reverse($sco_ids);
1907 $sco_ids = implode($sco_ids,
":");
1911 $ilCtrl->setParameter($this,
"highlight", $sco_ids);
1912 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
1914 return array(
"node_id" => $node_id,
"items" => $sco_ids);
1924 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1926 $slm_tree =&
new ilTree($this->object->getId());
1927 $slm_tree->setTreeTablePK(
"slm_id");
1928 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1933 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
1934 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1938 $parent_id = $slm_tree->getParentId($node_id);
1943 $parent_id = $node_id;
1948 for ($i = 1; $i <= $num; $i++)
1951 $ass->setTitle(
$lng->txt(
"sahs_new_asset"));
1952 $ass->setSLMId($this->object->getId());
1955 $ass_ids[] = $ass->getId();
1957 $ass_ids = array_reverse($ass_ids);
1958 $ass_ids = implode($ass_ids,
":");
1962 $ilCtrl->setParameter($this,
"highlight", $ass_ids);
1963 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
1965 return array(
"node_id" => $node_id,
"items" => $ass_ids);
1975 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1977 $slm_tree =&
new ilTree($this->object->getId());
1978 $slm_tree->setTreeTablePK(
"slm_id");
1979 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1984 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
1985 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1988 $parent_id = $slm_tree->getParentId($node_id);
1993 $parent_id = $node_id;
1997 $page_ids = array();
1998 for ($i = 1; $i <= $num; $i++)
2001 $page->setTitle(
$lng->txt(
"sahs_new_page"));
2002 $page->setSLMId($this->object->getId());
2005 $page_ids[] = $page->getId();
2007 $page_ids = array_reverse($page_ids);
2008 $page_ids = implode($page_ids,
":");
2012 $ilCtrl->setParameter($this,
"highlight", $page_ids);
2013 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2015 return array(
"node_id" => $node_id,
"items" => $page_ids);
2027 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2028 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2030 $templates = array();
2031 $description =
null;
2034 $default_identifier =
$_POST[
"identifier"];
2039 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scormeditor_seq_chooser.html",
"Modules/Scorm2004");
2041 $this->tpl->setCurrentBlock(
"option_item");
2044 foreach ($arr_templates as $templ)
2047 $item_data = $templ->getMetadataProperties();
2048 $item_data[
'identifier'] = $templ->getIdentifier();
2049 array_push($templates,$item_data);
2050 if ($default_identifier == $item_data[
'identifier']) {$sel =
'selected'; $active = $item_data;}
2051 $this->tpl->setVariable(
"VAL_SELECTED",$sel );
2052 $this->tpl->setVariable(
"VAL_IDENTIFIER",$item_data[
'identifier'] );
2053 $this->tpl->setVariable(
"VAL_TITLE",$item_data[
'title'] );
2054 $this->tpl->parseCurrentBlock();
2058 if ($active ==
null )
2061 $description = $templates[0][
'description'];
2062 $image = $templates[0][
'thumbnail'];
2064 $description = $active[
'description'];
2065 $image = $active[
'thumbnail'];
2068 $this->tpl->setVariable(
"VAL_DESCRIPTION",$description);
2071 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2072 $this->tpl->setVariable(
"BTN_NAME",
"insertScenario");
2073 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2074 $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"insert"));
2075 $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
2077 $this->tpl->setVariable(
"TXT_TITLE",
"Choose Sequencing Template");
2079 $node_id =
$_POST[
"node_id"];
2080 $first_child =
$_POST[
"first_child"];
2085 $this->tpl->setVariable(
"VAL_NODE_ID", $node_id);
2086 $this->tpl->setVariable(
"VAL_FIRST_CHILD", $first_child);
2098 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2100 $slm_tree =&
new ilTree($this->object->getId());
2101 $slm_tree->setTreeTablePK(
"slm_id");
2102 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2104 $node_id =
$_POST[
"node_id"];
2106 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2107 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2108 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2110 if (!
$_POST[
"first_child"])
2112 $parent_id = $slm_tree->getParentId($node_id);
2117 $parent_id = $node_id;
2122 $id = $template->insertTemplateForObjectAtParent($this->
object,$parent_id,$target);
2123 $ilCtrl->setParameter($this,
"highlight", $id);
2124 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2144 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2148 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scormeditor_page_layout_chooser.html",
"Modules/Scorm2004");
2150 $this->tpl->setCurrentBlock(
"option_item");
2153 foreach ($arr_templates as $templ)
2157 $templ->readObject();
2158 $this->tpl->setVariable(
"VAL_LAYOUT_TITLE",$templ->getTitle());
2159 $this->tpl->setVariable(
"VAL_LAYOUT_IMAGE",$templ->getPreview());
2160 $this->tpl->setVariable(
"VAL_LAYOUT_ID",$templ->getId());
2161 $this->tpl->setVariable(
"VAL_DISPLAY",
"inline");
2163 $this->tpl->setVariable(
"VAL_CHECKED",
"checked");
2165 if ($count%4 == 0) {
2166 $this->tpl->setVariable(
"END_ROW",
"</tr>");
2168 if ($count == 1 || ($count-1)%4 == 0) {
2169 $this->tpl->setVariable(
"BEGIN_ROW",
"<tr>");
2171 $this->tpl->parseCurrentBlock();
2176 $rest = 4-($count%4);
2181 for ($i=1;$i<=
$rest;$i++) {
2182 $this->tpl->setVariable(
"VAL_DISPLAY",
"none");
2183 $this->tpl->setVariable(
"VAL_LAYOUT_ID",$templ->getId());
2186 $this->tpl->setVariable(
"END_ROW",
"</tr>");
2188 $this->tpl->parseCurrentBlock();
2198 $ilCtrl->saveParameter($this,
"obj_id");
2200 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2202 $this->tpl->setVariable(
"BTN_NAME",
"insertTemplate");
2203 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2204 $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"create"));
2205 $this->tpl->setVariable(
"CMD_CANCEL",
"showOrganization");
2207 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2208 $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"insert"));
2209 $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
2210 if ($a_special_page)
2212 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"sahs_choose_special_page"));
2216 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"sahs_choose_page_template"));
2229 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2231 $slm_tree =&
new ilTree($this->object->getId());
2232 $slm_tree->setTreeTablePK(
"slm_id");
2233 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2236 $node_id =
$_POST[
"node_id"];
2237 $layout_id =
$_POST[
"layout_id"];
2240 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2241 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2243 if (!
$_POST[
"first_child"])
2245 $parent_id = $slm_tree->getParentId($node_id);
2250 $parent_id = $node_id;
2254 $page_ids = array();
2255 for ($i = 1; $i <= $num; $i++)
2258 $page->setTitle(
$lng->txt(
"sahs_new_page"));
2259 $page->setSLMId($this->object->getId());
2260 $page->create(
false,$layout_id);
2262 $page_ids[] = $page->getId();
2264 $page_ids = array_reverse($page_ids);
2265 $page_ids = implode($page_ids,
":");
2269 if (
$_GET[
"obj_id"] !=
"")
2275 $ilCtrl->setParameter($this,
"highlight", $page_ids);
2276 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2286 $_GET[
"scexpand"] =
"";
2287 $mtree = $this->
object->getTree();
2288 $n_id = (
$_GET[
"obj_id"] > 0)
2290 : $mtree->readRootId();
2291 $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2293 foreach ($stree as
$n)
2295 $n_arr[] =
$n[
"child"];
2306 $_GET[
"scexpand"] =
"";
2307 $mtree = $this->
object->getTree();
2308 $n_id = (
$_GET[
"obj_id"] > 0)
2310 : $mtree->readRootId();
2311 $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2313 foreach ($stree as
$n)
2315 if (in_array(
$n[
"child"], $old) &&
$n[
"child"] != $n_id)
2317 $k = array_search(
$n[
"child"], $old);
2332 if (is_array(
$_POST[
"title"]))
2334 include_once(
"./Services/MetaData/classes/class.ilMD.php");
2335 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2336 foreach(
$_POST[
"title"] as $id => $title)
2339 if (is_object($node_obj))
2342 $md =
new ilMD($this->object->getId(), $id, $node_obj->getType());
2343 $md_gen = $md->getGeneral();
2353 $ilCtrl->redirect($this,
"showOrganization");
2368 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2374 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2377 if ($a_form_action ==
"")
2380 ?
"showOrganization"
2382 $this->ctrl->setParameter($this,
"backcmd",
$cmd);
2383 $a_form_action = $this->ctrl->getFormAction($this);
2385 $confirmation_gui->setFormAction($a_form_action);
2386 $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
2389 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2390 foreach(
$_POST[
"id"] as $id)
2395 $confirmation_gui->addItem(
"id[]", $node_obj->getId(),
2400 $confirmation_gui->setCancel(
$lng->txt(
"cancel"),
"cancelDelete");
2401 $confirmation_gui->setConfirm(
$lng->txt(
"confirm"),
"confirmedDelete");
2403 $tpl->setContent($confirmation_gui->getHTML());
2411 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
2422 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2423 $tree->setTreeTablePK(
"slm_id");
2426 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2427 foreach (
$_POST[
"id"] as $id)
2432 $node_data =
$tree->getNodeData($id);
2433 if (is_object($obj))
2435 $obj->setSLMId($this->object->getId());
2444 if(
$tree->isInTree($id))
2446 $tree->deleteTree($node_data);
2459 $ilCtrl->redirect($this,
"showOrganization");
2470 $this->
object->executeDragDrop(
$_POST[
"il_hform_source_id"],
$_POST[
"il_hform_target_id"],
2472 $ilCtrl->redirect($this,
"showOrganization");
2482 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2486 foreach($items as $k => $item)
2493 foreach($todel as $k)
2500 $ilCtrl->redirect($this, $a_return);
2505 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
2509 $ilCtrl->redirect($this, $a_return);
2519 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2523 foreach($items as $k => $item)
2530 foreach($todel as $k)
2538 $ilCtrl->redirect($this, $a_return);
2543 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
2548 $ilCtrl->redirect($this, $a_return);
2558 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2561 $ilCtrl->redirect($this,
"showOrganization",
2572 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2575 $ilCtrl->redirect($this,
"showOrganization",
2586 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2589 $ilCtrl->redirect($this,
"showOrganization",
2600 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2603 $ilCtrl->redirect($this,
"showOrganization",
2611 $export->buildExportFile();
2613 $this->ctrl->redirect($this,
"showExportList");
2619 $export->buildExportFile();
2621 $this->ctrl->redirect($this,
"showExportList");
2627 $export->buildExportFile();
2629 $this->ctrl->redirect($this,
"showExportList");
2635 $export->buildExportFile();
2637 $this->ctrl->redirect($this,
"showExportList");
2643 $export->buildExportFile();
2645 $this->ctrl->redirect($this,
"showExportList");
2651 if(!$export->buildExportFile())
2653 if(!PATH_TO_MKISOFS)
2654 $this->
ilias->raiseError($this->lng->txt(
"no_mkisofs_configured"),$this->ilias->error_obj->MESSAGE);
2656 $this->ctrl->redirect($this,
"showExportList");
2662 $export->buildExportFile();
2663 $this->ctrl->redirect($this,
"showExportList");
2668 $export =
new ilSCORM2004Export($this->
object);
2670 $export_dir = $export->getExportDirectoryForType(
$_GET[
'type']);
2679 if(!isset(
$_POST[
"file"]))
2682 $this->ctrl->redirect($this,
"showExportList");
2686 $export_files = $this->
object->getExportFiles();
2688 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
2691 foreach ($export_files as $exp_file)
2693 foreach (
$_POST[
'file'] as $delete_file)
2695 if (strcmp($delete_file, $exp_file[
'file']) == 0)
2697 $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($exp_file[
"type"]))
2698 ?
" <b>(".$this->lng->txt(
"public").
")<b>"
2700 $file_arr = explode(
"__", $exp_file[
"file"]);
2705 $table_gui->setData(
$data);
2706 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2715 $this->ctrl->redirect($this,
"showExportList");
2724 include_once
"./Services/Utilities/classes/class.ilUtil.php";
2725 $export =
new ilSCORM2004Export($this->
object);
2728 $export_dir = $export->getExportDirectoryForType(
$_POST[
'type'][$idx]);
2729 $exp_file = $export_dir.
"/".
$file;
2730 if (@is_file($exp_file))
2736 $this->ctrl->redirect($this,
"showExportList");
2744 if(!isset(
$_POST[
"file"]))
2746 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2748 if (count(
$_POST[
"file"]) > 1)
2750 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2753 $export =
new ilSCORM2004Export($this->
object);
2757 if ($this->object->getPublicExportFile($type) ==
$file)
2759 $this->
object->setPublicExportFile($type,
"");
2763 $this->
object->setPublicExportFile($type,
$file);
2765 $this->
object->update();
2766 $this->ctrl->redirect($this,
"showExportList");
2777 $zipfile = $export->buildExportFile();
2778 $zipPathinfo = pathinfo($zipfile);
2779 $file_path = $this->
object->getDataDirectory().
"/".($zipPathinfo[
"basename"]);
2780 copy($zipfile,$file_path);
2787 include_once (
"./Modules/Scorm2004/classes/ilSCORM13Package.php");
2789 $rte_pkg->il_import($this->object->getDataDirectory(),$this->object->getId(),
$ilias,
false,
true);
2796 ilUtil::redirect(
"ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID().
"&envEditor=1");
Confirmation screen class.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Select file for being added into file lists.
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.
This class represents a non editable value in a property form.
setTabs()
output main frameset of media pool left frame: explorer tree of folders right frame: media pool conte...
setSettingsSubTabs()
set Tabs for settings
getTemplate()
output main header (title and locator)
_lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
Class ilObjSCORMLearningModuleGUI.
insertTemplate($a_redirect=true)
Insert (multiple) pages at node.
initStylePropertiesForm()
Init style properties form.
initGlossaryCreationForm()
Init glossary creation form.
confirmedDeleteTracking()
Confirmed tracking deletion.
detachGlossary()
Detach glossary.
getEditTree()
Get editing tree object.
properties()
Scorm 2004 module properties.
saveGlossary()
Save glossary form.
saveSequencing()
Save sequencing.
getPropertiesEditableValues()
Get current values for properties (editable) from.
createStyle()
Create Style.
insertScenarioGUI()
Insert sequencing scenario at node.
proceedDragDrop()
Perform drag and drop action.
collapseAll($a_redirect=true)
Collapse all.
frameset($a_to_organization=false)
output main frameset of media pool left frame: explorer tree of folders right frame: media pool conte...
initPropertiesEditableForm()
Init properties (editable) form.
insertPageClip()
Insert pages from clipboard.
getNotesHTML($a_mode="")
Get notes HTML.
showExportList()
Show Export List.
jumpToNode($a_anchor_node="", $a_highlight_ids="")
deleteNodes($a_form_action="")
confirm deletion screen of chapters/scos/pages
cancelDeleteExportFile()
cancel deletion of export files
insertScoClip()
Insert scos from clipboard.
insertSco($a_redirect=true)
Insert (multiple) scos at node.
confirmDeleteExportFile()
confirmation screen for export file deletion
insertAssetClip()
Insert assets from clipboard.
ilObjSCORM2004LearningModuleGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
showSequencing()
Show Sequencing.
assignObject()
assign scorm object to scorm gui object
editStyleProperties()
Edit Stlye Properties.
insertChapterClip()
Insert chapter from clipboard.
editOrganization($a_to_organization=true)
Edit organization (called from listgui, must setup frameset)
assignGlossary()
Assign glossary.
getTabs(&$tabs_gui)
Adds tabs to tab gui object.
selectGlossary()
Select glossary.
selectExport()
Select the export type of the SCORM 2004 module.
cancelDelete()
cancel delete
showTrackingItems()
Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar.
copyItems($a_return="showOrganization")
Copy items to clipboard.
insertScenario()
Insert sequencing scenario at node.
confirmedDelete($a_redirect=true)
Delete chapters/scos/pages.
insertChapter($a_redirect=true)
Insert (multiple) chapters at node.
insertTemplateGUI($a_redirect=true, $a_special_page=false)
Displays GUI to select template for page.
insertAsset($a_redirect=true)
Insert (multiple) assets at node.
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
initPropertiesForm()
Initialize properties form.
showTree()
Show Editing Tree.
showOrganization($a_top_node=0, $a_form_action="", $a_title="", $a_icon="", $a_gui_obj=null, $a_gui_cmd="")
Show subhiearchy of chapters, scos and pages.
expandAll($a_redirect=true)
Expand all.
setSubTabs($a_main_tab, $a_active)
Set sub tabs.
activateExpertMode()
Activate expert mode.
insertSpecialPage($a_redirect=true)
Insert special page.
cutItems($a_return="showOrganization")
Copy items to clipboard, then cut them from the current tree.
executeCommand()
execute command
showTrackingItemsBySco()
show tracking data
saveStyleSettings()
Save style settings.
confirmExpertMode()
Confirm activation of expert mode.
createGlossary()
Create glossary.
deleteExportFile()
delete export files
insertPage($a_redirect=true)
Insert (multiple) pages at node.
deleteStyle()
Delete Style.
saveProperties()
save scorm 2004 module properties
showLearningObjectivesAlignment()
Show Learning Objectives Alignment.
Class ilObjSCORM2004LearningModule.
Class ilObjSCORMLearningModuleGUI.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
_lookupStandard($a_id)
Lookup standard flag.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
addHeaderAction()
Add header action menu.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupType($a_id, $a_reference=false)
lookup object type
TableGUI class for learning objectives alignments.
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
Class ilSCORM2004AssetGUI.
Class ilSCORM2004ChapterGUI.
Class ilSCORM2004Chapter.
removeCMIDataForUserAndPackage($user_id, $packageId)
SCORM editor explorer GUI class.
Class ilSCORM2004Condition.
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
insertChapterClip($a_slm_obj, $a_as_sub=false)
Insert Chapter from clipboard.
clipboardCut($a_slm_obj_id, $a_ids)
Cut and copy a set of chapters/pages into the clipboard.
static _lookupType($a_obj_id)
Lookup Type.
static insertAssetClip($a_slm_obj, $a_type="ass")
Insert assets from clipboard.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static clipboardCopy($a_slm_obj_id, $a_ids)
Copy a set of chapters/pages/scos into the clipboard.
static insertPageClip($a_slm_obj)
Insert pages from clipboard.
static insertScoClip($a_slm_obj)
Insert scos from clipboard.
static _writeTitle($a_obj_id, $a_title)
Write Title.
Class ilSCORM2004PageNodeGUI.
Class ilSCORM2004PageNode.
Class ilSCORM2004ChapterGUI.
Class ilSCORM2004Chapter.
static availableTemplates()
Class ilSCORM2004TrackingItemsPerScoFilterGUI.
Class ilSCORM2004TrackingItemsPerUserFilterGUI.
Class ilSCORM2004TrackingItemsTableGUI.
checkIfAnyoneIsInOfflineMode($obj_id)
Export class for SCORM 2004 object.
static clear($a_var)
Unset a value.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static initjQuery($a_tpl=null)
Init jQuery.
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options