4 require_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
5 require_once(
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
6 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Export.php");
7 include_once(
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
8 include_once(
"./Services/Style/classes/class.ilPageLayout.php");
34 $lng->loadLanguageModule(
"content");
35 $lng->loadLanguageModule(
"sahs");
36 $lng->loadLanguageModule(
"search");
37 $lng->loadLanguageModule(
"exp");
39 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
40 #$this->tabs_gui =& new ilTabsGUI();
50 $next_class = $ilCtrl->getNextClass($this);
51 $cmd = $ilCtrl->getCmd();
54 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
57 $form_gui->updateExpanded();
65 switch(
$_GET[
"notes_mode"])
68 $ilTabs->setTabActive(
"sahs_organization");
74 case "ilscorm2004chaptergui":
75 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ChapterGUI.php");
77 $chap_gui->setParentGUI($this);
78 return $ilCtrl->forwardCommand($chap_gui);
81 case "ilscorm2004seqchaptergui":
82 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004SeqChapterGUI.php");
84 $chap_gui->setParentGUI($this);
85 return $ilCtrl->forwardCommand($chap_gui);
88 case "ilscorm2004scogui":
89 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
91 $sco_gui->setParentGUI($this);
92 return $ilCtrl->forwardCommand($sco_gui);
95 case "ilscorm2004assetgui":
96 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004AssetGUI.php");
98 $ass_gui->setParentGUI($this);
99 return $ilCtrl->forwardCommand($ass_gui);
102 case "ilscorm2004pagenodegui":
103 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
105 $page_gui->setParentGUI($this);
106 $ilCtrl->forwardCommand($page_gui);
134 if ($this->object->getEditable())
136 include_once(
"./Services/Frameset/classes/class.ilFramesetGUI.php");
139 $fs_gui->setFramesetTitle($this->lng->txt(
"editor"));
140 $fs_gui->setMainFrameName(
"content");
141 $fs_gui->setSideFrameName(
"tree");
142 $this->ctrl->setParameter($this,
"active_node",
$_GET[
"obj_id"]);
143 $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this,
"showTree"));
144 $this->ctrl->setParameter($this,
"activeNode",
"");
145 if (
$_GET[
"obj_id"] > 0)
147 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
150 if (in_array($type, array(
"sco",
"chap",
"seqc",
"page")))
152 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
153 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"jumpToNode"));
157 if ($a_to_organization)
159 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"showOrganization"));
163 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"properties"));
171 $this->tpl =
new ilTemplate(
"tpl.sahs_edit_frameset.html",
false,
false,
"Modules/ScormAicc");
172 $this->tpl->setVariable(
"SRC",
173 $this->ctrl->getLinkTarget($this,
"properties"));
174 $this->tpl->show(
"DEFAULT",
false);
179 function jumpToNode($a_anchor_node =
"", $a_highlight_ids =
"")
183 $anchor = ($a_anchor_node !=
"")
184 ?
"node_".$a_anchor_node
187 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
189 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
193 $ilCtrl->setParameterByClass(
"ilscorm2004scogui",
"highlight", $a_highlight_ids);
194 $ilCtrl->redirectByClass(
"ilscorm2004scogui",
"showOrganization", $anchor);
196 $ilCtrl->setParameterByClass(
"ilscorm2004assetgui",
"highlight", $a_highlight_ids);
197 $ilCtrl->redirectByClass(
"ilscorm2004assetgui",
"showOrganization", $anchor);
199 $ilCtrl->setParameterByClass(
"ilscorm2004chaptergui",
"highlight", $a_highlight_ids);
200 $ilCtrl->redirectByClass(
"ilscorm2004chaptergui",
"showOrganization", $anchor);
202 $ilCtrl->setParameterByClass(
"ilscorm2004seqchaptergui",
"highlight", $a_highlight_ids);
203 $ilCtrl->redirectByClass(
"ilscorm2004seqchaptergui",
"showOrganization", $anchor);
205 $ilCtrl->redirectByClass(
"ilscorm2004pagenodegui",
"edit");
216 $this->
setSubTabs(
"settings",
"general_settings");
218 $lng->loadLanguageModule(
"style");
221 if ($this->object->editable != 1)
224 $ilToolbar->addButton($this->lng->txt(
"view"),
225 "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID(),
229 $ilToolbar->addButton($this->lng->txt(
"cont_sc_new_version"),
230 $this->ctrl->getLinkTarget($this,
"newModuleVersion"));
238 $parent_ref_id = $tree->getParentId((
int)
$_GET[
"ref_id"]);
239 if ($rbacsystem->checkAccess(
"create", $parent_ref_id,
"glo"))
241 $ilToolbar->addButton($this->lng->txt(
"cont_glo_create"),
242 $ilCtrl->getLinkTarget($this,
"createGlossary"));
244 $ilToolbar->addButton($this->lng->txt(
"cont_glo_assign"),
245 $ilCtrl->getLinkTarget($this,
"assignGlossary"));
249 $ilToolbar->addButton($this->lng->txt(
"cont_glo_detach"),
250 $ilCtrl->getLinkTarget($this,
"detachGlossary"));
254 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
255 $style_id = $this->
object->getStyleSheetId();
257 if ($fixed_style == 0)
262 $st_styles[0] = $this->lng->txt(
"default");
270 $ilToolbar->addSeparator();
273 $ilToolbar->addButton($this->lng->txt(
"cont_edit_style"),
274 $ilCtrl->getLinkTarget($this,
"editStyle"));
275 $ilToolbar->addButton($this->lng->txt(
"cont_delete_style"),
276 $ilCtrl->getLinkTarget($this,
"deleteStyle"));
282 $ilToolbar->addSeparator();
284 $ilToolbar->addButton($this->lng->txt(
"sty_create_ind_style"),
285 $ilCtrl->getLinkTarget($this,
"createStyle"));
291 if ($this->object->editable != 1)
294 $tpl->setContent($this->form->getHTML());
300 $tpl->setContent($this->form->getHTML());
314 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
316 $this->form->setFormAction($ilCtrl->getFormAction($this));
317 $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
321 $ne->
setValue($this->object->getModuleVersion());
322 $this->form->addItem($ne);
327 if ($this->object->getOnline())
329 $cb->setChecked(
true);
331 $this->form->addItem($cb);
337 $sh->setTitle($this->lng->txt(
"cont_presentation"));
338 $this->form->addItem($sh);
342 "0" => $this->lng->txt(
"cont_open_normal"),
343 "1" => $this->lng->txt(
"cont_open_iframe_max"),
344 "2" => $this->lng->txt(
"cont_open_iframe_defined"),
345 "5" => $this->lng->txt(
"cont_open_window_undefined"),
346 "6" => $this->lng->txt(
"cont_open_window_defined")
350 $si->setValue($this->object->getOpenMode());
351 $this->form->addItem($si);
357 $ni->setValue($this->object->getWidth());
358 $this->form->addItem($ni);
364 $ni->setValue($this->object->getHeight());
365 $this->form->addItem($ni);
370 $cb->setChecked($this->object->getNoMenu());
371 $this->form->addItem($cb);
376 $cb->setChecked($this->object->getHideNavig());
377 $this->form->addItem($cb);
380 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_last_visited"),
"cobj_auto_last_visited");
382 $cb->setChecked($this->object->getAuto_last_visited());
383 $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
384 $this->form->addItem($cb);
390 $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
391 $this->form->addItem($sh);
394 $ni =
new ilNumberInputGUI($this->lng->txt(
"cont_sc_max_attempt"),
"max_attempt");
397 $ni->setValue($this->object->getMaxAttempt());
398 $this->form->addItem($ni);
401 $options = array(
"normal" => $this->lng->txt(
"cont_sc_less_mode_normal"),
402 "browse" => $this->lng->txt(
"cont_sc_less_mode_browse"));
403 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_def_lesson_mode"),
"lesson_mode");
405 $si->setValue($this->object->getDefaultLessonMode());
406 $this->form->addItem($si);
409 $options = array(
"credit" => $this->lng->txt(
"cont_credit_on"),
410 "no_credit" => $this->lng->txt(
"cont_credit_off"));
411 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_credit_mode"),
"credit_mode");
413 $si->setValue($this->object->getCreditMode());
414 $si->setInfo($this->lng->txt(
"cont_credit_mode_info"));
415 $this->form->addItem($si);
420 $cb->setChecked($this->object->getAutoReview());
421 $cb->setInfo($this->lng->txt(
"cont_sc_auto_review_info"));
422 $this->form->addItem($cb);
428 $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
429 $this->form->addItem($sh);
434 $cb->setChecked($this->object->getSession());
435 $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
436 $this->form->addItem($cb);
441 $cb->setChecked($this->object->getSequencing());
442 $cb->setInfo($this->lng->txt(
"cont_sequencing_info"));
443 $this->form->addItem($cb);
446 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"),
"cobj_interactions");
448 $cb->setChecked($this->object->getInteractions());
449 $this->form->addItem($cb);
454 $cb->setChecked($this->object->getObjectives());
455 $this->form->addItem($cb);
460 $cb->setChecked($this->object->getComments());
461 $this->form->addItem($cb);
464 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"),
"cobj_time_from_lms");
466 $cb->setChecked($this->object->getTime_from_lms());
467 $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
468 $this->form->addItem($cb);
471 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"),
"cobj_check_values");
473 $cb->setChecked($this->object->getCheck_values());
474 $this->form->addItem($cb);
480 $sh->setTitle($this->lng->txt(
"cont_debugging"));
481 $this->form->addItem($sh);
486 $cb->setChecked($this->object->getDebug());
487 if ($this->object->getDebugActivated() ==
false)
489 $cb->setDisabled(
true);
490 $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
494 $cb->setInfo($this->lng->txt(
"cont_debug_deactivate"));
496 $this->form->addItem($cb);
497 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
508 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
513 "" => $lng->txt(
"please_select"),
515 $langs = $lng->getInstalledLanguages();
516 $lng->loadLanguageModule(
"meta");
517 foreach ($langs as $l)
519 $options[$l] = $lng->txt(
"meta_l_".$l);
521 $loc =
new ilSelectInputGUI($this->lng->txt(
"cont_localization"),
"localization");
523 $loc->setInfo($this->lng->txt(
"cont_localization_info"));
524 $this->form->addItem($loc);
528 $this->form->addItem($ne);
531 $lng->loadLanguageModule(
"style");
532 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
533 $style_id = $this->
object->getStyleSheetId();
535 if ($fixed_style > 0)
539 $this->lng->txt(
"global_fixed").
")");
540 $this->form->addItem($st);
547 $st_styles[0] = $this->lng->txt(
"default");
557 $this->form->addItem($st);
564 $st_styles,
false,
true);
565 $style_sel =
new ilSelectInputGUI($lng->txt(
"cont_current_style"),
"style_id");
567 $style_sel->setValue($style_id);
568 $this->form->addItem($style_sel);
576 $this->form->addItem($ni);
579 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
581 $this->form->setTitle($lng->txt(
"cont_scorm_ed_properties"));
582 $this->form->setFormAction($ilCtrl->getFormAction($this));
598 $values[
"glossary"] = $this->lng->txt(
"cont_no_glossary");
600 $values[
"q_tries"] = $this->
object->getTries();
601 $values[
"localization"] = $this->
object->getLocalization();
602 $values[
"style_id"] = $this->
object->getStyleSheetId();
604 $this->form->setValuesByArray($values);
614 if ($this->object->editable != 1)
617 $this->
object->setOpenMode(
$_POST[
"open_mode"]);
618 $this->
object->setWidth(
$_POST[
"width"]);
619 $this->
object->setHeight(
$_POST[
"height"]);
620 $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
621 $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
623 $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
641 if ($this->form->checkInput())
643 $this->
object->setTries(
$_POST[
"q_tries"]);
644 $this->
object->setLocalization(
$_POST[
"localization"]);
646 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
648 || $this->object->getStyleSheetId() == 0))
654 $this->
object->update();
656 $this->ctrl->redirect($this,
"properties");
666 $this->
object->setAssignedGlossary(0);
667 $this->
object->update();
668 $ilCtrl->redirect($this,
"properties");
679 $tpl->setContent($this->form->getHTML());
689 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
695 $this->form->addItem($ti);
699 $this->form->addItem($ta);
701 $this->form->addCommandButton(
"saveGlossary", $lng->txt(
"save"));
702 $this->form->addCommandButton(
"properties", $lng->txt(
"cancel"));
704 $this->form->
setTitle($lng->txt(
"cont_glo_create"));
705 $this->form->setFormAction($ilCtrl->getFormAction($this));
715 $parent_ref_id = $tree->getParentId((
int)
$_GET[
"ref_id"]);
716 if (!$rbacsystem->checkAccess(
"create", $parent_ref_id,
"glo"))
719 $ilCtrl->redirect($this,
"properties");
723 if ($this->form->checkInput())
725 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
727 $newObj->setType(
"glo");
728 $newObj->setTitle(
$_POST[
"title"]);
729 $newObj->setDescription(
$_POST[
"description"]);
730 $newObj->setVirtualMode(
"none");
732 $newObj->createReference();
733 $newObj->putInTree($parent_ref_id);
734 $newObj->setPermissions($parent_ref_id);
735 $newObj->notify(
"new",$parent_ref_id,$_GET[
"parent_non_rbac_id"],$parent_ref_id,$newObj->getRefId());
738 $this->
object->setAssignedGlossary($newObj->getId());
739 $this->
object->update();
742 $ilCtrl->redirect($this,
"properties");
745 $this->form->setValuesByPost();
746 $tpl->setContent($this->form->getHtml());
756 include_once(
"./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
758 $ilCtrl->getLinkTarget($this,
"selectGlossary"),
"ilobjscorm2004learningmodulegui");
761 if (
$_GET[
"expand"] ==
"")
763 $expanded = $tree->readRootId();
767 $expanded =
$_GET[
"expand"];
769 $exp->setExpand($expanded);
771 $exp->setTargetGet(
"glo_id");
774 $exp->setParamsGet($this->ctrl->getParameterArray($this,
"assignGlossary"));
777 $exp->setFiltered(
true);
779 $exp->addFilter(
"root");
780 $exp->addFilter(
"cat");
781 $exp->addFilter(
"grp");
782 $exp->addFilter(
"fold");
783 $exp->addFilter(
"crs");
784 $exp->addFilter(
"glo");
788 $tpl->setContent($exp->getOutput());
799 $this->
object->update();
800 $ilCtrl->redirect($this,
"properties");
810 if ($this->call_by_reference)
829 $tpl->setContent($this->form->getHTML());
839 $lng->loadLanguageModule(
"style");
841 $ilTabs->setTabActive(
"settings");
843 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
846 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
847 $style_id = $this->
object->getStyleSheetId();
849 if ($fixed_style > 0)
853 $this->lng->txt(
"global_fixed").
")");
854 $this->form->addItem($st);
861 $st_styles[0] = $this->lng->txt(
"default");
871 $this->form->addItem($st);
876 $this->form->addCommandButton(
"editStyle",
877 $lng->txt(
"cont_edit_style"));
878 $this->form->addCommandButton(
"deleteStyle",
879 $lng->txt(
"cont_delete_style"));
887 $st_styles,
false,
true);
888 $style_sel =
new ilSelectInputGUI($lng->txt(
"cont_current_style"),
"style_id");
890 $style_sel->setValue($style_id);
891 $this->form->addItem($style_sel);
893 $this->form->addCommandButton(
"saveStyleSettings",
895 $this->form->addCommandButton(
"createStyle",
896 $lng->txt(
"sty_create_ind_style"));
899 $this->form->setTitle($lng->txt(
"cont_style"));
900 $this->form->setFormAction($ilCtrl->getFormAction($this));
910 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
920 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
930 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
940 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
942 || $this->object->getStyleSheetId() == 0))
945 $this->
object->update();
948 $this->ctrl->redirect($this,
"editStyleProperties");
956 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
958 if (!$privacy->enabledSahsProtocolData())
960 $this->ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
963 include_once
"./Services/Table/classes/class.ilTableGUI.php";
967 if (
$_POST[
"search_string"] !=
"")
970 }
else if (isset(
$_POST[
"search_string"]) &&
$_POST[
"search_string"] ==
"") {
975 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl_scorm_track_items_search.html",
"Modules/ScormAicc");
977 $this->tpl->addBlockfile(
"USR_TABLE",
"usr_table",
"tpl.table.html");
979 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.scorm_track_items.html",
"Modules/ScormAicc");
983 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
989 if (isset(
$_SESSION[
"scorm_search_string"])) {
990 $tbl->setTitle($this->lng->txt(
"cont_tracking_items").
' - Aktive Suche: "'.
$_SESSION[
"scorm_search_string"].
'"');
992 $tbl->setTitle($this->lng->txt(
"cont_tracking_items"));
995 $tbl->setHeaderNames(array(
"",$this->lng->txt(
"name"), $this->lng->txt(
"last_access"), $this->lng->txt(
"attempts"), $this->lng->txt(
"version") ));
998 $header_params = $this->ctrl->getParameterArray($this,
"showTrackingItems");
1000 $tbl->setColumnWidth(array(
"1%",
"50%",
"29%",
"10%",
"10%"));
1002 $cols = array(
"user_id",
"username",
"last_access",
"attempts",
"version");
1003 $tbl->setHeaderVars($cols, $header_params);
1006 $_GET[
"sort_order"] =
$_GET[
"sort_order"] ?
$_GET[
"sort_order"] :
"asc";
1010 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1011 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1012 $tbl->setLimit(
$_GET[
"limit"]);
1013 $tbl->setOffset(
$_GET[
"offset"]);
1014 $tbl->setMaxCount($this->maxcount);
1016 $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
1020 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1021 $this->tpl->setVariable(
"BTN_NAME",
"deleteTrackingForUser");
1022 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
1023 $this->tpl->parseCurrentBlock();
1026 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1027 $this->tpl->setVariable(
"BTN_NAME",
"decreaseAttempts");
1028 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"decrease_attempts"));
1029 $this->tpl->parseCurrentBlock();
1032 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1033 $this->tpl->setVariable(
"BTN_NAME",
"exportSelected");
1034 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"export"));
1035 $this->tpl->parseCurrentBlock();
1039 $this->tpl->setVariable(
"EXPORT_ACTION",$this->ctrl->getFormAction($this));
1041 $this->tpl->setVariable(
"EXPORT_ALL_VALUE", $this->lng->txt(
'cont_export_all'));
1042 $this->tpl->setVariable(
"EXPORT_ALL_NAME",
"exportAll");
1043 $this->tpl->setVariable(
"IMPORT_VALUE", $this->lng->txt(
'import'));
1044 $this->tpl->setVariable(
"IMPORT_NAME",
"Import");
1046 $this->tpl->setVariable(
"SEARCH_TXT_SEARCH",$this->lng->txt(
'search'));
1047 $this->tpl->setVariable(
"SEARCH_ACTION",$this->ctrl->getFormAction($this));
1048 $this->tpl->setVariable(
"SEARCH_NAME",
'showTrackingItems');
1049 if (isset(
$_SESSION[
"scorm_search_string"])) {
1050 $this->tpl->setVariable(
"STYLE",
'display:inline;');
1052 $this->tpl->setVariable(
"STYLE",
'display:none;');
1054 $this->tpl->setVariable(
"SEARCH_VAL",
$_SESSION[
"scorm_search_string"]);
1055 $this->tpl->setVariable(
"SEARCH_VALUE",$this->lng->txt(
'search_users'));
1056 $this->tpl->parseCurrentBlock();
1059 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1061 $items = $this->
object->getTrackedUsers(
$_SESSION[
"scorm_search_string"]);
1063 $tbl->setMaxCount(count($items));
1065 $items = array_slice($items,
$_GET[
"offset"],
$_GET[
"limit"]);
1069 if (count($items) > 0)
1071 foreach ($items as $item)
1073 if (
ilObject::_exists($item[
"user_id"]) && ilObject::_lookUpType($item[
"user_id"])==
"usr")
1075 $user =
new ilObjUser($item[
"user_id"]);
1076 $this->tpl->setCurrentBlock(
"tbl_content");
1077 $this->tpl->setVariable(
"VAL_USERNAME", $item[
"username"]);
1079 $this->tpl->setVariable(
"VAL_ATTEMPT", $item[
"attempts"]);
1080 $this->tpl->setVariable(
"VAL_VERSION", $item[
'version']);
1081 $this->ctrl->setParameter($this,
"user_id", $item[
"user_id"]);
1082 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1083 $this->tpl->setVariable(
"LINK_ITEM",
1084 $this->ctrl->getLinkTarget($this,
"showTrackingItem"));
1085 $this->tpl->setVariable(
"CHECKBOX_ID", $item[
"user_id"]);
1087 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1088 $this->tpl->parseCurrentBlock();
1091 $this->tpl->setCurrentBlock(
"selectall");
1092 $this->tpl->setVariable(
"SELECT_ALL", $this->lng->txt(
"select_all"));
1093 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1094 $this->tpl->parseCurrentBlock();
1099 $this->tpl->setCurrentBlock(
"notfound");
1100 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1101 $this->tpl->setVariable(
"NUM_COLS", $num);
1102 $this->tpl->parseCurrentBlock();
1109 $this->
object->exportSelected(1);
1114 if (!isset(
$_POST[
"user"]))
1117 $this->ctrl->redirect($this,
"showTrackingItems");
1119 $this->
object->exportSelected(0,
$_POST[
"user"]);
1129 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1132 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
1134 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.scorm2004_track_item.html",
"Modules/Scorm2004");
1138 $this->tpl->setVariable(
"FORMACTION",
"adm_object.php?ref_id=".$this->ref_id.
"$obj_str&cmd=gateway");
1143 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
1148 $tbl->setTitle($user->getLastname().
", ".$user->getFirstname());
1150 $tbl->setHeaderNames(array($this->lng->txt(
"title"),
1151 $this->lng->txt(
"cont_status"), $this->lng->txt(
"cont_time"),
1152 $this->lng->txt(
"cont_score")));
1154 $header_params = array(
"ref_id" => $this->ref_id,
"cmd" =>
$_GET[
"cmd"],
1155 "cmdClass" => get_class($this),
"obj_id" =>
$_GET[
"obj_id"],
"baseClass"=>
"ilSAHSEditGUI",
'user_id'=>
$_GET[
"user_id"]);
1157 $cols = array(
"title",
"status",
"time",
"score");
1158 $tbl->setHeaderVars($cols, $header_params);
1162 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1163 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1164 $tbl->setLimit(
$_GET[
"limit"]);
1165 $tbl->setOffset(
$_GET[
"offset"]);
1166 $tbl->setMaxCount($this->maxcount);
1172 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1173 #$tbl->disable("footer");
1175 $tr_data = $this->
object->getTrackingDataAgg(
$_GET[
"user_id"]);
1178 $tbl->setMaxCount(count($tr_data));
1179 $tr_data = array_slice($tr_data,
$_GET[
"offset"],
$_GET[
"limit"]);
1183 if (count($tr_data) > 0)
1185 foreach ($tr_data as
$data)
1187 $this->tpl->setCurrentBlock(
"tbl_content");
1188 $this->tpl->setVariable(
"VAL_TITLE", $data[
"title"]);
1189 $this->ctrl->setParameter($this,
"user_id",
$_GET[
"user_id"]);
1190 $this->ctrl->setParameter($this,
"obj_id", $data[
"sco_id"]);
1192 $this->tpl->setVariable(
"LINK_SCO",
1193 $this->ctrl->getLinkTarget($this,
"showTrackingItemPerUser"));
1194 $this->tpl->setVariable(
"VAL_TIME", $data[
"time"]);
1195 $this->tpl->setVariable(
"VAL_STATUS", $data[
"status"]);
1196 $this->tpl->setVariable(
"VAL_SCORE", $data[
"score"]);
1199 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1200 $this->tpl->parseCurrentBlock();
1206 $this->tpl->setCurrentBlock(
"notfound");
1207 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1208 $this->tpl->setVariable(
"NUM_COLS", $num);
1209 $this->tpl->parseCurrentBlock();
1219 if(!isset(
$_POST[
"user"]))
1221 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1225 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1227 $cgui->setFormAction($this->ctrl->getFormAction($this));
1228 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1229 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteTracking");
1230 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDeleteTracking");
1232 foreach(
$_POST[
"user"] as $id)
1239 " ".$this->lng->txt(
"cont_tracking_data").
1240 ": ".$user->getLastname().
", ".$user->getFirstname();
1243 $cgui->addItem(
"user[]", $id, $caption);
1247 $this->tpl->setContent($cgui->getHTML());
1251 unset(
$_SESSION[
"scorm_search_string"]);
1252 $this->ctrl->redirect($this,
"showTrackingItems");
1261 $this->ctrl->redirect($this,
"showTrackingItems");
1271 foreach (
$_POST[
"user"] as $user)
1273 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004DeleteData.php");
1276 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1280 $this->ctrl->redirect($this,
"showTrackingItems");
1287 if (!isset(
$_POST[
"user"]) || !is_array(
$_POST[
"user"]))
1292 foreach (
$_POST[
"user"] as $user)
1298 $val_set = $ilDB->queryF(
'
1299 SELECT * FROM cmi_custom
1304 array(
'integer',
'integer',
'text',
'integer'),
1305 array($user,0,
'package_attempts',$this->object->getID()));
1307 $val_rec = $ilDB->fetchAssoc($val_set);
1309 $val_rec[
"rvalue"] = str_replace(
"\r\n",
"\n", $val_rec[
"rvalue"]);
1310 if ($val_rec[
"rvalue"] != null && $val_rec[
"rvalue"] != 0)
1312 $new_rec = $val_rec[
"rvalue"]-1;
1314 $res = $ilDB->queryF(
'
1315 SELECT * FROM cmi_custom
1320 array(
'integer',
'text',
'integer',
'integer'),
1321 array($user,
'package_attempts',$this->object->getID(),0));
1324 if($ilDB->numRows(
$res) > 0)
1326 $val_set = $ilDB->manipulateF(
'
1334 array(
'text',
'timestamp',
'integer',
'integer',
'integer',
'text'),
1335 array($new_rec, date(
"Y-m-d H:i:s") ,$user,0,$this->object->getID(),
'package_attempts'));
1339 $val_set = $ilDB->manipulateF(
'
1340 INSERT INTO cmi_custom
1341 (rvalue,user_id,sco_id,obj_id,lvalue,c_timestamp)
1342 VALUES(%s,%s,%s,%s,%s,%s)',
1343 array(
'text',
'integer',
'integer',
'integer',
'text',
'timestamp'),
1344 array($new_rec,$user,0,$this->object->getID(),
'package_attempts',date(
"Y-m-d H:i:s")));
1350 $this->ctrl->redirect($this,
"showTrackingItems");
1355 if (is_array(
$_POST[
"id"]))
1357 $this->
object->deleteTrackingDataOfUsers(
$_POST[
"id"]);
1369 $mtree =
new ilTree($this->object->getId());
1370 $mtree->
setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1371 $mtree->setTreeTablePK(
"slm_id");
1373 if (
$_POST[
"expandAll"] !=
"")
1375 $_GET[
"scexpand"] =
"";
1376 $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
1378 foreach ($stree as
$n)
1380 $n_arr[] = $n[
"child"];
1385 if (
$_POST[
"collapseAll"] !=
"")
1387 $_GET[
"scexpand"] =
"";
1388 $_SESSION[
"scexpand"] = array($mtree->readRootId());
1391 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1394 $ilCtrl->setParameter($this,
"active_node",
$_GET[
"active_node"]);
1396 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
1399 $this->tpl->setCurrentBlock(
"exp2_button");
1400 $this->tpl->setVariable(
"CMD_EXP2_BTN",
"expandAll");
1401 $this->tpl->setVariable(
"TXT_EXP2_BTN", $lng->txt(
"expand_all"));
1402 $this->tpl->parseCurrentBlock();
1404 $this->tpl->setCurrentBlock(
"exp2_button");
1405 $this->tpl->setVariable(
"CMD_EXP2_BTN",
"collapseAll");
1406 $this->tpl->setVariable(
"TXT_EXP2_BTN", $lng->txt(
"collapse_all"));
1407 $this->tpl->parseCurrentBlock();
1409 require_once (
"./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
1410 $exp =
new ilSCORM2004EditorExplorer($this->ctrl->getLinkTarget($this,
"edit"),
1412 $exp->setFrameUpdater(
"content",
"ilHierarchyFormUpdater");
1413 $exp->setTargetGet(
"obj_id");
1414 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"showTree"));
1416 if (
$_GET[
"scexpand"] ==
"")
1418 $expanded = $mtree->readRootId();
1422 $expanded =
$_GET[
"scexpand"];
1426 if (
$_GET[
"active_node"] !=
"")
1428 $path = $mtree->getPathId(
$_GET[
"active_node"]);
1429 $exp->setForceOpenPath(
$path);
1431 $exp->highlightNode(
$_GET[
"active_node"]);
1433 $exp->setExpand($expanded);
1437 $output = $exp->getOutput();
1440 if ($ilCtrl->isAsynch())
1445 $this->tpl->setCurrentBlock(
"content");
1446 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"sahs_organization"));
1447 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
1448 $this->tpl->setVariable(
"EXPLORER",$output);
1449 $this->ctrl->setParameter($this,
"scexpand",
$_GET[
"scexpand"]);
1450 $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this,
"showTree"));
1451 $this->tpl->parseCurrentBlock();
1453 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1456 $this->tpl->show(
false);
1469 $ilTabs->setTabActive(
"sahs_sequencing");
1471 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1473 if (!$this->object->getSequencingExpertMode())
1475 $ilToolbar->addButton($lng->txt(
"sahs_activate_expert_mode"),
1476 $ilCtrl->getLinkTarget($this,
"confirmExpertMode"));
1480 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
1482 $t = $this->
object->getTree();
1483 $root_node =
$t->getNodeData(
$t->getRootId());
1484 $nodes = $this->
object->getTree()->getSubtree($root_node);
1485 foreach ($nodes as $node)
1487 if (in_array($node[
"type"], array(
"",
"chap",
"sco")))
1489 $ntpl =
new ilTemplate(
"tpl.seq_node.html",
true,
true,
"Modules/Scorm2004");
1490 $ntpl->setVariable(
"NODE_ID", $node[
"child"]);
1491 if ($node[
"type"] ==
"")
1493 $ntpl->setVariable(
"TITLE", $this->object->getTitle());
1498 $ntpl->setVariable(
"TITLE", $node[
"title"]);
1501 $ntpl->setVariable(
"SEQ_INFO",
1503 $list->addListNode($ntpl->get(), $node[
"child"], $node[
"parent"]);
1508 $tb->addFormButton($lng->txt(
"save"),
"saveSequencing");
1509 $ftpl =
new ilTemplate(
"tpl.sequencing.html",
true,
true,
"Modules/Scorm2004");
1510 $ftpl->setVariable(
"CONTENT", $list->getHTML());
1511 $ftpl->setVariable(
"FORM_ACTION", $ilCtrl->getFormAction($this));
1512 $ftpl->setVariable(
"TB", $tb->getHTML());
1513 $tpl->setContent($ftpl->get());
1524 $ilTabs->setTabActive(
"sahs_sequencing");
1526 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1528 $cgui->setFormAction($ilCtrl->getFormAction($this));
1529 $cgui->setHeaderText($lng->txt(
"sahs_activate_expert_mode_info"));
1530 $cgui->setCancel($lng->txt(
"cancel"),
"showSequencing");
1531 $cgui->setConfirm($lng->txt(
"sahs_activate_expert_mode"),
"activateExpertMode");
1533 $tpl->setContent($cgui->getHTML());
1546 $this->
object->setSequencingExpertMode(
true);
1547 $this->
object->update();
1549 $ilCtrl->redirect($this,
"showSequencing");
1560 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1561 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
1562 $t = $this->
object->getTree();
1563 $root_node =
$t->getNodeData(
$t->getRootId());
1564 $nodes = $this->
object->getTree()->getSubtree($root_node);
1565 foreach ($nodes as $node)
1567 if (in_array($node[
"type"], array(
"",
"chap",
"sco")))
1569 if ($node[
"type"] ==
"")
1577 $xml =
'<?xml version="1.0"?>'.ilUtil::stripSlashes(
$_POST[
"seq"][$node[
"child"]],
false);
1579 $ob_texts = array();
1580 if ($node[
"type"] ==
"sco")
1583 $objectives = $sco->getObjectives();
1584 foreach ($objectives as $o)
1586 $ob_texts[$o->getId()] = $o->getObjectiveId();
1590 $item->setSeqXml($xml);
1594 if ($node[
"type"] ==
"sco")
1596 foreach ($ob_texts as $id =>
$t)
1598 $objective =
new ilScorm2004Objective($node[
"child"], $id);
1599 $objective->setObjectiveId(
$t);
1600 $objective->updateObjective();
1608 $ilCtrl->redirect($this,
"showSequencing");
1618 $chaps = $this->
object->getTree()->getChilds(
1619 $this->object->getTree()->getRootId());
1621 foreach($chaps as $chap)
1623 if ($chap[
"type"] ==
"chap")
1625 $s_chaps[$chap[
"child"]] = $chap[
"title"];
1632 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1633 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1635 "0" => $lng->txt(
"all")
1637 $options = $options + $s_chaps;
1639 $si->setOptions($options);
1640 $si->setValue($cur_chap);
1641 $ilToolbar->addInputItem(
$si,
true);
1642 $ilToolbar->addFormButton($lng->txt(
"change"),
"selectLObjChapter");
1644 include_once(
"./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
1647 $tpl->setContent($obj_table->getHTML());
1655 $ilCtrl->redirect($this,
"showLearningObjectivesAlignment");
1663 switch (
$_POST[
'select_export'])
1665 case "exportScorm12":
1666 case "exportScorm2004_3rd":
1667 case "exportScorm2004_4th":
1671 case "exportHTMLOne":
1672 $this->ctrl->redirect($this,
$_POST[
'select_export']);
1675 $this->ctrl->redirect($this,
'showExportList');
1687 $template =
new ilTemplate(
"tpl.scorm2004_export_buttons.html",
true,
true,
'Modules/Scorm2004');
1699 "exportScorm2004_3rd" => $this->lng->txt(
"scorm_create_export_file_scrom2004"),
1700 "exportScorm2004_4th" => $this->lng->txt(
"scorm_create_export_file_scrom2004_4th"),
1701 "exportScorm12" => $this->lng->txt(
"scorm_create_export_file_scrom12"),
1702 "exportHTML" => $this->lng->txt(
"scorm_create_export_file_html"),
1703 "exportHTMLOne" => $this->lng->txt(
"scorm_create_export_file_html_one")
1705 foreach ($buttons as $value => $text)
1707 $template->setCurrentBlock(
'option');
1708 $template->setVariable(
'OPTION_VALUE', $value);
1710 $template->parseCurrentBlock();
1712 $template->setVariable(
'EXPORT_TITLE', $this->lng->txt(
'export'));
1713 $template->setVariable(
'EXPORT_LABEL', $this->lng->txt(
'type'));
1714 $template->setVariable(
'FORMACTION', $this->ctrl->getFormAction($this,
'selectExport'));
1716 $export_files = $this->
object->getExportFiles();
1718 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
1721 foreach ($export_files as $exp_file)
1723 $filetype = $exp_file[
'type'];
1724 $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($filetype))
1725 ?
" <b>(".$this->lng->txt(
"public").
")<b>"
1727 $file_arr = explode(
"__", $exp_file[
"file"]);
1730 $table_gui->setData(
$data);
1731 $this->tpl->setVariable(
'ADM_CONTENT', $template->get() .
"\n" . $table_gui->getHTML());
1741 global $ilAccess, $ilHelp;
1743 if ($this->ctrl->getCmd() ==
"delete")
1748 if (!$this->object->getEditable())
1753 $ilHelp->setScreenIdComponent(
"sahsed");
1756 $tabs_gui->addTarget(
"sahs_organization",
1757 $this->ctrl->getLinkTarget($this,
"showOrganization"),
"showOrganization",
1761 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui")
1764 $tabs_gui->addTarget(
"info_short",
1765 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
1766 "ilinfoscreengui",
"", $force_active);
1769 $tabs_gui->addTarget(
"settings",
1770 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
1781 $tabs_gui->addTarget(
"sahs_objectives_alignment",
1782 $this->ctrl->getLinkTarget($this,
"showLearningObjectivesAlignment"),
"showLearningObjectivesAlignment",
1786 $tabs_gui->addTarget(
"sahs_sequencing",
1787 $this->ctrl->getLinkTarget($this,
"showSequencing"),
"showSequencing",
1803 $tabs_gui->addTarget(
"meta_data",
1804 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
1805 "",
"ilmdeditorgui");
1808 $tabs_gui->addTarget(
"export",
1809 $this->ctrl->getLinkTarget($this,
"showExportList"), array(
"showExportList",
'confirmDeleteExportFile'),
1813 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId()))
1815 $tabs_gui->addTarget(
"perm_settings",
1816 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1819 if ($this->object->editable==1)
1822 $tabs_gui->addNonTabbedLink(
"preview",
1823 $this->lng->txt(
"cont_sc_preview"),
1824 $this->ctrl->getLinkTarget($this,
"preview"),
1837 if ($a_main_tab ==
"settings" &&
1838 $this->object->editable == 1)
1850 $ilTabs->activateSubTab($a_active);
1860 $slm_tree =
new ilTree($this->object->getId());
1862 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1870 $a_title =
"", $a_icon =
"", $a_gui_obj = null, $a_gui_cmd =
"")
1874 if ($a_form_action ==
"")
1876 $a_form_action = $ilCtrl->getFormAction($this);
1881 $a_title = $this->
object->getTitle();
1887 if ($a_top_node == 0)
1889 $a_top_node = $slm_tree->getRootId();
1892 if (is_null($a_gui_obj))
1895 $a_gui_cmd =
"showOrganization";
1898 $ilCtrl->setParameter($this,
"backcmd",
"showOrganization");
1899 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1901 $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
1902 $form_gui->setFormAction($a_form_action);
1905 $form_gui->setTree($slm_tree);
1906 $form_gui->setCurrentTopNodeId($a_top_node);
1907 $form_gui->addMultiCommand($lng->txt(
"delete"),
"deleteNodes");
1908 $form_gui->addMultiCommand($lng->txt(
"cut"),
"cutItems");
1909 $form_gui->addMultiCommand($lng->txt(
"copy"),
"copyItems");
1910 $form_gui->addCommand($lng->txt(
"cont_save_all_titles"),
"saveAllTitles");
1911 $form_gui->addCommand($lng->txt(
"expand_all"),
"expandAll");
1912 $form_gui->addCommand($lng->txt(
"collapse_all"),
"collapseAll");
1913 $form_gui->setTriggeredUpdateCommand(
"saveAllTitles");
1916 if (
$_GET[
"highlight"] !=
"")
1918 $hl = explode(
":",
$_GET[
"highlight"]);
1919 $form_gui->setHighlightedNodes($hl);
1920 $form_gui->setFocusId($hl[0]);
1923 $ilCtrl->setParameter($this,
"active_node",
$_GET[
"obj_id"]);
1924 $form_gui->setExplorerUpdater(
"tree",
"tree_div",
1925 $ilCtrl->getLinkTarget($this,
"showTree",
"",
true));
1926 $sc_tpl =
new ilTemplate(
"tpl.scormeditor_orga_screen.html",
true,
true,
"Modules/Scorm2004");
1927 $sc_tpl->setVariable(
"ORGANIZATION", $form_gui->getHTML());
1930 $tpl->setContent($sc_tpl->get());
1941 $ilCtrl->setParameter($this,
"nodes_mode", $a_mode);
1942 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1943 $node_id =
$_GET[
"obj_id"];
1944 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1945 $node_type = ($node_id > 0)
1949 $notes_gui =
new ilNoteGUI($this->object->getId(),
1950 (int) $node_id, $node_type);
1955 $notes_gui->enablePrivateNotes();
1956 $notes_gui->enablePublicNotes();
1958 $next_class = $ilCtrl->getNextClass($this);
1959 if ($next_class ==
"ilnotegui")
1961 $html = $this->ctrl->forwardCommand($notes_gui);
1965 $html = $notes_gui->getNotesHTML();
1977 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1979 $slm_tree =&
new ilTree($this->object->getId());
1981 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
1988 $parent_id = $slm_tree->getParentId($node_id);
1993 $parent_id = $node_id;
1996 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
1997 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1999 $chap_ids = array();
2000 for ($i = 1; $i <= $num; $i++)
2003 $chap->setTitle($lng->txt(
"sahs_new_chapter"));
2004 $chap->setSLMId($this->object->getId());
2007 $chap_ids[] = $chap->getId();
2009 $chap_ids = array_reverse($chap_ids);
2010 $chap_ids = implode($chap_ids,
":");
2014 $ilCtrl->setParameter($this,
"highlight", $chap_ids);
2015 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2017 return array(
"node_id" => $node_id,
"items" => $chap_ids);
2027 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2029 $slm_tree =&
new ilTree($this->object->getId());
2031 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2036 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
2037 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2041 $parent_id = $slm_tree->getParentId($node_id);
2046 $parent_id = $node_id;
2051 for ($i = 1; $i <= $num; $i++)
2054 $sco->setTitle($lng->txt(
"sahs_new_sco"));
2055 $sco->setSLMId($this->object->getId());
2058 $sco_ids[] = $sco->getId();
2060 $sco_ids = array_reverse($sco_ids);
2061 $sco_ids = implode($sco_ids,
":");
2065 $ilCtrl->setParameter($this,
"highlight", $sco_ids);
2066 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2068 return array(
"node_id" => $node_id,
"items" => $sco_ids);
2078 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2080 $slm_tree =&
new ilTree($this->object->getId());
2082 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2087 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
2088 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2092 $parent_id = $slm_tree->getParentId($node_id);
2097 $parent_id = $node_id;
2102 for ($i = 1; $i <= $num; $i++)
2105 $ass->setTitle($lng->txt(
"sahs_new_asset"));
2106 $ass->setSLMId($this->object->getId());
2109 $ass_ids[] = $ass->getId();
2111 $ass_ids = array_reverse($ass_ids);
2112 $ass_ids = implode($ass_ids,
":");
2116 $ilCtrl->setParameter($this,
"highlight", $ass_ids);
2117 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2119 return array(
"node_id" => $node_id,
"items" => $ass_ids);
2129 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2131 $slm_tree =&
new ilTree($this->object->getId());
2133 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2138 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2139 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2142 $parent_id = $slm_tree->getParentId($node_id);
2147 $parent_id = $node_id;
2151 $page_ids = array();
2152 for ($i = 1; $i <= $num; $i++)
2155 $page->setTitle($lng->txt(
"sahs_new_page"));
2156 $page->setSLMId($this->object->getId());
2159 $page_ids[] = $page->getId();
2161 $page_ids = array_reverse($page_ids);
2162 $page_ids = implode($page_ids,
":");
2166 $ilCtrl->setParameter($this,
"highlight", $page_ids);
2167 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2169 return array(
"node_id" => $node_id,
"items" => $page_ids);
2181 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2182 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2184 $templates = array();
2185 $description = null;
2188 $default_identifier =
$_POST[
"identifier"];
2193 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scormeditor_seq_chooser.html",
"Modules/Scorm2004");
2195 $this->tpl->setCurrentBlock(
"option_item");
2198 foreach ($arr_templates as $templ)
2201 $item_data = $templ->getMetadataProperties();
2202 $item_data[
'identifier'] = $templ->getIdentifier();
2203 array_push($templates,$item_data);
2204 if ($default_identifier == $item_data[
'identifier']) {$sel =
'selected'; $active = $item_data;}
2205 $this->tpl->setVariable(
"VAL_SELECTED",$sel );
2206 $this->tpl->setVariable(
"VAL_IDENTIFIER",$item_data[
'identifier'] );
2207 $this->tpl->setVariable(
"VAL_TITLE",$item_data[
'title'] );
2208 $this->tpl->parseCurrentBlock();
2212 if ($active == null )
2215 $description = $templates[0][
'description'];
2216 $image = $templates[0][
'thumbnail'];
2218 $description = $active[
'description'];
2219 $image = $active[
'thumbnail'];
2222 $this->tpl->setVariable(
"VAL_DESCRIPTION",$description);
2225 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2226 $this->tpl->setVariable(
"BTN_NAME",
"insertScenario");
2227 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2228 $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"insert"));
2229 $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
2231 $this->tpl->setVariable(
"TXT_TITLE",
"Choose Sequencing Template");
2233 $node_id =
$_POST[
"node_id"];
2234 $first_child =
$_POST[
"first_child"];
2239 $this->tpl->setVariable(
"VAL_NODE_ID", $node_id);
2240 $this->tpl->setVariable(
"VAL_FIRST_CHILD", $first_child);
2252 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2254 $slm_tree =&
new ilTree($this->object->getId());
2256 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2258 $node_id =
$_POST[
"node_id"];
2260 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2261 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2262 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2264 if (!
$_POST[
"first_child"])
2266 $parent_id = $slm_tree->getParentId($node_id);
2271 $parent_id = $node_id;
2276 $id = $template->insertTemplateForObjectAtParent($this->
object,$parent_id,$target);
2277 $ilCtrl->setParameter($this,
"highlight", $id);
2278 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2298 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2302 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scormeditor_page_layout_chooser.html",
"Modules/Scorm2004");
2304 $this->tpl->setCurrentBlock(
"option_item");
2307 foreach ($arr_templates as $templ)
2311 $templ->readObject();
2312 $this->tpl->setVariable(
"VAL_LAYOUT_TITLE",$templ->getTitle());
2313 $this->tpl->setVariable(
"VAL_LAYOUT_IMAGE",$templ->getPreview());
2314 $this->tpl->setVariable(
"VAL_LAYOUT_ID",$templ->getId());
2315 $this->tpl->setVariable(
"VAL_DISPLAY",
"inline");
2317 $this->tpl->setVariable(
"VAL_CHECKED",
"checked");
2319 if ($count%4 == 0) {
2320 $this->tpl->setVariable(
"END_ROW",
"</tr>");
2322 if ($count == 1 || ($count-1)%4 == 0) {
2323 $this->tpl->setVariable(
"BEGIN_ROW",
"<tr>");
2325 $this->tpl->parseCurrentBlock();
2330 $rest = 4-($count%4);
2335 for ($i=1;$i<=
$rest;$i++) {
2336 $this->tpl->setVariable(
"VAL_DISPLAY",
"none");
2337 $this->tpl->setVariable(
"VAL_LAYOUT_ID",$templ->getId());
2340 $this->tpl->setVariable(
"END_ROW",
"</tr>");
2342 $this->tpl->parseCurrentBlock();
2352 $ilCtrl->saveParameter($this,
"obj_id");
2354 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2356 $this->tpl->setVariable(
"BTN_NAME",
"insertTemplate");
2357 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2358 $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"create"));
2359 $this->tpl->setVariable(
"CMD_CANCEL",
"showOrganization");
2361 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2362 $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"insert"));
2363 $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
2364 if ($a_special_page)
2366 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"sahs_choose_special_page"));
2370 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"sahs_choose_page_template"));
2383 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2385 $slm_tree =&
new ilTree($this->object->getId());
2387 $slm_tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2390 $node_id =
$_POST[
"node_id"];
2391 $layout_id =
$_POST[
"layout_id"];
2394 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2395 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2397 if (!
$_POST[
"first_child"])
2399 $parent_id = $slm_tree->getParentId($node_id);
2404 $parent_id = $node_id;
2408 $page_ids = array();
2409 for ($i = 1; $i <= $num; $i++)
2412 $page->setTitle($lng->txt(
"sahs_new_page"));
2413 $page->setSLMId($this->object->getId());
2414 $page->create(
false,$layout_id);
2416 $page_ids[] = $page->getId();
2418 $page_ids = array_reverse($page_ids);
2419 $page_ids = implode($page_ids,
":");
2423 if (
$_GET[
"obj_id"] !=
"")
2429 $ilCtrl->setParameter($this,
"highlight", $page_ids);
2430 $ilCtrl->redirect($this,
"showOrganization",
"node_".$node_id);
2440 $_GET[
"scexpand"] =
"";
2441 $mtree = $this->
object->getTree();
2442 $n_id = (
$_GET[
"obj_id"] > 0)
2444 : $mtree->readRootId();
2445 $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2447 foreach ($stree as
$n)
2449 $n_arr[] = $n[
"child"];
2460 $_GET[
"scexpand"] =
"";
2461 $mtree = $this->
object->getTree();
2462 $n_id = (
$_GET[
"obj_id"] > 0)
2464 : $mtree->readRootId();
2465 $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2467 foreach ($stree as
$n)
2469 if (in_array($n[
"child"], $old) && $n[
"child"] != $n_id)
2471 $k = array_search($n[
"child"], $old);
2486 if (is_array(
$_POST[
"title"]))
2488 include_once(
"./Services/MetaData/classes/class.ilMD.php");
2489 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2493 if (is_object($node_obj))
2496 $md =
new ilMD($this->object->getId(), $id, $node_obj->getType());
2507 $ilCtrl->redirect($this,
"showOrganization");
2522 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2528 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2531 if ($a_form_action ==
"")
2534 ?
"showOrganization"
2536 $this->ctrl->setParameter($this,
"backcmd",
$cmd);
2537 $a_form_action = $this->ctrl->getFormAction($this);
2539 $confirmation_gui->setFormAction($a_form_action);
2540 $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
2543 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2544 foreach(
$_POST[
"id"] as $id)
2549 $confirmation_gui->addItem(
"id[]", $node_obj->getId(),
2554 $confirmation_gui->setCancel($lng->txt(
"cancel"),
"cancelDelete");
2555 $confirmation_gui->setConfirm($lng->txt(
"confirm"),
"confirmedDelete");
2557 $tpl->setContent($confirmation_gui->getHTML());
2565 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
2576 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
2577 $tree->setTreeTablePK(
"slm_id");
2580 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2581 foreach (
$_POST[
"id"] as $id)
2586 $node_data =
$tree->getNodeData($id);
2587 if (is_object($obj))
2589 $obj->setSLMId($this->object->getId());
2598 if(
$tree->isInTree($id))
2600 $tree->deleteTree($node_data);
2613 $ilCtrl->redirect($this,
"showOrganization");
2624 $this->
object->executeDragDrop(
$_POST[
"il_hform_source_id"],
$_POST[
"il_hform_target_id"],
2626 $ilCtrl->redirect($this,
"showOrganization");
2636 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2640 foreach($items as $k => $item)
2647 foreach($todel as $k)
2654 $ilCtrl->redirect($this, $a_return);
2659 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
2663 $ilCtrl->redirect($this, $a_return);
2673 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2677 foreach($items as $k => $item)
2684 foreach($todel as $k)
2692 $ilCtrl->redirect($this, $a_return);
2697 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
2702 $ilCtrl->redirect($this, $a_return);
2712 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2715 $ilCtrl->redirect($this,
"showOrganization",
2726 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2729 $ilCtrl->redirect($this,
"showOrganization",
2740 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2743 $ilCtrl->redirect($this,
"showOrganization",
2754 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2757 $ilCtrl->redirect($this,
"showOrganization",
2765 $export->buildExportFile();
2767 $this->ctrl->redirect($this,
"showExportList");
2773 $export->buildExportFile();
2775 $this->ctrl->redirect($this,
"showExportList");
2781 $export->buildExportFile();
2783 $this->ctrl->redirect($this,
"showExportList");
2789 $export->buildExportFile();
2791 $this->ctrl->redirect($this,
"showExportList");
2797 $export->buildExportFile();
2799 $this->ctrl->redirect($this,
"showExportList");
2805 if(!$export->buildExportFile())
2807 if(!PATH_TO_MKISOFS)
2808 $this->ilias->raiseError($this->lng->txt(
"no_mkisofs_configured"),$this->ilias->error_obj->MESSAGE);
2810 $this->ctrl->redirect($this,
"showExportList");
2816 $export->buildExportFile();
2817 $this->ctrl->redirect($this,
"showExportList");
2822 if(!isset(
$_POST[
"file"]))
2824 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2827 if (count(
$_POST[
"file"]) > 1)
2829 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2831 $export =
new ilSCORM2004Export($this->
object);
2832 $export_dir = $export->getExportDirectoryForType(
$_POST[
'type'][
$_POST[
'file'][0]]);
2841 if(!isset(
$_POST[
"file"]))
2844 $this->ctrl->redirect($this,
"showExportList");
2848 $export_files = $this->
object->getExportFiles();
2850 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
2853 foreach ($export_files as $exp_file)
2855 foreach (
$_POST[
'file'] as $delete_file)
2857 if (strcmp($delete_file, $exp_file[
'file']) == 0)
2859 $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($exp_file[
"type"]))
2860 ?
" <b>(".$this->lng->txt(
"public").
")<b>"
2862 $file_arr = explode(
"__", $exp_file[
"file"]);
2867 $table_gui->setData(
$data);
2868 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2877 $this->ctrl->redirect($this,
"showExportList");
2886 include_once
"./Services/Utilities/classes/class.ilUtil.php";
2887 $export =
new ilSCORM2004Export($this->
object);
2890 $export_dir = $export->getExportDirectoryForType(
$_POST[
'type'][$idx]);
2891 $exp_file = $export_dir.
"/".
$file;
2892 if (@is_file($exp_file))
2898 $this->ctrl->redirect($this,
"showExportList");
2906 if(!isset(
$_POST[
"file"]))
2908 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2910 if (count(
$_POST[
"file"]) > 1)
2912 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2915 $export =
new ilSCORM2004Export($this->
object);
2919 if ($this->object->getPublicExportFile($type) ==
$file)
2921 $this->
object->setPublicExportFile($type,
"");
2925 $this->
object->setPublicExportFile($type,
$file);
2927 $this->
object->update();
2928 $this->ctrl->redirect($this,
"showExportList");
2939 $zipfile = $export->buildExportFile();
2940 $zipPathinfo = pathinfo($zipfile);
2941 $file_path = $this->
object->getDataDirectory().
"/".($zipPathinfo[
"basename"]);
2942 copy($zipfile,$file_path);
2949 include_once (
"./Modules/Scorm2004/classes/ilSCORM13Package.php");
2951 $rte_pkg->il_import($this->object->getDataDirectory(),$this->
object->getId(),
$ilias,
false,
true);
2958 ilUtil::redirect(
"ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID().
"&envEditor=1");