4 include_once
"classes/class.ilObjectGUI.php";
5 include_once
"./Modules/LearningModule/classes/class.ilObjContentObject.php";
6 include_once (
"./Modules/LearningModule/classes/class.ilLMPageObjectGUI.php");
7 include_once (
"./Modules/LearningModule/classes/class.ilStructureObjectGUI.php");
8 require_once
'Services/LinkChecker/interfaces/interface.ilLinkCheckerGUIRowHandling.php';
35 $lng->loadLanguageModule(
"content");
46 if ($this->ctrl->getRedirectSource() ==
"ilinternallinkgui")
52 if ($this->ctrl->getCmdClass() ==
"ilinternallinkgui")
54 $this->ctrl->setReturn($this,
"explorer");
58 $next_class = $this->ctrl->getNextClass($this);
61 $cmd = $this->ctrl->getCmd(
"", array(
"downloadExportFile"));
65 case "illearningprogressgui":
68 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
69 $this->
setTabs(
"learning_progress");
73 $this->ctrl->forwardCommand($new_gui);
80 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
82 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
83 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
85 $this->ctrl->forwardCommand($md_gui);
88 case "ilobjstylesheetgui":
90 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
91 $this->ctrl->setReturn($this,
"editStyleProperties");
92 $style_gui =&
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
94 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
96 $style_gui->setCreationMode(
true);
98 $ret =& $this->ctrl->forwardCommand($style_gui);
101 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
104 $this->
object->setStyleSheetId($style_id);
105 $this->
object->update();
106 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
110 case "illmpageobjectgui":
112 $ilTabs->setBackTarget($lng->txt(
"learning module"),
113 $ilCtrl->getLinkTarget($this,
"chapters"));
114 $this->ctrl->saveParameter($this, array(
"obj_id"));
116 $this->ctrl->setReturn($this,
"chapters");
121 if (
$_GET[
"obj_id"] !=
"")
124 $pg_gui->setLMPageObject($obj);
127 $ret =& $this->ctrl->forwardCommand($pg_gui);
128 if (
$cmd ==
"save" ||
$cmd ==
"cancel")
134 case "ilstructureobjectgui":
135 $ilTabs->setBackTarget($lng->txt(
"learning module"),
136 $ilCtrl->getLinkTarget($this,
"chapters"));
138 $this->ctrl->saveParameter($this, array(
"obj_id"));
140 $this->ctrl->setReturn($this,
"chapters");
142 if (
$_GET[
"obj_id"] !=
"")
145 $st_gui->setStructureObject($obj);
148 $ret =& $this->ctrl->forwardCommand($st_gui);
149 if (
$cmd ==
"save" ||
$cmd ==
"cancel")
151 if (
$_GET[
"obj_id"] ==
"")
153 $this->ctrl->redirect($this,
"chapters");
157 $this->ctrl->setCmd(
"subchap");
163 case 'ilpermissiongui':
164 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
174 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
176 $ret =& $this->ctrl->forwardCommand($perm_gui);
180 case 'ilinfoscreengui':
184 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
186 $info->enablePrivateNotes();
187 $info->enableLearningProgress();
190 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
192 $info->enableNewsEditing();
193 $info->setBlockProperty(
"news",
"settings",
true);
197 $info->addMetaDataSections($this->object->getId(), 0,
198 $this->
object->getType());
200 $ret =& $this->ctrl->forwardCommand($info);
207 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
209 $exp_gui->addFormat(
"xml",
"", $this,
"export");
210 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
211 $exp_gui->addFormat(
"scorm",
"", $this,
"exportSCORM");
212 $exp_gui->addCustomColumn($lng->txt(
"cont_public_access"),
213 $this,
"getPublicAccessColValue");
214 $exp_gui->addCustomMultiCommand($lng->txt(
"cont_public_access"),
215 $this,
"publishExportFile");
216 $ret = $this->ctrl->forwardCommand($exp_gui);
219 case "ilcommonactiondispatchergui":
220 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
222 $this->ctrl->forwardCommand($gui);
226 $new_type =
$_POST[
"new_type"]
231 if (
$cmd ==
"create" &&
232 !in_array($new_type, array(
"dbk",
"lm")))
239 $this->ctrl->setCmdClass(
"ilLMPageObjectGUI");
245 $this->ctrl->setCmdClass(
"ilStructureObjectGUI");
254 in_array($new_type, array(
"dbk",
"lm")))
278 return array(
"ilLMPageObjectGUI",
"ilStructureObjectGUI",
"ilObjStyleSheetGUI");
288 $lng->loadLanguageModule(
"style");
293 $showViewInFrameset =
true;
295 if ($showViewInFrameset)
301 $buttonTarget =
"ilContObj".$this->object->getID();
307 $this->tpl->setContent($this->form->getHTML());
317 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
326 $this->form->addItem($ti);
333 $this->form->addItem($ta);
337 $this->form->addItem($online);
341 $this->form->addItem($layout);
344 $page_header =
new ilSelectInputGUI($lng->txt(
"cont_page_header"),
"lm_pg_header");
345 $option = array (
"st_title" => $this->lng->txt(
"cont_st_title"),
346 "pg_title" => $this->lng->txt(
"cont_pg_title"),
347 "none" => $this->lng->txt(
"cont_none"));
349 $this->form->addItem($page_header);
353 $this->form->addItem($chap_num);
357 $option = array (
"chapters" => $this->lng->txt(
"cont_chapters_only"),
358 "pages" => $this->lng->txt(
"cont_chapters_and_pages"));
360 $this->form->addItem($toc_mode);
363 if (!$this->ilias->getSetting(
'disable_comments'))
365 $this->lng->loadLanguageModule(
"notes");
367 $pub_nodes->
setInfo($this->lng->txt(
"cont_lm_comments_desc"));
368 $this->form->addItem($pub_nodes);
373 $lpp->
setInfo($this->lng->txt(
"cont_layout_per_page_info"));
374 $this->form->addItem($lpp);
377 $synch =
new ilCheckboxInputGUI($lng->txt(
"cont_synchronize_frames"),
"cobj_clean_frames");
378 $synch->
setInfo($this->lng->txt(
"cont_synchronize_frames_desc"));
379 $this->form->addItem($synch);
382 $com =
new ilCheckboxInputGUI($lng->txt(
"enable_hist_user_comments"),
"cobj_user_comments");
383 $com->
setInfo($this->lng->txt(
"enable_hist_user_comments_desc"));
384 $this->form->addItem($com);
386 $this->form->setTitle($lng->txt(
"cont_general_properties"));
387 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
388 $this->form->setFormAction($ilCtrl->getFormAction($this));
397 $values[
"title"] = $this->
object->getTitle();
398 $values[
"description"] = $this->
object->getDescription();
399 if ($this->object->getOnline())
401 $values[
"cobj_online"] =
true;
403 $values[
"lm_layout"] = $this->
object->getLayout();
404 $values[
"lm_pg_header"] = $this->
object->getPageHeader();
405 if ($this->object->isActiveNumbering())
407 $values[
"cobj_act_number"] =
true;
409 $values[
"toc_mode"] = $this->
object->getTOCMode();
410 if ($this->object->publicNotes())
412 $values[
"cobj_pub_notes"] =
true;
414 if ($this->object->cleanFrames())
416 $values[
"cobj_clean_frames"] =
true;
418 if ($this->object->isActiveHistoryUserComments())
420 $values[
"cobj_user_comments"] =
true;
422 $values[
"layout_per_page"] = $this->
object->getLayoutPerPage();
424 $this->form->setValuesByArray($values);
435 if ($this->form->checkInput())
437 $this->
object->setTitle(
$_POST[
'title']);
438 $this->
object->setDescription(
$_POST[
'description']);
439 $this->
object->setLayout(
$_POST[
"lm_layout"]);
440 $this->
object->setPageHeader(
$_POST[
"lm_pg_header"]);
441 $this->
object->setTOCMode(
$_POST[
"toc_mode"]);
442 $this->
object->setOnline(
$_POST[
"cobj_online"]);
443 $this->
object->setActiveNumbering(
$_POST[
"cobj_act_number"]);
444 $this->
object->setCleanFrames(
$_POST[
"cobj_clean_frames"]);
445 if (!$this->ilias->getSetting(
'disable_comments'))
447 $this->
object->setPublicNotes(
$_POST[
"cobj_pub_notes"]);
449 $this->
object->setHistoryUserComments(
$_POST[
"cobj_user_comments"]);
450 $this->
object->setLayoutPerPage(
$_POST[
"layout_per_page"]);
451 $this->
object->updateProperties();
452 $this->
object->update();
454 $this->ctrl->redirect($this,
"properties");
458 $this->form->setValuesByPost();
459 $tpl->setContent($this->form->getHTML());
471 $tpl->setContent($this->form->getHTML());
481 $lng->loadLanguageModule(
"style");
483 $ilTabs->setTabActive(
"settings");
486 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
489 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
490 $style_id = $this->
object->getStyleSheetId();
492 if ($fixed_style > 0)
496 $this->lng->txt(
"global_fixed").
")");
497 $this->form->addItem($st);
504 $st_styles[0] = $this->lng->txt(
"default");
514 $this->form->addItem($st);
519 $this->form->addCommandButton(
"editStyle",
520 $lng->txt(
"cont_edit_style"));
521 $this->form->addCommandButton(
"deleteStyle",
522 $lng->txt(
"cont_delete_style"));
530 $st_styles,
false,
true);
531 $style_sel =
new ilSelectInputGUI($lng->txt(
"cont_current_style"),
"style_id");
533 $style_sel->setValue($style_id);
534 $this->form->addItem($style_sel);
536 $this->form->addCommandButton(
"saveStyleSettings",
538 $this->form->addCommandButton(
"createStyle",
539 $lng->txt(
"sty_create_ind_style"));
542 $this->form->setTitle($lng->txt(
"cont_style"));
543 $this->form->setFormAction($ilCtrl->getFormAction($this));
553 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
563 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
573 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
583 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
585 || $this->object->getStyleSheetId() == 0))
588 $this->
object->update();
591 $this->ctrl->redirect($this,
"editStyleProperties");
601 $lng->loadLanguageModule(
"style");
603 $ilTabs->setTabActive(
"settings");
607 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_properties.html",
"Modules/LearningModule");
608 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
610 $this->tpl->setVariable(
"TXT_LM_MENU", $this->lng->txt(
"cont_lm_menu"));
611 $this->tpl->setVariable(
"TXT_ACT_MENU", $this->lng->txt(
"cont_active"));
612 $this->tpl->setVariable(
"CBOX_LM_MENU",
"cobj_act_lm_menu");
613 $this->tpl->setVariable(
"VAL_LM_MENU",
"y");
614 if ($this->object->isActiveLMMenu())
616 $this->tpl->setVariable(
"CHK_LM_MENU",
"checked");
620 $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
621 $this->tpl->setVariable(
"CBOX_TOC",
"cobj_act_toc");
622 $this->tpl->setVariable(
"VAL_TOC",
"y");
623 if ($this->object->isActiveTOC())
625 $this->tpl->setVariable(
"CHK_TOC",
"checked");
629 $this->tpl->setVariable(
"TXT_PRINT", $this->lng->txt(
"cont_print_view"));
630 $this->tpl->setVariable(
"CBOX_PRINT",
"cobj_act_print");
631 $this->tpl->setVariable(
"VAL_PRINT",
"y");
632 if ($this->object->isActivePrintView())
634 $this->tpl->setVariable(
"CHK_PRINT",
"checked");
638 $this->tpl->setVariable(
"TXT_PRINT_PREV_GLO", $this->lng->txt(
"cont_print_view_pre_glo"));
639 $this->tpl->setVariable(
"CBOX_PRINT_PREV_GLO",
"cobj_act_print_prev_glo");
640 $this->tpl->setVariable(
"VAL_PRINT_PREV_GLO",
"y");
641 if ($this->object->isActivePreventGlossaryAppendix())
643 $this->tpl->setVariable(
"CHK_PRINT_PREV_GLO",
"checked");
647 $no_download_file_available =
648 " ".$lng->txt(
"cont_no_download_file_available").
649 " <a href='".$ilCtrl->getLinkTargetByClass(
"ilexportgui",
"").
"'>".$lng->txt(
"change").
"</a>";
650 $types = array(
"xml",
"html",
"scorm");
651 foreach($types as $type)
653 if ($this->object->getPublicExportFile($type) !=
"")
655 if (is_file($this->object->getExportDirectory($type).
"/".
656 $this->
object->getPublicExportFile($type)))
658 $no_download_file_available =
"";
662 $this->tpl->setVariable(
"TXT_DOWNLOADS", $this->lng->txt(
"cont_downloads"));
663 $this->tpl->setVariable(
"TXT_DOWNLOADS_DESC", $this->lng->txt(
"cont_downloads_desc").$no_download_file_available);
664 $this->tpl->setVariable(
"CBOX_DOWNLOADS",
"cobj_act_downloads");
665 $this->tpl->setVariable(
"VAL_DOWNLOADS",
"y");
667 if ($this->object->isActiveDownloads())
669 $this->tpl->setVariable(
"CHK_DOWNLOADS",
"checked=\"checked\"");
672 $this->tpl->setVariable(
"TXT_DOWNLOADS_PUBLIC_DESC", $this->lng->txt(
"cont_downloads_public_desc"));
673 $this->tpl->setVariable(
"CBOX_DOWNLOADS_PUBLIC",
"cobj_act_downloads_public");
674 $this->tpl->setVariable(
"VAL_DOWNLOADS_PUBLIC",
"y");
676 if ($this->object->isActiveDownloadsPublic())
678 $this->tpl->setVariable(
"CHK_DOWNLOADS_PUBLIC",
"checked=\"checked\"");
681 if (!$this->object->isActiveDownloads())
683 $this->tpl->setVariable(
"CHK2_DOWNLOADS_PUBLIC",
"disabled=\"disabled\"");
688 $entries = $this->lmme_obj->getMenuEntries();
690 if (count($entries) > 0)
692 foreach ($entries as $entry)
694 $this->ctrl->setParameter($this,
"menu_entry", $entry[
"id"]);
696 $this->tpl->setCurrentBlock(
"menu_entries");
698 if ($entry[
"type"] ==
"intern")
700 $entry[
"link"] = ILIAS_HTTP_PATH.
"/goto.php?target=".$entry[
"link"];
704 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:'))
706 $entry[
"link"] =
"http://".$entry[
"link"];
709 $this->tpl->setVariable(
"ENTRY_LINK", $entry[
"link"]);
710 $this->tpl->setVariable(
"ENTRY_TITLE", $entry[
"title"]);
712 $this->tpl->setVariable(
"CBOX_ENTRY",
"menu_entries[]");
713 $this->tpl->setVariable(
"VAL_ENTRY", $entry[
"id"]);
717 $this->tpl->setVariable(
"CHK_ENTRY",
"checked=\"checked\"");
721 $this->tpl->setVariable(
"LINK_EDIT", $this->ctrl->getLinkTarget($this,
"editMenuEntry"));
722 $this->tpl->setVariable(
"TARGET_EDIT",
"content");
723 $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
726 $this->tpl->setVariable(
"LINK_DROP", $this->ctrl->getLinkTarget($this,
"deleteMenuEntry"));
727 $this->tpl->setVariable(
"TARGET_DROP",
"content");
728 $this->tpl->setVariable(
"TXT_DROP", $this->lng->txt(
"drop"));
731 $this->tpl->parseCurrentBlock();
738 $this->tpl->setCurrentBlock(
"commands");
739 $this->tpl->setVariable(
"BTN_NAME",
"saveMenuProperties");
740 $this->tpl->setVariable(
"BTN_TEXT", $this->lng->txt(
"save"));
741 $this->tpl->setVariable(
"BTN_NAME2",
"addMenuEntry");
742 $this->tpl->setVariable(
"BTN_TEXT2", $this->lng->txt(
"add_menu_entry"));
743 $this->tpl->parseCurrentBlock();
756 $this->
object->setActivePreventGlossaryAppendix(
ilUtil::yn2tf(
$_POST[
"cobj_act_print_prev_glo"]));
758 $this->
object->setActiveDownloadsPublic(
ilUtil::yn2tf(
$_POST[
"cobj_act_downloads_public"]));
759 $this->
object->updateProperties();
763 $this->lmme_obj->updateActiveStatus(
$_POST[
"menu_entries"]);
766 $this->ctrl->redirect($this,
"editMenuProperties");
776 switch ($this->object->getType())
779 $gui_class =
"ilobjlearningmodulegui";
783 $gui_class =
"ilobjdlbookgui";
787 $ilCtrl->setParameterByClass($gui_class,
"active_node",
$_GET[
"active_node"]);
789 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
796 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
799 require_once (
"./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
804 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"explorer"));
806 if (
$_GET[
"lmmovecopy"] ==
"1")
812 if (
$_GET[
"lmexpand"] ==
"")
814 $mtree =
new ilTree($this->object->getId());
816 $mtree->setTreeTablePK(
"lm_id");
817 $expanded = $mtree->readRootId();
821 $expanded =
$_GET[
"lmexpand"];
823 if (
$_GET[
"active_node"] !=
"")
825 $path = $this->lm_tree->getPathId(
$_GET[
"active_node"]);
826 $exp->setForceOpenPath(
$path);
828 $exp->highlightNode(
$_GET[
"active_node"]);
830 $exp->setExpand($expanded);
834 $output = $exp->getOutput();
837 if ($ilCtrl->isAsynch())
842 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
861 $this->tpl->setCurrentBlock(
"content");
862 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_chap_and_pages"));
863 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
864 $this->tpl->setVariable(
"EXPLORER",$output);
865 $this->ctrl->setParameter($this,
"lmexpand",
$_GET[
"lmexpand"]);
866 $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this,
"explorer"));
867 $this->tpl->parseCurrentBlock();
868 $this->tpl->show(
false);
877 include_once
"./Services/COPage/classes/class.ilWysiwygUtil.php";
879 $popup->show(
$_GET[
"ptype"]);
890 $this->
object->executeDragDrop(
$_POST[
"il_hform_source_id"],
$_POST[
"il_hform_target_id"],
892 $ilCtrl->redirect($this,
"chapters");
897 $forms = array(self::CFORM_NEW => $this->
initCreateForm($a_new_type),
907 $a_new_object->setCleanFrames(
true);
911 $a_new_object->createLMTree();
914 $a_new_object->addFirstChapterAndPage();
919 "&baseClass=ilLMEditorGUI");
929 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
933 $this->ctrl->setParameter($this,
"new_type", $new_type);
936 $form->setTableWidth(
"600px");
941 $fi->setRequired(
true);
947 $cb->
setInfo($this->lng->txt(
""));
950 $form->addCommandButton(
"importFile", $lng->txt(
"import"));
951 $form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
953 $form->setTitle($this->lng->txt(
"import_".$new_type));
954 $form->setFormAction($ilCtrl->getFormAction($this));
964 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
966 $bib_gui->setObject($this->
object);
967 $bibItemName =
$_POST[
"bibItemName"] ?
$_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
968 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
969 if ($bibItemIndex ==
"")
971 $bibItemPath =
$_POST[
"bibItemPath"] ?
$_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
972 if ($bibItemName !=
"")
974 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
975 $data = $bib_gui->bib_obj->getElement(
"BibItem");
976 $bibItemIndex = (count(
$data) - 1);
984 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
987 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1008 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1010 $bib_gui->setObject($this->
object);
1011 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1012 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
1013 if (strpos($bibItemIndex,
",") > 0)
1015 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
1017 if ($a_target ==
"")
1019 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1022 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1044 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1046 $bib_gui->setObject($this->
object);
1047 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1049 if ($bibItemIndex < 0)
1053 if ($a_target ==
"")
1055 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1058 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1079 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1081 $bib_gui->setObject($this->
object);
1082 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1084 if ($bibItemIndex < 0)
1088 $bibItemIndex = $bib_gui->save($bibItemIndex);
1090 if ($a_target ==
"")
1092 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1095 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1141 global $_FILES, $rbacsystem,
$ilDB,
$tpl;
1143 include_once
"./Modules/LearningModule/classes/class.ilObjLearningModule.php";
1145 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
$_GET[
"new_type"]))
1147 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
1152 if ($form->checkInput())
1155 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
1157 $newObj->setType(
$_GET[
"new_type"]);
1158 $newObj->setTitle($_FILES[
"xmldoc"][
"name"]);
1159 $newObj->setDescription(
"");
1160 $newObj->create(
true);
1161 $newObj->createReference();
1162 $newObj->putInTree(
$_GET[
"ref_id"]);
1163 $newObj->setPermissions(
$_GET[
"ref_id"]);
1164 $newObj->notify(
"new",
$_GET[
"ref_id"],
$_GET[
"parent_non_rbac_id"],
$_GET[
"ref_id"],$newObj->getRefId());
1167 $newObj->createLMTree();
1170 $mess = $newObj->importFromZipFile($_FILES[
"xmldoc"][
"tmp_name"], $_FILES[
"xmldoc"][
"name"],
1177 "&baseClass=ilLMEditorGUI");
1181 $link =
'<a href="'.
"ilias.php?ref_id=".$newObj->getRefId().
1182 "&baseClass=ilLMEditorGUI".
'" target="_top">'.$this->lng->txt(
"btn_next").
'</a>';
1183 $tpl->setContent(
"<br />".$link.
"<br /><br />".$mess.$link);
1188 $form->setValuesByPost();
1189 $tpl->setContent($form->getHtml());
1203 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
1205 $ilCtrl->setParameter($this,
"backcmd",
"chapters");
1207 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
1210 $form_gui->setTitle($this->object->getTitle());
1212 $form_gui->setTree($this->lm_tree);
1213 $form_gui->setMaxDepth(0);
1214 $form_gui->setCurrentTopNodeId($this->tree->getRootId());
1215 $form_gui->addMultiCommand($lng->txt(
"delete"),
"delete");
1216 $form_gui->addMultiCommand($lng->txt(
"cut"),
"cutItems");
1217 $form_gui->addMultiCommand($lng->txt(
"copy"),
"copyItems");
1218 if ($this->object->getLayoutPerPage())
1220 $form_gui->addMultiCommand($lng->txt(
"cont_set_layout"),
"setPageLayoutInHierarchy");
1223 $form_gui->addCommand($lng->txt(
"cont_save_all_titles"),
"saveAllTitles");
1224 $up_gui = ($this->
object->getType() ==
"dbk")
1226 :
"ilobjlearningmodulegui";
1227 $form_gui->setExplorerUpdater(
"tree",
"tree_div",
1228 $ilCtrl->getLinkTargetByClass($up_gui,
"explorer",
"",
true));
1230 $ctpl =
new ilTemplate(
"tpl.chap_and_pages.html",
true,
true,
"Modules/LearningModule");
1231 $ctpl->setVariable(
"HIERARCHY_FORM", $form_gui->getHTML());
1232 $ilCtrl->setParameter($this,
"obj_id",
"");
1233 $ctpl->setVariable(
"HREF_NO_JS_EDIT",
1234 $ilCtrl->getLinkTarget($this,
"deactivateJSChapterEditing"));
1235 $ctpl->setVariable(
"TXT_NO_JS_EDIT",
1236 $lng->txt(
"cont_not_js_chap_editing"));
1238 $this->tpl->setContent($ctpl->get());
1242 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.structure_edit.html",
"Modules/LearningModule");
1245 $this->ctrl->setParameter($this,
"backcmd",
"chapters");
1246 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1247 $this->tpl->setVariable(
"HEADER_TEXT", $this->lng->txt(
"cont_chapters"));
1251 $childs = $this->lm_tree->getChilds($this->lm_tree->getRootId());
1252 foreach ($childs as $child)
1254 if($child[
"type"] !=
"st")
1259 $this->tpl->setCurrentBlock(
"table_row");
1264 $this->tpl->setVariable(
"CHECKBOX_ID", $child[
"obj_id"]);
1265 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1269 $this->ctrl->setParameter($this,
"backcmd",
"");
1270 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $child[
"obj_id"]);
1271 $this->tpl->setVariable(
"LINK_TARGET",
1272 $this->ctrl->getLinkTargetByClass(
"ilStructureObjectGUI",
"view"));
1275 $this->tpl->setVariable(
"TEXT_CONTENT",
1277 $this->object->isActiveNumbering()));
1279 $this->tpl->parseCurrentBlock();
1282 $paste_active =
false;
1283 if ($ilUser->clipboardHasObjectsOfType(
"st"))
1285 $paste_active =
true;
1288 if($cnt == 0 && !$paste_active)
1290 $this->tpl->setCurrentBlock(
"notfound");
1291 $this->tpl->setVariable(
"NUM_COLS", 3);
1292 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1293 $this->tpl->parseCurrentBlock();
1298 $this->tpl->setVariable(
"NUM_COLS", 3);
1301 $acts = array(
"delete" =>
"delete",
"cutChapter" =>
"cut",
1302 "copyChapter" =>
"copyChapter");
1306 $acts[
"pasteChapter"] =
"pasteChapter";
1312 $this->tpl->setVariable(
"NUM_COLS", 3);
1313 $subobj = array(
"st");
1315 $this->tpl->setCurrentBlock(
"add_object");
1316 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1317 $this->tpl->setVariable(
"BTN_NAME",
"create");
1318 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"insert"));
1319 $this->tpl->parseCurrentBlock();
1321 $this->tpl->setCurrentBlock(
"form");
1322 $this->tpl->parseCurrentBlock();
1324 $this->tpl->setVariable(
"HREF_JS_EDIT",
1325 $ilCtrl->getLinkTarget($this,
"activateJSChapterEditing"));
1326 $this->tpl->setVariable(
"TXT_JS_EDIT",
1327 $lng->txt(
"cont_js_chap_editing"));
1344 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1345 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1346 $ilToolbar->addButton($lng->txt(
"pg_add"),
1347 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create"));
1348 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1350 include_once(
"./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
1352 $tpl->setContent(
$t->getHTML());
1358 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.all_pages.html",
"Modules/LearningModule");
1361 $this->tpl->setCurrentBlock(
"form");
1362 $this->ctrl->setParameter($this,
"backcmd",
"pages");
1363 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1364 $this->tpl->setVariable(
"HEADER_TEXT", $this->lng->txt(
"cont_pages"));
1365 $this->tpl->setVariable(
"CONTEXT", $this->lng->txt(
"cont_usage"));
1370 foreach ($pages as $page)
1372 $this->tpl->setCurrentBlock(
"table_row");
1375 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1378 $lm_set->get(
"time_scheduled_page_activation"));
1381 $img_sc = ($lm_set->get(
"time_scheduled_page_activation") &&
1389 $this->tpl->setVariable(
"IMG_ALT",
1390 $this->lng->txt(
"cont_page_deactivated"));
1395 $this->object->getType()))
1398 $this->tpl->setVariable(
"IMG_ALT",
1399 $this->lng->txt(
"cont_page_deactivated_elements"));
1404 $this->tpl->setVariable(
"IMG_ALT",
1405 $this->lng->txt(
"pg"));
1413 $this->tpl->setVariable(
"CHECKBOX_ID", $page[
"obj_id"]);
1414 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1417 $this->ctrl->setParameter($this,
"backcmd",
"");
1418 $this->ctrl->setParameterByClass(
"ilLMPageObjectGUI",
"obj_id", $page[
"obj_id"]);
1420 $this->tpl->setVariable(
"LINK_TARGET",
1421 $this->ctrl->getLinkTargetByClass(
"ilLMPageObjectGUI",
"edit"));
1424 $this->tpl->setVariable(
"TEXT_CONTENT", $page[
"title"]);
1427 if ($this->lm_tree->isInTree($page[
"obj_id"]))
1438 if ($page[
"obj_id"] == $this->object->getHeaderPage())
1440 $add_str =
" <b>(".$this->lng->txt(
"cont_header").
")</b>";
1442 if ($page[
"obj_id"] == $this->object->getFooterPage())
1444 $add_str =
" <b>(".$this->lng->txt(
"cont_footer").
")</b>";
1447 $this->tpl->setVariable(
"TEXT_CONTEXT", $path_str.$add_str);
1450 $this->tpl->parseCurrentBlock();
1454 $this->tpl->setCurrentBlock(
"notfound");
1455 $this->tpl->setVariable(
"NUM_COLS", 4);
1456 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1457 $this->tpl->parseCurrentBlock();
1461 $acts = array(
"delete" =>
"delete",
"movePage" =>
"movePage",
"copyPage" =>
"copyPage",
1462 "selectHeader" =>
"selectHeader",
"selectFooter" =>
"selectFooter",
1463 "activatePages" =>
"cont_de_activate");
1467 $acts[
"pastePage"] =
"pastePage";
1475 $this->tpl->setVariable(
"NUM_COLS", 4);
1488 $this->tpl->setVariable(
"NUM_COLS", 4);
1490 $subobj = array(
"pg");
1492 $this->tpl->setCurrentBlock(
"add_object");
1493 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1494 $this->tpl->setVariable(
"BTN_NAME",
"create");
1495 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"create"));
1496 $this->tpl->parseCurrentBlock();
1499 $this->tpl->setCurrentBlock(
"form");
1500 $this->tpl->parseCurrentBlock();
1514 include_once(
"./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
1516 $this->object->getId(), $this->
object->getType());
1518 $tpl->setContent($table_gui->getHTML());
1526 global
$tpl, $ilToolbar;
1531 $ilToolbar->addButton($this->lng->txt(
"cont_fix_tree"),
1532 $this->ctrl->getLinkTarget($this,
"fixTreeConfirm"));
1540 if (is_array(
$_POST[
"id"]))
1542 foreach(
$_POST[
"id"] as $id)
1544 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1550 $this->ctrl->redirect($this,
"pages");
1560 $ilUser->writePref(
"lm_js_chapter_editing",
"disable");
1561 $ilCtrl->redirect($this,
"chapters");
1571 $ilUser->writePref(
"lm_js_chapter_editing",
"enable");
1572 $ilCtrl->redirect($this,
"chapters");
1582 $this->ilias->raiseError($this->lng->txt(
"no_page_in_clipboard"),$this->ilias->error_obj->MESSAGE);
1593 == $this->object->getID())
1596 $new_page =& $lm_page->copy();
1597 $id = $new_page->getId();
1603 $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
1605 $copied_nodes = array();
1606 $new_page =& $lm_page->copyToOtherContObject($this->
object, $copied_nodes);
1607 $id = $new_page->getId();
1617 != $this->object->getID())
1620 $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
1622 $lm_page->setLMId($this->object->getID());
1624 $page =& $lm_page->getPageObject();
1626 $page->setParentId($this->object->getID());
1633 $this->ctrl->redirect($this,
"pages");
1645 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1652 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
1654 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_copied"),
true);
1661 $this->ctrl->redirect($this,
"pages");
1671 function delete($a_parent_subobj_id = 0)
1675 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1680 $this->ilias->raiseError($this->lng->txt(
"cont_select_item"), $this->ilias->error_obj->MESSAGE);
1683 if ($a_parent_subobj_id == 0)
1691 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.confirm_deletion.html",
"Modules/LearningModule");
1695 if ($a_parent_subobj_id != 0)
1697 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd",
$_GET[
"backcmd"]);
1698 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1699 $this->tpl->setVariable(
"FORMACTION",
1700 $this->ctrl->getFormActionByClass(
"ilStructureObjectGUI"));
1704 $this->ctrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
1705 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1708 $this->tpl->setCurrentBlock(
"table_header");
1709 $this->tpl->setVariable(
"TEXT",$this->lng->txt(
"objects"));
1710 $this->tpl->parseCurrentBlock();
1717 foreach(
$_POST[
"id"] as $id)
1722 switch($obj->getType())
1731 $this->tpl->setCurrentBlock(
"table_row");
1733 $this->tpl->setVariable(
"TEXT_CONTENT", $obj->getTitle());
1734 $this->tpl->parseCurrentBlock();
1740 $buttons = array(
"cancelDelete" => $this->lng->txt(
"cancel"),
1741 "confirmedDelete" => $this->lng->txt(
"confirm"));
1742 foreach ($buttons as $name => $value)
1744 $this->tpl->setCurrentBlock(
"operation_btn");
1745 $this->tpl->setVariable(
"BTN_NAME",$name);
1746 $this->tpl->setVariable(
"BTN_VALUE",$value);
1747 $this->tpl->parseCurrentBlock();
1756 session_unregister(
"saved_post");
1758 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1772 $tree->setTableNames(
'lm_tree',
'lm_data');
1773 $tree->setTreeTablePK(
"lm_id");
1778 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1782 foreach (
$_SESSION[
"saved_post"] as $id)
1787 $node_data =
$tree->getNodeData($id);
1788 if (is_object($obj))
1790 $obj->setLMId($this->object->getId());
1792 include_once(
"classes/class.ilHistory.php");
1795 $this->
object->getType());
1799 if(
$tree->isInTree($id))
1801 $tree->deleteTree($node_data);
1807 $this->
object->checkTree();
1812 if ($a_parent_subobj_id == 0)
1814 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1830 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1833 for ($i = 1; $i < (count($tmpPath) - 1); $i++)
1840 $path .= $tmpPath[$i][
"title"];
1855 foreach ($a_actions as $name =>
$lng)
1857 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1860 $notoperations = array();
1862 $operations = array();
1868 if (!in_array($row[
"name"], $notoperations))
1870 $operations[] =
$row;
1875 if (count($operations)>0)
1877 foreach ($operations as $val)
1879 $this->tpl->setCurrentBlock(
"operation_btn");
1880 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1881 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
1882 $this->tpl->parseCurrentBlock();
1885 $this->tpl->setCurrentBlock(
"operation");
1887 $this->tpl->parseCurrentBlock();
1898 $this->
setFormAction(
"addRole", $this->ctrl->getLinkTarget($this,
"addRole"));
1899 $this->
setFormAction(
"permSave", $this->ctrl->getLinkTarget($this,
"permSave"));
1900 $this->permObject();
1909 $this->
setReturnLocation(
"permSave", $this->ctrl->getLinkTarget($this,
"perm"));
1910 $this->permSaveObject();
1919 $this->infoObject();
1929 $this->addRoleObject();
1939 $this->ownerObject();
1948 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
1967 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1970 if(count(
$_POST[
"id"]) > 1)
1972 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1977 $this->ilias->raiseError($this->lng->txt(
"cont_select_item"), $this->ilias->error_obj->MESSAGE);
1985 if ($a_parent_subobj_id == 0)
1987 $this->ctrl->redirect($this,
"chapters");
2017 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2020 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
2022 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_cut"),
true);
2033 $this->ctrl->redirect($this,
"pages");
2041 if (
$_GET[
"new_type"] ==
"pg")
2043 $this->ctrl->redirect($this,
"pages");
2047 $this->ctrl->redirect($this,
"chapters");
2057 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2059 $cont_exp->buildExportFile();
2070 $changelink =
"<a href='".$ilCtrl->getLinkTarget($this,
"editMenuProperties").
"'>".$lng->txt(
"change").
"</a>";
2071 if (!$this->object->isActiveLMMenu())
2073 $add =
"<br />".$lng->txt(
"cont_download_no_menu").
" ".$changelink;
2075 else if (!$this->object->isActiveDownloads())
2077 $add =
"<br />".$lng->txt(
"cont_download_no_download").
" ".$changelink;
2081 if ($this->object->getPublicExportFile($a_type) == $a_file)
2083 return $lng->txt(
"yes").$add;
2098 if(!isset($a_files))
2104 foreach ($a_files as $f)
2106 $file = explode(
":", $f);
2107 $export_dir = $this->
object->getExportDirectory(
$file[0]);
2109 if ($this->object->getPublicExportFile(
$file[0]) ==
2112 $this->
object->setPublicExportFile(
$file[0],
"");
2116 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
2119 $this->
object->update();
2121 $ilCtrl->redirectByClass(
"ilexportgui");
2129 if(!isset(
$_POST[
"file"]))
2131 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2134 if (count(
$_POST[
"file"]) > 1)
2136 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2140 $export_dir = $this->
object->getOfflineDirectory();
2157 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.confirm.html");
2159 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2162 $this->tpl->setVariable(
"TXT_CONFIRM", $this->lng->txt(
"confirmation"));
2163 $this->tpl->setVariable(
"TXT_CONTENT", $this->lng->txt(
"cont_fix_tree_confirm"));
2164 $this->tpl->setVariable(
"CMD_CANCEL",
"showMaintenance");
2165 $this->tpl->setVariable(
"CMD_OK",
"fixTree");
2166 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2167 $this->tpl->setVariable(
"TXT_OK", $this->lng->txt(
"cont_fix_tree"));
2187 $this->
object->fixTree();
2189 $this->ctrl->redirect($this,
"showMaintenance");
2196 $a_active =
"content", $a_use_global_tabs =
false, $a_as_subtabs =
false,
2199 global
$ilCtrl,$ilUser, $ilAccess, $ilTabs, $rbacsystem, $ilPluginAdmin;
2204 $addcmd =
"addSubTabTarget";
2205 $getcmd =
"getSubTabHTML";
2209 $addcmd =
"addTarget";
2210 $getcmd =
"getHTML";
2213 $active[$a_active] =
true;
2215 if (!$this->object->isActiveLMMenu())
2220 if ($a_use_global_tabs)
2222 $tabs_gui = $ilTabs;
2232 $showViewInFrameset =
true;
2234 if ($showViewInFrameset && !$a_offline)
2240 $buttonTarget =
"_top";
2243 if ($a_export_format ==
"scorm")
2248 include_once(
"./Services/Payment/classes/class.ilPaymentObject.php");
2252 if (!$a_offline && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2254 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2255 $tabs_gui->$addcmd(
"content",
2256 $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"layout"),
2257 "",
"", $buttonTarget, $active[
"content"]);
2261 if (!$requires_purchase_to_access && $this->object->isActiveTOC() && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2265 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2266 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showTableOfContents");
2270 $link =
"./table_of_contents.html";
2273 $tabs_gui->$addcmd(
"cont_toc", $link,
2274 "",
"", $buttonTarget, $active[
"toc"]);
2278 if (!$requires_purchase_to_access && $this->object->isActivePrintView() && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2282 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2283 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showPrintViewSelection");
2284 $tabs_gui->$addcmd(
"cont_print_view", $link,
2285 "",
"", $buttonTarget, $active[
"print"]);
2290 if (!$requires_purchase_to_access && $ilUser->getId() == ANONYMOUS_USER_ID)
2292 $is_public = $this->
object->isActiveDownloadsPublic();
2294 else if(!$requires_purchase_to_access)
2299 if (!$requires_purchase_to_access && $this->object->isActiveDownloads() && !$a_offline && $is_public &&
2300 $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2302 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2303 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showDownloadList");
2304 $tabs_gui->$addcmd(
"download", $link,
2305 "",
"", $buttonTarget, $active[
"download"]);
2309 if ($a_export_format !=
"scorm" && !$a_offline)
2313 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2314 $link = $this->ctrl->getLinkTargetByClass(
2315 array(
"illmpresentationgui",
"ilinfoscreengui"),
"showSummary");
2319 $link =
"./info.html";
2322 $tabs_gui->$addcmd(($requires_purchase_to_access ?
'buy' :
'info_short'), $link,
2323 "",
"", $buttonTarget, $active[
"info"]);
2327 if (!$a_offline && $a_cur_page > 0)
2329 if ($rbacsystem->checkAccess(
"write", $_GET[
"ref_id"]))
2332 $page_id = $a_cur_page;
2333 $tabs_gui->$addcmd(
"edit_page", ILIAS_HTTP_PATH.
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=".$_GET[
"ref_id"].
2334 "&obj_id=".$page_id.
"&to_page=1",
2335 "",
"", $buttonTarget, $active[
"edit_page"]);
2339 if(!$requires_purchase_to_access)
2343 $entries = $this->lmme_obj->getMenuEntries(
true);
2345 if (count($entries) > 0 && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2347 foreach ($entries as $entry)
2350 if ($entry[
"type"] ==
"intern")
2352 $entry[
"link"] = ILIAS_HTTP_PATH.
"/goto.php?target=".$entry[
"link"];
2356 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:'))
2358 $entry[
"link"] =
"http://".$entry[
"link"];
2361 if (!strstr($entry[
"link"],
'mailto:'))
2365 $tabs_gui->$addcmd($entry[
"title"],
2367 "",
"",
"_blank",
"",
true);
2373 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
2374 $plugin_html =
false;
2375 foreach ($pl_names as $pl)
2378 $gui_class = $ui_plugin->getUIClassInstance();
2379 $resp = $gui_class->modifyGUI(
"Modules/LearningModule",
"lm_menu_tabs",
2380 array(
"lm_menu_tabs" => $tabs_gui));
2384 return $tabs_gui->$getcmd();
2392 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2394 $cont_exp->buildExportFile();
2395 $this->offlineList();
2403 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2405 $cont_exp->buildExportFile();
2415 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2417 $cont_exp->buildExportFile();
2431 $par_id = $tree->getParentId(
$_GET[
"ref_id"]);
2435 if($par_id != ROOT_FOLDER_ID)
2437 $this->ctrl->addLocation(
"...",
2444 if ($parent_title ==
"ILIAS")
2446 $parent_title = $lng->txt(
"repository");
2450 $this->ctrl->addLocation($parent_title,
2451 "repository.php?cmd=frameset&ref_id=".$par_id,
2454 if (!$a_omit_obj_id)
2458 $lmtree =& $this->
object->getTree();
2466 $path = $lmtree->getPathFull($lmtree->getRootId());
2469 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
2478 if (
$row[
"child"] == 1)
2480 $this->ctrl->setParameter($this,
"obj_id",
"");
2481 $this->ctrl->addLocation(
2482 $this->object->getTitle(),
2483 $this->ctrl->getLinkTarget($this,
"chapters"),
"",
$_GET[
"ref_id"]);
2488 switch(
$row[
"type"])
2491 $this->ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id",
$row[
"child"]);
2492 $this->ctrl->addLocation(
2494 $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
2498 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$row[
"child"]);
2499 $this->ctrl->addLocation(
2501 $this->ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
2506 if (!$a_omit_obj_id)
2508 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
2530 include_once(
"./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
2532 $tpl->setContent($table->getHTML());
2549 $this->tpl->setTitle($this->object->getTitle());
2551 $lng->txt(
"obj_lm"));
2567 $ilTabs->addSubtab(
"chapters",
2568 $lng->txt(
"cont_chapters"),
2569 $ilCtrl->getLinkTarget($this,
"chapters"));
2572 $ilTabs->addSubtab(
"pages",
2573 $lng->txt(
"cont_all_pages"),
2574 $ilCtrl->getLinkTarget($this,
"pages"));
2577 $ilTabs->addSubtab(
"questions",
2578 $lng->txt(
"objs_qst"),
2579 $ilCtrl->getLinkTarget($this,
"listQuestions"));
2582 if ($lm_set->get(
"html_export_ids"))
2584 $ilTabs->addSubtab(
"export_ids",
2585 $lng->txt(
"cont_html_export_ids"),
2586 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview"));
2590 $ilTabs->addSubtab(
"internal_links",
2591 $lng->txt(
"cont_internal_links"),
2592 $ilCtrl->getLinkTarget($this,
"listLinks"));
2595 if ($this->object->getType() ==
"lm")
2597 if(@include_once(
'HTTP/Request.php'))
2599 $ilTabs->addSubtab(
"link_check",
2600 $lng->txt(
"link_check"),
2601 $ilCtrl->getLinkTarget($this,
"linkChecker"));
2606 $ilTabs->addSubtab(
"maintenance",
2607 $lng->txt(
"cont_maintenance"),
2608 $ilCtrl->getLinkTarget($this,
"showMaintenance"));
2610 $ilTabs->activateSubTab($a_active);
2611 $ilTabs->activateTab(
"content");
2619 global $rbacsystem, $ilUser, $ilTabs,
$lng;
2621 $tabs_gui = $ilTabs;
2624 $ilTabs->addTab(
"content",
2625 $lng->txt(
"content"),
2626 $this->ctrl->getLinkTarget($this,
"chapters"));
2629 $ilTabs->addTab(
"info",
2630 $lng->txt(
"info_short"),
2631 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary'));
2634 $ilTabs->addTab(
"settings",
2635 $lng->txt(
"settings"),
2636 $this->ctrl->getLinkTarget($this,
'properties'));
2639 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2642 $ilTabs->addTab(
'learning_progress',
2643 $lng->txt(
"learning_progress"),
2644 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
''));
2647 if ($this->object->getType() !=
"lm")
2650 $ilTabs->addTab(
"bib_data",
2651 $lng->txt(
"bib_data"),
2652 $this->ctrl->getLinkTarget($this,
"editBibItem"));
2656 $ilTabs->addTab(
"history",
2657 $lng->txt(
"history"),
2658 $this->ctrl->getLinkTarget($this,
"history"));
2661 $ilTabs->addTab(
"meta",
2662 $lng->txt(
"meta_data"),
2663 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''));
2665 if ($this->object->getType() ==
"lm")
2668 $ilTabs->addTab(
"export",
2669 $lng->txt(
"export"),
2670 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
2674 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
2676 $ilTabs->addTab(
"perm",
2677 $lng->txt(
"perm_settings"),
2678 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
2683 $ilTabs->activateTab($a_act);
2687 $ilTabs->addNonTabbedLink(
"pres_mode", $lng->txt(
"cont_presentation_view"),
2688 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->object->getRefID(),
"_top");
2698 if (in_array($a_active,
2699 array(
"cont_general_properties",
"cont_style",
"cont_lm_menu",
"public_section")))
2702 $ilTabs->addSubTabTarget(
"cont_general_properties",
2703 $this->ctrl->getLinkTarget($this,
'properties'),
2707 $ilTabs->addSubTabTarget(
"cont_style",
2708 $this->ctrl->getLinkTarget($this,
'editStyleProperties'),
2712 $ilTabs->addSubTabTarget(
"cont_lm_menu",
2713 $this->ctrl->getLinkTarget($this,
'editMenuProperties'),
2716 if ($ilSetting->get(
"pub_section"))
2718 if ($this->object->getType() !=
"dbk")
2721 $ilTabs->addSubTabTarget(
"public_section",
2722 $this->ctrl->getLinkTarget($this,
'editPublicSection'),
2727 $ilTabs->setSubTabActive($a_active);
2737 $ilTabs->setTabActive(
"settings");
2739 switch ($this->object->getType())
2742 $gui_class =
"ilobjlearningmodulegui";
2746 $gui_class =
"ilobjdlbookgui";
2753 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_public_selector.html");
2756 require_once (
"./Modules/LearningModule/classes/class.ilPublicSectionSelector.php");
2764 $output = $exp->getOutput();
2767 foreach ($exp->format_options as $node)
2769 if (!$node[
"container"])
2771 $pages[] = $node[
"child"];
2780 $this->tpl->setVariable(
"TXT_SET_PUBLIC_MODE", $this->lng->txt(
"set_public_mode"));
2781 $this->tpl->setVariable(
"TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt(
"choose_public_mode"));
2782 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
2783 $select_public_mode =
ilUtil::formSelect ($this->object->getPublicAccessMode(),
"lm_public_mode",$modes,
false,
true);
2784 $this->tpl->setVariable(
"SELECT_PUBLIC_MODE", $select_public_mode);
2786 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"choose_public_pages"));
2787 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
2788 $this->tpl->setVariable(
"EXPLORER",$output);
2789 $this->tpl->setVariable(
"ONCLICK",$js_pages);
2790 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
2791 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
2792 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2793 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
2801 $this->
object->setPublicAccessMode(
$_POST[
"lm_public_mode"]);
2802 $this->
object->updateProperties();
2805 $this->ctrl->redirect($this,
"editPublicSection");
2817 require_once(
"classes/class.ilHistoryGUI.php");
2819 $this->
object->getType());
2821 $this->ctrl->getParameterArray($this,
"history"),
2822 $this->
object->isActiveHistoryUserComments()
2825 $this->tpl->setVariable(
"ADM_CONTENT", $hist_html);
2840 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
2842 $actions->setSelectionHeaderClass(
'small');
2843 $actions->setItemLinkClass(
'xsmall');
2844 $actions->setListTitle($this->lng->txt(
'actions'));
2846 $this->ctrl->setParameterByClass(
'ilLMPageObjectGUI',
'obj_id', $row[
'page_id']);
2848 $this->lng->txt(
'edit'),
2850 $this->ctrl->getLinkTargetByClass(
'ilLMPageObjectGUI',
'edit')
2852 $this->ctrl->clearParametersByClass(
'ilLMPageObjectGUI');
2853 $row[
'action_html'] =
$actions->getHTML();
2867 require_once
'Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
2872 if((
bool)$ilias->getSetting(
'cron_link_check'))
2874 include_once
'classes/class.ilLinkCheckNotify.php';
2875 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2877 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
2880 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
2882 $toolbar->addInputItem($chb);
2883 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
2884 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
2888 $tgui->setLinkChecker($this->link_checker_obj)
2889 ->setRowHandler($this)
2890 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
2892 return $tpl->setContent($tgui->prepareHTML()->getHTML().$toolbar->getHTML());
2897 global
$ilDB,$ilUser;
2899 include_once
'./classes/class.ilLinkCheckNotify.php';
2902 $link_check_notify->setUserId($ilUser->getId());
2903 $link_check_notify->setObjId($this->object->getId());
2905 if(
$_POST[
'link_check_message'])
2908 $link_check_notify->addNotifier();
2913 $link_check_notify->deleteNotifier();
2926 if(!$this->link_checker_obj->checkPear())
2934 $this->link_checker_obj->checkLinks();
2946 include_once
'./classes/class.ilLinkChecker.php';
2949 $this->link_checker_obj->setObjId($this->object->getId());
2956 include_once
'./Modules/LearningModule/classes/class.ilLMMenuEditor.php';
2959 $this->lmme_obj->setObjId($this->object->getId());
2971 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_menu_entry_form.html",
"Modules/LearningModule");
2973 if (isset(
$_GET[
"link_ref_id"]))
2979 $target_link = $obj_type.
"_".
$_GET[
"link_ref_id"];
2980 $this->tpl->setVariable(
"TITLE",
$title);
2981 $this->tpl->setVariable(
"TARGET", $target_link);
2982 $this->tpl->setVariable(
"LINK_REF_ID",
$_GET[
"link_ref_id"]);
2986 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"saveMenuEntry"));
2987 $this->tpl->setVariable(
"TXT_NEW_ENTRY", $this->lng->txt(
"lm_menu_new_entry"));
2988 $this->tpl->setVariable(
"TXT_TARGET", $this->lng->txt(
"lm_menu_entry_target"));
2989 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"lm_menu_entry_title"));
2990 $this->tpl->setVariable(
"BTN_NAME",
"saveMenuEntry");
2991 $this->tpl->setVariable(
"BTN_TEXT", $this->lng->txt(
"save"));
2992 $this->tpl->setVariable(
"BTN_NAME2",
"showEntrySelector");
2993 $this->tpl->setVariable(
"BTN_TEXT2", $this->lng->txt(
"lm_menu_select_internal_object"));
3006 if (empty(
$_POST[
"title"]))
3010 $ilCtrl->redirect($this,
"addMenuEntry");
3012 if (empty(
$_POST[
"target"]))
3016 $ilCtrl->redirect($this,
"addMenuEntry");
3020 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3021 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3022 $this->lmme_obj->setLinkRefId(
$_POST[
"link_ref_id"]);
3024 if (
$_POST[
"link_ref_id"])
3026 $this->lmme_obj->setLinkType(
"intern");
3029 $this->lmme_obj->create();
3032 $this->ctrl->redirect($this,
"editMenuProperties");
3040 if (empty(
$_GET[
"menu_entry"]))
3042 $this->ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3046 $this->lmme_obj->delete(
$_GET[
"menu_entry"]);
3049 $this->ctrl->redirect($this,
"editMenuProperties");
3057 if (empty(
$_GET[
"menu_entry"]))
3059 $this->ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3063 $this->lmme_obj->readEntry(
$_GET[
"menu_entry"]);
3067 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_menu_entry_form.html",
"Modules/LearningModule");
3069 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
3070 $this->tpl->setVariable(
"TXT_NEW_ENTRY", $this->lng->txt(
"lm_menu_edit_entry"));
3071 $this->tpl->setVariable(
"TXT_TARGET", $this->lng->txt(
"lm_menu_entry_target"));
3072 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"lm_menu_entry_title"));
3073 $this->tpl->setVariable(
"TITLE", $this->lmme_obj->getTitle());
3074 $this->tpl->setVariable(
"TARGET", $this->lmme_obj->getTarget());
3075 $this->tpl->setVariable(
"ENTRY_ID", $this->lmme_obj->getEntryId());
3076 $this->tpl->setVariable(
"BTN_NAME",
"updateMenuEntry");
3077 $this->tpl->setVariable(
"BTN_TEXT", $this->lng->txt(
"save"));
3078 $this->tpl->setVariable(
"BTN_NAME2",
"showEntrySelector");
3079 $this->tpl->setVariable(
"BTN_TEXT2", $this->lng->txt(
"lm_menu_select_internal_object"));
3088 if (empty(
$_POST[
"menu_entry"]))
3090 $this->ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3094 if (empty(
$_POST[
"title"]))
3096 $this->ilias->raiseError($this->lng->txt(
"please_enter_title"),$this->ilias->error_obj->MESSAGE);
3098 if (empty(
$_POST[
"target"]))
3100 $this->ilias->raiseError($this->lng->txt(
"please_enter_target"),$this->ilias->error_obj->MESSAGE);
3104 $this->lmme_obj->readEntry(
$_POST[
"menu_entry"]);
3105 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3106 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3107 $this->lmme_obj->update();
3110 $this->ctrl->redirect($this,
"editMenuProperties");
3117 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_menu_object_selector.html",
"Modules/LearningModule");
3121 require_once (
"./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
3124 $exp->
setExpand(
$_GET[
"lm_menu_expand"] ?
$_GET[
"lm_menu_expand"] : $this->tree->readRootId());
3125 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showEntrySelector'));
3126 $exp->setTargetGet(
"ref_id");
3127 $exp->setRefId($this->cur_ref_id);
3129 $sel_types = array(
'mcst',
'mep',
'cat',
'lm',
'dbk',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
3130 "crs",
"grp",
"book",
"tst",
"file");
3131 $exp->setSelectableTypes($sel_types);
3137 $output = $exp->getOutput();
3140 foreach ($exp->format_options as $node)
3142 if (!$node[
"container"])
3144 $pages[] = $node[
"child"];
3151 $this->tpl->setVariable(
"TXT_SET_PUBLIC_MODE", $this->lng->txt(
"set_public_mode"));
3152 $this->tpl->setVariable(
"TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt(
"choose_public_mode"));
3153 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
3154 $select_public_mode =
ilUtil::formSelect ($this->object->getPublicAccessMode(),
"lm_public_mode",$modes,
false,
true);
3155 $this->tpl->setVariable(
"SELECT_PUBLIC_MODE", $select_public_mode);
3157 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"choose_public_pages"));
3158 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
3159 $this->tpl->setVariable(
"EXPLORER",$output);
3160 $this->tpl->setVariable(
"ONCLICK",$js_pages);
3161 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
3162 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
3163 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
3164 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
3175 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
3177 if(count(
$_POST[
"id"]) > 1)
3179 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
3181 if (
$_POST[
"id"][0] != $this->object->getHeaderPage())
3183 $this->
object->setHeaderPage(
$_POST[
"id"][0]);
3187 $this->
object->setHeaderPage(0);
3189 $this->
object->updateProperties();
3190 $this->ctrl->redirect($this,
"pages");
3200 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
3202 if(count(
$_POST[
"id"]) > 1)
3204 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
3206 if (
$_POST[
"id"][0] != $this->object->getFooterPage())
3208 $this->
object->setFooterPage(
$_POST[
"id"][0]);
3212 $this->
object->setFooterPage(0);
3214 $this->
object->updateProperties();
3215 $this->ctrl->redirect($this,
"pages");
3227 $ilCtrl->redirect($this,
"chapters");
3237 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3244 $parent_id = $this->lm_tree->getParentId($node_id);
3249 $parent_id = $node_id;
3253 for ($i = 1; $i <= $num; $i++)
3256 $chap->setType(
"st");
3257 $chap->setTitle($lng->txt(
"cont_new_chap"));
3258 $chap->setLMId($this->object->getId());
3263 $ilCtrl->redirect($this,
"chapters");
3273 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3275 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
3285 $node_id = $this->lm_tree->getRootId();
3286 $first_child =
true;
3290 $node_id =
$_POST[
"id"][0];
3291 $first_child =
false;
3295 $ilLog->write(
"InsertChapterClip, num: $num, node_id: $node_id, ".
3300 $parent_id = $this->lm_tree->getParentId($node_id);
3305 $parent_id = $node_id;
3310 $chapters = $ilUser->getClipboardObjects(
"st",
true);
3311 $copied_nodes = array();
3312 foreach ($chapters as $chap)
3314 $ilLog->write(
"Call pasteTree, Target LM: ".$this->object->getId().
", Chapter ID: ".$chap[
"id"]
3315 .
", Parent ID: ".$parent_id.
", Target: ".$target);
3317 $target, $chap[
"insert_time"], $copied_nodes,
3325 $ilUser->clipboardDeleteObjectsOfType(
"pg");
3326 $ilUser->clipboardDeleteObjectsOfType(
"st");
3330 $this->
object->checkTree();
3331 $ilCtrl->redirect($this,
"chapters");
3343 if ($ilAccess->checkAccess(
"read",
"", $a_target))
3345 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3346 $_GET[
"ref_id"] = $a_target;
3347 include(
"ilias.php");
3349 }
else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
3351 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3352 $_GET[
"ref_id"] = $a_target;
3353 $_GET[
"cmd"] =
"infoScreen";
3354 include(
"ilias.php");
3357 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
3359 $_GET[
"cmd"] =
"frameset";
3360 $_GET[
"target"] =
"";
3361 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
3364 include(
"repository.php");
3369 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
3380 if (!is_array($items))
3383 $ilCtrl->redirect($this, $a_return);
3387 foreach($items as $k => $item)
3394 foreach($todel as $k)
3402 $ilCtrl->redirect($this, $a_return);
3413 if (!is_array($items))
3416 $ilCtrl->redirect($this,
"chapters");
3420 foreach($items as $k => $item)
3427 foreach($todel as $k)
3434 $ilCtrl->redirect($this,
"chapters");
3462 include_once(
"./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
3465 $tpl->setContent($tbl->getHTML());
3477 if (is_array(
$_POST[
"exportid"]))
3479 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id)
3481 if ($exp_id !=
"" && !preg_match(
"/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
3491 $lng->txt(
"cont_exp_ids_not_resp_format3").
" ".
3492 $lng->txt(
"cont_exp_ids_not_resp_format2"));
3498 if (is_array(
$_POST[
"exportid"]))
3500 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id)
3508 $ilCtrl->redirect($this,
"showExportIdsOverview");
3527 if ($a_def_option !=
"")
3534 "<table><tr><td>".$im_tag.
"</td><td><b>".$lng->txt(
"cont_lm_default_layout").
3535 "</b>: ".$lng->txt(
"cont_layout_".$a_def_option).
"</td></tr></table>";
3544 $option[$l] =
"<table><tr><td>".$im_tag.
"</td><td><b>".$lng->txt(
"cont_layout_".$l).
"</b>: ".$lng->txt(
"cont_layout_".$l.
"_desc").
"</td></tr></table>";
3546 $layout->setOptions($option);
3557 $ilCtrl->setParameter($this,
"hierarchy",
"1");
3569 if (!is_array(
$_POST[
"id"]))
3573 if ($a_in_hierarchy)
3575 $ilCtrl->redirect($this,
"chapters");
3579 $ilCtrl->redirect($this,
"pages");
3585 $tpl->setContent($this->form->getHTML());
3595 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3598 if (is_array(
$_POST[
"id"]))
3600 foreach (
$_POST[
"id"] as $id)
3604 $this->form->addItem($hi);
3608 $this->
object->getLayout());
3609 $this->form->addItem($layout);
3611 $this->form->addCommandButton(
"savePageLayout", $lng->txt(
"save"));
3612 $this->form->addCommandButton(
"pages", $lng->txt(
"cancel"));
3614 $this->form->setTitle($lng->txt(
"cont_set_layout"));
3615 $this->form->setFormAction($ilCtrl->getFormAction($this));
3626 $ilCtrl->setParameter($this,
"hierarchy",
$_GET[
"hierarchy"]);
3628 foreach (
$_POST[
"id"] as $id)
3636 if (
$_GET[
"hierarchy"] == 1)
3638 $ilCtrl->redirect($this,
"chapters");
3642 $ilCtrl->redirect($this,
"pages");