4 include_once
"./Services/Object/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);
78 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
80 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
85 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
87 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
88 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
90 $this->ctrl->forwardCommand($md_gui);
93 case "ilobjstylesheetgui":
95 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
96 $this->ctrl->setReturn($this,
"editStyleProperties");
97 $style_gui =&
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
99 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
101 $style_gui->setCreationMode(
true);
103 $ret =& $this->ctrl->forwardCommand($style_gui);
106 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
109 $this->
object->setStyleSheetId($style_id);
110 $this->
object->update();
111 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
115 case "illmpageobjectgui":
117 $ilTabs->setBackTarget($lng->txt(
"learning module"),
118 $ilCtrl->getLinkTarget($this,
"chapters"));
119 $this->ctrl->saveParameter($this, array(
"obj_id"));
121 $this->ctrl->setReturn($this,
"chapters");
126 if (
$_GET[
"obj_id"] !=
"")
129 $pg_gui->setLMPageObject($obj);
132 $ret =& $this->ctrl->forwardCommand($pg_gui);
133 if (
$cmd ==
"save" ||
$cmd ==
"cancel")
139 case "ilstructureobjectgui":
140 $ilTabs->setBackTarget($lng->txt(
"learning module"),
141 $ilCtrl->getLinkTarget($this,
"chapters"));
143 $this->ctrl->saveParameter($this, array(
"obj_id"));
145 $this->ctrl->setReturn($this,
"chapters");
147 if (
$_GET[
"obj_id"] !=
"")
150 $st_gui->setStructureObject($obj);
153 $ret =& $this->ctrl->forwardCommand($st_gui);
154 if (
$cmd ==
"save" ||
$cmd ==
"cancel")
156 if (
$_GET[
"obj_id"] ==
"")
158 $this->ctrl->redirect($this,
"chapters");
162 $this->ctrl->setCmd(
"subchap");
168 case 'ilpermissiongui':
169 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
179 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
181 $ret =& $this->ctrl->forwardCommand($perm_gui);
185 case 'ilinfoscreengui':
189 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
191 $info->enablePrivateNotes();
192 $info->enableLearningProgress();
195 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
197 $info->enableNewsEditing();
198 $info->setBlockProperty(
"news",
"settings",
true);
202 $info->addMetaDataSections($this->object->getId(), 0,
203 $this->
object->getType());
205 $ret =& $this->ctrl->forwardCommand($info);
212 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
214 $exp_gui->addFormat(
"xml",
"", $this,
"export");
215 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
216 $exp_gui->addFormat(
"scorm",
"", $this,
"exportSCORM");
217 $exp_gui->addCustomColumn($lng->txt(
"cont_public_access"),
218 $this,
"getPublicAccessColValue");
219 $exp_gui->addCustomMultiCommand($lng->txt(
"cont_public_access"),
220 $this,
"publishExportFile");
221 $ret = $this->ctrl->forwardCommand($exp_gui);
224 case "ilcommonactiondispatchergui":
225 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
227 $this->ctrl->forwardCommand($gui);
231 $new_type =
$_POST[
"new_type"]
236 if (
$cmd ==
"create" &&
237 !in_array($new_type, array(
"dbk",
"lm")))
244 $this->ctrl->setCmdClass(
"ilLMPageObjectGUI");
250 $this->ctrl->setCmdClass(
"ilStructureObjectGUI");
259 in_array($new_type, array(
"dbk",
"lm")))
283 return array(
"ilLMPageObjectGUI",
"ilStructureObjectGUI",
"ilObjStyleSheetGUI");
293 $lng->loadLanguageModule(
"style");
298 $showViewInFrameset =
true;
300 if ($showViewInFrameset)
306 $buttonTarget =
"ilContObj".$this->object->getID();
313 if($this->object->getType() ==
"lm")
316 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
318 $ecs->addSettingsToForm($this->form,
'lm');
321 $this->tpl->setContent($this->form->getHTML());
331 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
340 $this->form->addItem($ti);
347 $this->form->addItem($ta);
351 $this->form->addItem($online);
355 $this->form->addItem($layout);
358 $page_header =
new ilSelectInputGUI($lng->txt(
"cont_page_header"),
"lm_pg_header");
359 $option = array (
"st_title" => $this->lng->txt(
"cont_st_title"),
360 "pg_title" => $this->lng->txt(
"cont_pg_title"),
361 "none" => $this->lng->txt(
"cont_none"));
363 $this->form->addItem($page_header);
367 $this->form->addItem($chap_num);
371 $option = array (
"chapters" => $this->lng->txt(
"cont_chapters_only"),
372 "pages" => $this->lng->txt(
"cont_chapters_and_pages"));
374 $this->form->addItem($toc_mode);
377 if (!$this->ilias->getSetting(
'disable_comments'))
379 $this->lng->loadLanguageModule(
"notes");
381 $pub_nodes->
setInfo($this->lng->txt(
"cont_lm_comments_desc"));
382 $this->form->addItem($pub_nodes);
387 $lpp->
setInfo($this->lng->txt(
"cont_layout_per_page_info"));
388 $this->form->addItem($lpp);
391 $synch =
new ilCheckboxInputGUI($lng->txt(
"cont_synchronize_frames"),
"cobj_clean_frames");
392 $synch->
setInfo($this->lng->txt(
"cont_synchronize_frames_desc"));
393 $this->form->addItem($synch);
396 $com =
new ilCheckboxInputGUI($lng->txt(
"enable_hist_user_comments"),
"cobj_user_comments");
397 $com->
setInfo($this->lng->txt(
"enable_hist_user_comments_desc"));
398 $this->form->addItem($com);
400 $this->form->setTitle($lng->txt(
"cont_general_properties"));
401 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
402 $this->form->setFormAction($ilCtrl->getFormAction($this));
411 $values[
"title"] = $this->
object->getTitle();
412 $values[
"description"] = $this->
object->getDescription();
413 if ($this->object->getOnline())
415 $values[
"cobj_online"] =
true;
417 $values[
"lm_layout"] = $this->
object->getLayout();
418 $values[
"lm_pg_header"] = $this->
object->getPageHeader();
419 if ($this->object->isActiveNumbering())
421 $values[
"cobj_act_number"] =
true;
423 $values[
"toc_mode"] = $this->
object->getTOCMode();
424 if ($this->object->publicNotes())
426 $values[
"cobj_pub_notes"] =
true;
428 if ($this->object->cleanFrames())
430 $values[
"cobj_clean_frames"] =
true;
432 if ($this->object->isActiveHistoryUserComments())
434 $values[
"cobj_user_comments"] =
true;
436 $values[
"layout_per_page"] = $this->
object->getLayoutPerPage();
438 $this->form->setValuesByArray($values);
448 if ($this->form->checkInput())
450 $this->
object->setTitle(
$_POST[
'title']);
451 $this->
object->setDescription(
$_POST[
'description']);
452 $this->
object->setLayout(
$_POST[
"lm_layout"]);
453 $this->
object->setPageHeader(
$_POST[
"lm_pg_header"]);
454 $this->
object->setTOCMode(
$_POST[
"toc_mode"]);
455 $this->
object->setOnline(
$_POST[
"cobj_online"]);
456 $this->
object->setActiveNumbering(
$_POST[
"cobj_act_number"]);
457 $this->
object->setCleanFrames(
$_POST[
"cobj_clean_frames"]);
458 if (!$this->ilias->getSetting(
'disable_comments'))
460 $this->
object->setPublicNotes(
$_POST[
"cobj_pub_notes"]);
462 $this->
object->setHistoryUserComments(
$_POST[
"cobj_user_comments"]);
463 $this->
object->setLayoutPerPage(
$_POST[
"layout_per_page"]);
464 $this->
object->updateProperties();
465 $this->
object->update();
467 if($this->object->getType() ==
'lm')
470 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
472 if($ecs->handleSettingsUpdate())
486 $this->ctrl->redirect($this,
"properties");
490 $this->form->setValuesByPost();
491 $tpl->setContent($this->form->getHTML());
503 $tpl->setContent($this->form->getHTML());
513 $lng->loadLanguageModule(
"style");
515 $ilTabs->setTabActive(
"settings");
518 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
521 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
522 $style_id = $this->
object->getStyleSheetId();
524 if ($fixed_style > 0)
528 $this->lng->txt(
"global_fixed").
")");
529 $this->form->addItem($st);
536 $st_styles[0] = $this->lng->txt(
"default");
546 $this->form->addItem($st);
551 $this->form->addCommandButton(
"editStyle",
552 $lng->txt(
"cont_edit_style"));
553 $this->form->addCommandButton(
"deleteStyle",
554 $lng->txt(
"cont_delete_style"));
562 $st_styles,
false,
true);
563 $style_sel =
new ilSelectInputGUI($lng->txt(
"cont_current_style"),
"style_id");
565 $style_sel->setValue($style_id);
566 $this->form->addItem($style_sel);
568 $this->form->addCommandButton(
"saveStyleSettings",
570 $this->form->addCommandButton(
"createStyle",
571 $lng->txt(
"sty_create_ind_style"));
574 $this->form->setTitle($lng->txt(
"cont_style"));
575 $this->form->setFormAction($ilCtrl->getFormAction($this));
585 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
595 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
605 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
615 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
617 || $this->object->getStyleSheetId() == 0))
620 $this->
object->update();
623 $this->ctrl->redirect($this,
"editStyleProperties");
633 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
638 $menu->
setChecked($this->object->isActiveLMMenu());
639 $form->addItem($menu);
643 $toc->
setChecked($this->object->isActiveTOC());
644 $form->addItem($toc);
647 $print =
new ilCheckboxInputGUI($this->lng->txt(
"cont_print_view"),
"cobj_act_print");
648 $print->
setChecked($this->object->isActivePrintView());
649 $form->addItem($print);
652 $glo =
new ilCheckboxInputGUI($this->lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
653 $glo->
setChecked($this->object->isActivePreventGlossaryAppendix());
654 $print->addSubItem($glo);
657 $no_download_file_available =
658 " ".$lng->txt(
"cont_no_download_file_available").
659 " <a href='".$ilCtrl->getLinkTargetByClass(
"ilexportgui",
"").
"'>".$lng->txt(
"change").
"</a>";
660 $types = array(
"xml",
"html",
"scorm");
661 foreach($types as $type)
663 if ($this->object->getPublicExportFile($type) !=
"")
665 if (is_file($this->object->getExportDirectory($type).
"/".
666 $this->
object->getPublicExportFile($type)))
668 $no_download_file_available =
"";
672 $dl =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"cobj_act_downloads");
673 $dl->
setInfo($this->lng->txt(
"cont_downloads_desc").$no_download_file_available);
674 $dl->setChecked($this->object->isActiveDownloads());
678 $pdl =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads_public_desc"),
"cobj_act_downloads_public");
679 $pdl->
setChecked($this->object->isActiveDownloadsPublic());
680 $dl->addSubItem($pdl);
682 $form->addCommandButton(
"saveMenuProperties", $lng->txt(
"save"));
684 $form->setTitle($lng->txt(
"cont_lm_menu"));
685 $form->setFormAction($ilCtrl->getFormAction($this));
697 $lng->loadLanguageModule(
"style");
699 $ilTabs->setTabActive(
"settings");
702 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
703 $ilToolbar->addFormButton($this->lng->txt(
"add_menu_entry"),
"addMenuEntry");
704 $ilToolbar->setCloseFormTag(
false);
707 $form->setOpenTag(
false);
708 $form->setCloseTag(
false);
711 $entries = $this->lmme_obj->getMenuEntries();
712 include_once(
"./Modules/LearningModule/classes/class.ilLMMenuItemsTableGUI.php");
714 $table->setOpenFormTag(
false);
716 $tpl->setContent($form->getHTML().
"<br />".$table->getHTML());
726 $this->
object->setActiveLMMenu((
int)
$_POST[
"cobj_act_lm_menu"]);
727 $this->
object->setActiveTOC((
int) $_POST[
"cobj_act_toc"]);
728 $this->
object->setActivePrintView((
int) $_POST[
"cobj_act_print"]);
729 $this->
object->setActivePreventGlossaryAppendix((
int) $_POST[
"cobj_act_print_prev_glo"]);
730 $this->
object->setActiveDownloads((
int) $_POST[
"cobj_act_downloads"]);
731 $this->
object->setActiveDownloadsPublic((
int) $_POST[
"cobj_act_downloads_public"]);
732 $this->
object->updateProperties();
736 $this->lmme_obj->updateActiveStatus($_POST[
"menu_entries"]);
739 $this->ctrl->redirect($this,
"editMenuProperties");
749 switch ($this->object->getType())
752 $gui_class =
"ilobjlearningmodulegui";
756 $gui_class =
"ilobjdlbookgui";
760 $ilCtrl->setParameterByClass($gui_class,
"active_node",
$_GET[
"active_node"]);
762 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
769 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
772 require_once (
"./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
777 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"explorer"));
779 if (
$_GET[
"lmmovecopy"] ==
"1")
785 if (
$_GET[
"lmexpand"] ==
"")
787 $mtree =
new ilTree($this->object->getId());
789 $mtree->setTreeTablePK(
"lm_id");
790 $expanded = $mtree->readRootId();
794 $expanded =
$_GET[
"lmexpand"];
796 if (
$_GET[
"active_node"] !=
"")
798 $path = $this->lm_tree->getPathId(
$_GET[
"active_node"]);
799 $exp->setForceOpenPath(
$path);
801 $exp->highlightNode(
$_GET[
"active_node"]);
803 $exp->setExpand($expanded);
807 $output = $exp->getOutput();
810 if ($ilCtrl->isAsynch())
815 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
834 $this->tpl->setCurrentBlock(
"content");
835 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_chap_and_pages"));
836 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
837 $this->tpl->setVariable(
"EXPLORER",$output);
838 $this->ctrl->setParameter($this,
"lmexpand",
$_GET[
"lmexpand"]);
839 $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this,
"explorer"));
840 $this->tpl->parseCurrentBlock();
841 $this->tpl->show(
false);
850 include_once
"./Services/COPage/classes/class.ilWysiwygUtil.php";
852 $popup->show(
$_GET[
"ptype"]);
863 $this->
object->executeDragDrop(
$_POST[
"il_hform_source_id"],
$_POST[
"il_hform_target_id"],
865 $ilCtrl->redirect($this,
"chapters");
870 $forms = array(self::CFORM_NEW => $this->
initCreateForm($a_new_type),
880 $a_new_object->setCleanFrames(
true);
884 $a_new_object->createLMTree();
887 $a_new_object->addFirstChapterAndPage();
892 "&baseClass=ilLMEditorGUI");
902 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
906 $this->ctrl->setParameter($this,
"new_type", $new_type);
909 $form->setTableWidth(
"600px");
914 $fi->setRequired(
true);
920 $cb->
setInfo($this->lng->txt(
""));
923 $form->addCommandButton(
"importFile", $lng->txt(
"import"));
924 $form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
926 $form->setTitle($this->lng->txt(
"import_".$new_type));
927 $form->setFormAction($ilCtrl->getFormAction($this));
937 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
939 $bib_gui->setObject($this->
object);
940 $bibItemName =
$_POST[
"bibItemName"] ?
$_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
941 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
942 if ($bibItemIndex ==
"")
944 $bibItemPath =
$_POST[
"bibItemPath"] ?
$_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
945 if ($bibItemName !=
"")
947 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
948 $data = $bib_gui->bib_obj->getElement(
"BibItem");
949 $bibItemIndex = (count(
$data) - 1);
957 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
960 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
981 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
983 $bib_gui->setObject($this->
object);
984 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
985 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
986 if (strpos($bibItemIndex,
",") > 0)
988 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
992 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
995 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1017 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1019 $bib_gui->setObject($this->
object);
1020 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1022 if ($bibItemIndex < 0)
1026 if ($a_target ==
"")
1028 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1031 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1052 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1054 $bib_gui->setObject($this->
object);
1055 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1057 if ($bibItemIndex < 0)
1061 $bibItemIndex = $bib_gui->save($bibItemIndex);
1063 if ($a_target ==
"")
1065 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1068 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1114 global $_FILES, $rbacsystem, $ilDB,
$tpl;
1116 include_once
"./Modules/LearningModule/classes/class.ilObjLearningModule.php";
1118 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
$_GET[
"new_type"]))
1120 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
1125 if ($form->checkInput())
1128 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
1130 $newObj->setType(
$_GET[
"new_type"]);
1131 $newObj->setTitle($_FILES[
"xmldoc"][
"name"]);
1132 $newObj->setDescription(
"");
1133 $newObj->create(
true);
1134 $newObj->createReference();
1135 $newObj->putInTree(
$_GET[
"ref_id"]);
1136 $newObj->setPermissions(
$_GET[
"ref_id"]);
1137 $newObj->notify(
"new",
$_GET[
"ref_id"],
$_GET[
"parent_non_rbac_id"],
$_GET[
"ref_id"],$newObj->getRefId());
1140 $newObj->createLMTree();
1143 $mess = $newObj->importFromZipFile($_FILES[
"xmldoc"][
"tmp_name"], $_FILES[
"xmldoc"][
"name"],
1150 "&baseClass=ilLMEditorGUI");
1154 $link =
'<a href="'.
"ilias.php?ref_id=".$newObj->getRefId().
1155 "&baseClass=ilLMEditorGUI".
'" target="_top">'.$this->lng->txt(
"btn_next").
'</a>';
1156 $tpl->setContent(
"<br />".$link.
"<br /><br />".$mess.$link);
1161 $form->setValuesByPost();
1162 $tpl->setContent($form->getHtml());
1176 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
1178 $ilCtrl->setParameter($this,
"backcmd",
"chapters");
1180 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
1183 $form_gui->setTitle($this->object->getTitle());
1185 $form_gui->setTree($this->lm_tree);
1186 $form_gui->setMaxDepth(0);
1187 $form_gui->setCurrentTopNodeId($this->tree->getRootId());
1188 $form_gui->addMultiCommand($lng->txt(
"delete"),
"delete");
1189 $form_gui->addMultiCommand($lng->txt(
"cut"),
"cutItems");
1190 $form_gui->addMultiCommand($lng->txt(
"copy"),
"copyItems");
1191 if ($this->object->getLayoutPerPage())
1193 $form_gui->addMultiCommand($lng->txt(
"cont_set_layout"),
"setPageLayoutInHierarchy");
1196 $form_gui->addCommand($lng->txt(
"cont_save_all_titles"),
"saveAllTitles");
1197 $up_gui = ($this->
object->getType() ==
"dbk")
1199 :
"ilobjlearningmodulegui";
1200 $form_gui->setExplorerUpdater(
"tree",
"tree_div",
1201 $ilCtrl->getLinkTargetByClass($up_gui,
"explorer",
"",
true));
1203 $ctpl =
new ilTemplate(
"tpl.chap_and_pages.html",
true,
true,
"Modules/LearningModule");
1204 $ctpl->setVariable(
"HIERARCHY_FORM", $form_gui->getHTML());
1205 $ilCtrl->setParameter($this,
"obj_id",
"");
1206 $ctpl->setVariable(
"HREF_NO_JS_EDIT",
1207 $ilCtrl->getLinkTarget($this,
"deactivateJSChapterEditing"));
1208 $ctpl->setVariable(
"TXT_NO_JS_EDIT",
1209 $lng->txt(
"cont_not_js_chap_editing"));
1211 $this->tpl->setContent($ctpl->get());
1215 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.structure_edit.html",
"Modules/LearningModule");
1218 $this->ctrl->setParameter($this,
"backcmd",
"chapters");
1219 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1220 $this->tpl->setVariable(
"HEADER_TEXT", $this->lng->txt(
"cont_chapters"));
1224 $childs = $this->lm_tree->getChilds($this->lm_tree->getRootId());
1225 foreach ($childs as $child)
1227 if($child[
"type"] !=
"st")
1232 $this->tpl->setCurrentBlock(
"table_row");
1237 $this->tpl->setVariable(
"CHECKBOX_ID", $child[
"obj_id"]);
1238 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1242 $this->ctrl->setParameter($this,
"backcmd",
"");
1243 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $child[
"obj_id"]);
1244 $this->tpl->setVariable(
"LINK_TARGET",
1245 $this->ctrl->getLinkTargetByClass(
"ilStructureObjectGUI",
"view"));
1248 $this->tpl->setVariable(
"TEXT_CONTENT",
1250 $this->object->isActiveNumbering()));
1252 $this->tpl->parseCurrentBlock();
1255 $paste_active =
false;
1256 if ($ilUser->clipboardHasObjectsOfType(
"st"))
1258 $paste_active =
true;
1261 if($cnt == 0 && !$paste_active)
1263 $this->tpl->setCurrentBlock(
"notfound");
1264 $this->tpl->setVariable(
"NUM_COLS", 3);
1265 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1266 $this->tpl->parseCurrentBlock();
1271 $this->tpl->setVariable(
"NUM_COLS", 3);
1274 $acts = array(
"delete" =>
"delete",
"cutChapter" =>
"cut",
1275 "copyChapter" =>
"copyChapter");
1279 $acts[
"pasteChapter"] =
"pasteChapter";
1285 $this->tpl->setVariable(
"NUM_COLS", 3);
1286 $subobj = array(
"st");
1288 $this->tpl->setCurrentBlock(
"add_object");
1289 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1290 $this->tpl->setVariable(
"BTN_NAME",
"create");
1291 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"insert"));
1292 $this->tpl->parseCurrentBlock();
1294 $this->tpl->setCurrentBlock(
"form");
1295 $this->tpl->parseCurrentBlock();
1297 $this->tpl->setVariable(
"HREF_JS_EDIT",
1298 $ilCtrl->getLinkTarget($this,
"activateJSChapterEditing"));
1299 $this->tpl->setVariable(
"TXT_JS_EDIT",
1300 $lng->txt(
"cont_js_chap_editing"));
1317 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1318 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1319 $ilToolbar->addButton($lng->txt(
"pg_add"),
1320 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create"));
1321 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1323 include_once(
"./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
1325 $tpl->setContent(
$t->getHTML());
1331 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.all_pages.html",
"Modules/LearningModule");
1334 $this->tpl->setCurrentBlock(
"form");
1335 $this->ctrl->setParameter($this,
"backcmd",
"pages");
1336 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1337 $this->tpl->setVariable(
"HEADER_TEXT", $this->lng->txt(
"cont_pages"));
1338 $this->tpl->setVariable(
"CONTEXT", $this->lng->txt(
"cont_usage"));
1343 foreach ($pages as $page)
1345 $this->tpl->setCurrentBlock(
"table_row");
1348 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1351 $lm_set->get(
"time_scheduled_page_activation"));
1354 $img_sc = ($lm_set->get(
"time_scheduled_page_activation") &&
1362 $this->tpl->setVariable(
"IMG_ALT",
1363 $this->lng->txt(
"cont_page_deactivated"));
1368 $this->object->getType()))
1371 $this->tpl->setVariable(
"IMG_ALT",
1372 $this->lng->txt(
"cont_page_deactivated_elements"));
1377 $this->tpl->setVariable(
"IMG_ALT",
1378 $this->lng->txt(
"pg"));
1386 $this->tpl->setVariable(
"CHECKBOX_ID", $page[
"obj_id"]);
1387 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1390 $this->ctrl->setParameter($this,
"backcmd",
"");
1391 $this->ctrl->setParameterByClass(
"ilLMPageObjectGUI",
"obj_id", $page[
"obj_id"]);
1393 $this->tpl->setVariable(
"LINK_TARGET",
1394 $this->ctrl->getLinkTargetByClass(
"ilLMPageObjectGUI",
"edit"));
1397 $this->tpl->setVariable(
"TEXT_CONTENT", $page[
"title"]);
1400 if ($this->lm_tree->isInTree($page[
"obj_id"]))
1411 if ($page[
"obj_id"] == $this->object->getHeaderPage())
1413 $add_str =
" <b>(".$this->lng->txt(
"cont_header").
")</b>";
1415 if ($page[
"obj_id"] == $this->object->getFooterPage())
1417 $add_str =
" <b>(".$this->lng->txt(
"cont_footer").
")</b>";
1420 $this->tpl->setVariable(
"TEXT_CONTEXT", $path_str.$add_str);
1423 $this->tpl->parseCurrentBlock();
1427 $this->tpl->setCurrentBlock(
"notfound");
1428 $this->tpl->setVariable(
"NUM_COLS", 4);
1429 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1430 $this->tpl->parseCurrentBlock();
1434 $acts = array(
"delete" =>
"delete",
"movePage" =>
"movePage",
"copyPage" =>
"copyPage",
1435 "selectHeader" =>
"selectHeader",
"selectFooter" =>
"selectFooter",
1436 "activatePages" =>
"cont_de_activate");
1440 $acts[
"pastePage"] =
"pastePage";
1448 $this->tpl->setVariable(
"NUM_COLS", 4);
1461 $this->tpl->setVariable(
"NUM_COLS", 4);
1463 $subobj = array(
"pg");
1465 $this->tpl->setCurrentBlock(
"add_object");
1466 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1467 $this->tpl->setVariable(
"BTN_NAME",
"create");
1468 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"create"));
1469 $this->tpl->parseCurrentBlock();
1472 $this->tpl->setCurrentBlock(
"form");
1473 $this->tpl->parseCurrentBlock();
1487 include_once(
"./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
1489 $this->object->getId(), $this->
object->getType());
1491 $tpl->setContent($table_gui->getHTML());
1499 global
$tpl, $ilToolbar;
1504 $ilToolbar->addButton($this->lng->txt(
"cont_fix_tree"),
1505 $this->ctrl->getLinkTarget($this,
"fixTreeConfirm"));
1513 if (is_array(
$_POST[
"id"]))
1515 foreach(
$_POST[
"id"] as $id)
1517 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1523 $this->ctrl->redirect($this,
"pages");
1533 $ilUser->writePref(
"lm_js_chapter_editing",
"disable");
1534 $ilCtrl->redirect($this,
"chapters");
1544 $ilUser->writePref(
"lm_js_chapter_editing",
"enable");
1545 $ilCtrl->redirect($this,
"chapters");
1555 $this->ilias->raiseError($this->lng->txt(
"no_page_in_clipboard"),$this->ilias->error_obj->MESSAGE);
1566 == $this->object->getID())
1569 $new_page =& $lm_page->copy();
1570 $id = $new_page->getId();
1576 $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
1578 $copied_nodes = array();
1579 $new_page =& $lm_page->copyToOtherContObject($this->
object, $copied_nodes);
1580 $id = $new_page->getId();
1590 != $this->object->getID())
1593 $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
1595 $lm_page->setLMId($this->object->getID());
1597 $page =& $lm_page->getPageObject();
1599 $page->setParentId($this->object->getID());
1606 $this->ctrl->redirect($this,
"pages");
1618 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1625 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
1627 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_copied"),
true);
1634 $this->ctrl->redirect($this,
"pages");
1644 function delete($a_parent_subobj_id = 0)
1648 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1653 $this->ilias->raiseError($this->lng->txt(
"cont_select_item"), $this->ilias->error_obj->MESSAGE);
1656 if ($a_parent_subobj_id == 0)
1661 if ($a_parent_subobj_id != 0)
1663 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd",
$_GET[
"backcmd"]);
1664 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1665 $form_action = $this->ctrl->getFormActionByClass(
"ilStructureObjectGUI");
1669 $this->ctrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
1670 $form_action = $this->ctrl->getFormAction($this);
1674 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1676 $cgui->setFormAction($form_action);
1677 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1678 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDelete");
1679 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDelete");
1681 foreach(
$_POST[
"id"] as $id)
1687 " ".$obj->getTitle();
1689 $cgui->addItem(
"id[]", $id, $caption);
1693 $this->tpl->setContent($cgui->getHTML());
1701 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1715 $tree->setTableNames(
'lm_tree',
'lm_data');
1716 $tree->setTreeTablePK(
"lm_id");
1721 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1725 foreach (
$_POST[
"id"] as $id)
1730 $node_data =
$tree->getNodeData($id);
1731 if (is_object($obj))
1733 $obj->setLMId($this->object->getId());
1735 include_once(
"./Services/History/classes/class.ilHistory.php");
1738 $this->
object->getType());
1742 if(
$tree->isInTree($id))
1744 $tree->deleteTree($node_data);
1750 $this->
object->checkTree();
1755 if ($a_parent_subobj_id == 0)
1757 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1773 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1776 for ($i = 1; $i < (count($tmpPath) - 1); $i++)
1783 $path .= $tmpPath[$i][
"title"];
1798 foreach ($a_actions as $name =>
$lng)
1800 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1803 $notoperations = array();
1805 $operations = array();
1811 if (!in_array($row[
"name"], $notoperations))
1813 $operations[] =
$row;
1818 if (count($operations)>0)
1820 foreach ($operations as $val)
1822 $this->tpl->setCurrentBlock(
"operation_btn");
1823 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1824 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
1825 $this->tpl->parseCurrentBlock();
1828 $this->tpl->setCurrentBlock(
"operation");
1830 $this->tpl->parseCurrentBlock();
1841 $this->
setFormAction(
"addRole", $this->ctrl->getLinkTarget($this,
"addRole"));
1842 $this->
setFormAction(
"permSave", $this->ctrl->getLinkTarget($this,
"permSave"));
1843 $this->permObject();
1852 $this->
setReturnLocation(
"permSave", $this->ctrl->getLinkTarget($this,
"perm"));
1853 $this->permSaveObject();
1862 $this->infoObject();
1872 $this->addRoleObject();
1882 $this->ownerObject();
1891 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
1910 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1913 if(count(
$_POST[
"id"]) > 1)
1915 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1920 $this->ilias->raiseError($this->lng->txt(
"cont_select_item"), $this->ilias->error_obj->MESSAGE);
1928 if ($a_parent_subobj_id == 0)
1930 $this->ctrl->redirect($this,
"chapters");
1960 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1963 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
1965 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_cut"),
true);
1976 $this->ctrl->redirect($this,
"pages");
1984 if (
$_GET[
"new_type"] ==
"pg")
1986 $this->ctrl->redirect($this,
"pages");
1990 $this->ctrl->redirect($this,
"chapters");
2000 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2002 $cont_exp->buildExportFile();
2013 $changelink =
"<a href='".$ilCtrl->getLinkTarget($this,
"editMenuProperties").
"'>".$lng->txt(
"change").
"</a>";
2014 if (!$this->object->isActiveLMMenu())
2016 $add =
"<br />".$lng->txt(
"cont_download_no_menu").
" ".$changelink;
2018 else if (!$this->object->isActiveDownloads())
2020 $add =
"<br />".$lng->txt(
"cont_download_no_download").
" ".$changelink;
2024 if ($this->object->getPublicExportFile($a_type) == $a_file)
2026 return $lng->txt(
"yes").$add;
2041 if(!isset($a_files))
2047 foreach ($a_files as $f)
2049 $file = explode(
":", $f);
2050 $export_dir = $this->
object->getExportDirectory(
$file[0]);
2052 if ($this->object->getPublicExportFile(
$file[0]) ==
2055 $this->
object->setPublicExportFile(
$file[0],
"");
2059 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
2062 $this->
object->update();
2064 $ilCtrl->redirectByClass(
"ilexportgui");
2072 if(!isset(
$_POST[
"file"]))
2074 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
2077 if (count(
$_POST[
"file"]) > 1)
2079 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2083 $export_dir = $this->
object->getOfflineDirectory();
2101 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2103 $cgui->setFormAction($this->ctrl->getFormAction($this));
2104 $cgui->setHeaderText($this->lng->txt(
"cont_fix_tree_confirm"));
2105 $cgui->setCancel($this->lng->txt(
"cancel"),
"showMaintenance");
2106 $cgui->setConfirm($this->lng->txt(
"cont_fix_tree"),
"fixTree");
2108 $this->tpl->setContent($cgui->getHTML());
2116 $this->
object->fixTree();
2118 $this->ctrl->redirect($this,
"showMaintenance");
2125 $a_active =
"content", $a_use_global_tabs =
false, $a_as_subtabs =
false,
2128 global
$ilCtrl,
$ilUser, $ilAccess, $ilTabs, $rbacsystem, $ilPluginAdmin;
2133 $addcmd =
"addSubTabTarget";
2134 $getcmd =
"getSubTabHTML";
2138 $addcmd =
"addTarget";
2139 $getcmd =
"getHTML";
2142 $active[$a_active] =
true;
2144 if (!$this->object->isActiveLMMenu())
2149 if ($a_use_global_tabs)
2151 $tabs_gui = $ilTabs;
2161 $showViewInFrameset =
true;
2163 if ($showViewInFrameset && !$a_offline)
2169 $buttonTarget =
"_top";
2172 if ($a_export_format ==
"scorm")
2177 include_once(
"./Services/Payment/classes/class.ilPaymentObject.php");
2181 if (!$a_offline && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2183 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2184 $tabs_gui->$addcmd(
"content",
2185 $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"layout"),
2186 "",
"", $buttonTarget, $active[
"content"]);
2190 if (!$requires_purchase_to_access && $this->object->isActiveTOC() && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2194 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2195 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showTableOfContents");
2199 $link =
"./table_of_contents.html";
2202 $tabs_gui->$addcmd(
"cont_toc", $link,
2203 "",
"", $buttonTarget, $active[
"toc"]);
2207 if (!$requires_purchase_to_access && $this->object->isActivePrintView() && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2211 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2212 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showPrintViewSelection");
2213 $tabs_gui->$addcmd(
"cont_print_view", $link,
2214 "",
"", $buttonTarget, $active[
"print"]);
2219 if (!$requires_purchase_to_access && $ilUser->getId() == ANONYMOUS_USER_ID)
2221 $is_public = $this->
object->isActiveDownloadsPublic();
2223 else if(!$requires_purchase_to_access)
2228 if (!$requires_purchase_to_access && $this->object->isActiveDownloads() && !$a_offline && $is_public &&
2229 $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2231 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2232 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showDownloadList");
2233 $tabs_gui->$addcmd(
"download", $link,
2234 "",
"", $buttonTarget, $active[
"download"]);
2238 if ($a_export_format !=
"scorm" && !$a_offline)
2242 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2243 $link = $this->ctrl->getLinkTargetByClass(
2244 array(
"illmpresentationgui",
"ilinfoscreengui"),
"showSummary");
2248 $link =
"./info.html";
2251 $tabs_gui->$addcmd(($requires_purchase_to_access ?
'buy' :
'info_short'), $link,
2252 "",
"", $buttonTarget, $active[
"info"]);
2256 if (!$a_offline && $a_cur_page > 0)
2258 if ($rbacsystem->checkAccess(
"write", $_GET[
"ref_id"]))
2261 $page_id = $a_cur_page;
2262 $tabs_gui->$addcmd(
"edit_page", ILIAS_HTTP_PATH.
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=".$_GET[
"ref_id"].
2263 "&obj_id=".$page_id.
"&to_page=1",
2264 "",
"", $buttonTarget, $active[
"edit_page"]);
2268 if(!$requires_purchase_to_access)
2272 $entries = $this->lmme_obj->getMenuEntries(
true);
2274 if (count($entries) > 0 && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2276 foreach ($entries as $entry)
2279 if ($entry[
"type"] ==
"intern")
2281 $entry[
"link"] = ILIAS_HTTP_PATH.
"/goto.php?target=".$entry[
"link"];
2285 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:'))
2287 $entry[
"link"] =
"http://".$entry[
"link"];
2290 if (!strstr($entry[
"link"],
'mailto:'))
2294 $tabs_gui->$addcmd($entry[
"title"],
2296 "",
"",
"_blank",
"",
true);
2302 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
2303 $plugin_html =
false;
2304 foreach ($pl_names as $pl)
2307 $gui_class = $ui_plugin->getUIClassInstance();
2308 $resp = $gui_class->modifyGUI(
"Modules/LearningModule",
"lm_menu_tabs",
2309 array(
"lm_menu_tabs" => $tabs_gui));
2313 return $tabs_gui->$getcmd();
2321 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2323 $cont_exp->buildExportFile();
2324 $this->offlineList();
2332 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2334 $cont_exp->buildExportFile();
2344 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2346 $cont_exp->buildExportFile();
2360 $par_id = $tree->getParentId(
$_GET[
"ref_id"]);
2364 if($par_id != ROOT_FOLDER_ID)
2366 $this->ctrl->addLocation(
"...",
2373 if ($parent_title ==
"ILIAS")
2375 $parent_title = $lng->txt(
"repository");
2379 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $par_id);
2380 $this->ctrl->addLocation($parent_title,
2381 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
2383 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
2385 if (!$a_omit_obj_id)
2389 $lmtree =& $this->
object->getTree();
2397 $path = $lmtree->getPathFull($lmtree->getRootId());
2400 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
2409 if (
$row[
"child"] == 1)
2411 $this->ctrl->setParameter($this,
"obj_id",
"");
2412 $this->ctrl->addLocation(
2413 $this->object->getTitle(),
2414 $this->ctrl->getLinkTarget($this,
"chapters"),
"",
$_GET[
"ref_id"]);
2419 switch(
$row[
"type"])
2422 $this->ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id",
$row[
"child"]);
2423 $this->ctrl->addLocation(
2425 $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
2429 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$row[
"child"]);
2430 $this->ctrl->addLocation(
2432 $this->ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
2437 if (!$a_omit_obj_id)
2439 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
2461 include_once(
"./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
2463 $tpl->setContent($table->getHTML());
2477 global
$lng, $ilHelp;
2479 $ilHelp->setScreenIdComponent(
"lm");
2482 $this->tpl->setTitle($this->object->getTitle());
2484 $lng->txt(
"obj_lm"));
2500 $ilTabs->addSubtab(
"chapters",
2501 $lng->txt(
"cont_chapters"),
2502 $ilCtrl->getLinkTarget($this,
"chapters"));
2505 $ilTabs->addSubtab(
"pages",
2506 $lng->txt(
"cont_all_pages"),
2507 $ilCtrl->getLinkTarget($this,
"pages"));
2510 $ilTabs->addSubtab(
"questions",
2511 $lng->txt(
"objs_qst"),
2512 $ilCtrl->getLinkTarget($this,
"listQuestions"));
2515 if ($lm_set->get(
"html_export_ids"))
2519 $ilTabs->addSubtab(
"export_ids",
2520 $lng->txt(
"cont_html_export_ids"),
2521 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview"));
2526 $lng->loadLanguageModule(
"help");
2527 $ilTabs->addSubtab(
"export_ids",
2528 $lng->txt(
"cont_online_help_ids"),
2529 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview"));
2531 $ilTabs->addSubtab(
"help_tooltips",
2532 $lng->txt(
"help_tooltips"),
2533 $ilCtrl->getLinkTarget($this,
"showTooltipList"));
2537 $ilTabs->addSubtab(
"internal_links",
2538 $lng->txt(
"cont_internal_links"),
2539 $ilCtrl->getLinkTarget($this,
"listLinks"));
2542 if ($this->object->getType() ==
"lm")
2544 if(@include_once(
'HTTP/Request.php'))
2546 $ilTabs->addSubtab(
"link_check",
2547 $lng->txt(
"link_check"),
2548 $ilCtrl->getLinkTarget($this,
"linkChecker"));
2553 $ilTabs->addSubtab(
"maintenance",
2554 $lng->txt(
"cont_maintenance"),
2555 $ilCtrl->getLinkTarget($this,
"showMaintenance"));
2557 $ilTabs->activateSubTab($a_active);
2558 $ilTabs->activateTab(
"content");
2568 $tabs_gui = $ilTabs;
2571 $ilTabs->addTab(
"content",
2572 $lng->txt(
"content"),
2573 $this->ctrl->getLinkTarget($this,
"chapters"));
2576 $ilTabs->addTab(
"info",
2577 $lng->txt(
"info_short"),
2578 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary'));
2581 $ilTabs->addTab(
"settings",
2582 $lng->txt(
"settings"),
2583 $this->ctrl->getLinkTarget($this,
'properties'));
2586 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2589 $ilTabs->addTab(
'learning_progress',
2590 $lng->txt(
"learning_progress"),
2591 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
''));
2594 if ($this->object->getType() !=
"lm")
2597 $ilTabs->addTab(
"bib_data",
2598 $lng->txt(
"bib_data"),
2599 $this->ctrl->getLinkTarget($this,
"editBibItem"));
2603 $ilTabs->addTab(
"history",
2604 $lng->txt(
"history"),
2605 $this->ctrl->getLinkTarget($this,
"history"));
2608 $ilTabs->addTab(
"meta",
2609 $lng->txt(
"meta_data"),
2610 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''));
2612 if ($this->object->getType() ==
"lm")
2615 $ilTabs->addTab(
"export",
2616 $lng->txt(
"export"),
2617 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
2621 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
2623 $ilTabs->addTab(
"perm",
2624 $lng->txt(
"perm_settings"),
2625 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
2630 $ilTabs->activateTab($a_act);
2634 $ilTabs->addNonTabbedLink(
"pres_mode", $lng->txt(
"cont_presentation_view"),
2635 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->object->getRefID(),
"_top");
2645 if (in_array($a_active,
2646 array(
"cont_general_properties",
"cont_style",
"cont_lm_menu",
"public_section")))
2649 $ilTabs->addSubTabTarget(
"cont_general_properties",
2650 $this->ctrl->getLinkTarget($this,
'properties'),
2654 $ilTabs->addSubTabTarget(
"cont_style",
2655 $this->ctrl->getLinkTarget($this,
'editStyleProperties'),
2659 $ilTabs->addSubTabTarget(
"cont_lm_menu",
2660 $this->ctrl->getLinkTarget($this,
'editMenuProperties'),
2663 if ($ilSetting->get(
"pub_section"))
2665 if ($this->object->getType() !=
"dbk")
2668 $ilTabs->addSubTabTarget(
"public_section",
2669 $this->ctrl->getLinkTarget($this,
'editPublicSection'),
2674 $ilTabs->setSubTabActive($a_active);
2680 global $ilTabs, $ilToobar, $ilAccess;
2683 if (!$ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
"read",
"", $this->object->getRefId()))
2690 $ilTabs->setTabActive(
"settings");
2692 switch ($this->object->getType())
2695 $gui_class =
"ilobjlearningmodulegui";
2699 $gui_class =
"ilobjdlbookgui";
2703 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_public_selector.html",
2704 "Modules/LearningModule");
2711 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
2712 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2714 $si->setOptions($modes);
2715 $si->setValue($this->object->getPublicAccessMode());
2716 $my_toolbar->addInputItem(
$si,
true);
2717 $my_toolbar->setOpenFormTag(
false);
2718 $my_toolbar->setCloseFormTag(
false);
2719 $my_toolbar->addFormButton($this->lng->txt(
"save"),
"savePublicSection");
2720 $this->tpl->setVariable(
"TOOLBAR", $my_toolbar->getHTML());
2721 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
2723 if ($this->object->getPublicAccessMode() ==
"selected")
2725 $this->tpl->setCurrentBlock(
"select_pages");
2726 require_once (
"./Modules/LearningModule/classes/class.ilPublicSectionSelector.php");
2734 $output = $exp->getOutput();
2737 foreach ($exp->format_options as $node)
2739 if (!$node[
"container"])
2741 $pages[] = $node[
"child"];
2746 $this->tpl->setVariable(
"EXPLORER",$output);
2747 $this->tpl->setVariable(
"ONCLICK",$js_pages);
2748 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
2749 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
2750 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2752 $this->tpl->parseCurrentBlock();
2759 $this->
object->setPublicAccessMode(
$_POST[
"lm_public_mode"]);
2760 $this->
object->updateProperties();
2763 $this->ctrl->redirect($this,
"editPublicSection");
2775 require_once(
"./Services/History/classes/class.ilHistoryGUI.php");
2777 $this->
object->getType());
2779 $this->ctrl->getParameterArray($this,
"history"),
2780 $this->
object->isActiveHistoryUserComments()
2783 $this->tpl->setVariable(
"ADM_CONTENT", $hist_html);
2798 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
2800 $actions->setSelectionHeaderClass(
'small');
2801 $actions->setItemLinkClass(
'xsmall');
2802 $actions->setListTitle($this->lng->txt(
'actions'));
2804 $this->ctrl->setParameterByClass(
'ilLMPageObjectGUI',
'obj_id', $row[
'page_id']);
2806 $this->lng->txt(
'edit'),
2808 $this->ctrl->getLinkTargetByClass(
'ilLMPageObjectGUI',
'edit')
2810 $this->ctrl->clearParametersByClass(
'ilLMPageObjectGUI');
2811 $row[
'action_html'] =
$actions->getHTML();
2825 require_once
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
2830 if((
bool)$ilias->getSetting(
'cron_link_check'))
2832 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2833 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2835 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
2838 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
2840 $toolbar->addInputItem($chb);
2841 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
2842 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
2846 $tgui->setLinkChecker($this->link_checker_obj)
2847 ->setRowHandler($this)
2848 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
2850 return $tpl->setContent($tgui->prepareHTML()->getHTML().$toolbar->getHTML());
2857 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2860 $link_check_notify->setUserId($ilUser->getId());
2861 $link_check_notify->setObjId($this->object->getId());
2863 if(
$_POST[
'link_check_message'])
2866 $link_check_notify->addNotifier();
2871 $link_check_notify->deleteNotifier();
2884 if(!$this->link_checker_obj->checkPear())
2892 $this->link_checker_obj->checkLinks();
2904 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
2907 $this->link_checker_obj->setObjId($this->object->getId());
2914 include_once
'./Modules/LearningModule/classes/class.ilLMMenuEditor.php';
2917 $this->lmme_obj->setObjId($this->object->getId());
2931 $ilTabs->setTabActive(
"settings");
2934 $ilToolbar->addButton($this->lng->txt(
"lm_menu_select_internal_object"),
2935 $ilCtrl->getLinkTarget($this,
"showEntrySelector"));
2938 $this->tpl->setContent($form->getHTML());
2950 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2954 $ti =
new ilTextInputGUI($this->lng->txt(
"lm_menu_entry_title"),
"title");
2957 $form->addItem($ti);
2960 $ta =
new ilTextInputGUI($this->lng->txt(
"lm_menu_entry_target"),
"target");
2963 $form->addItem($ta);
2965 if ($a_mode ==
"edit")
2968 $this->lmme_obj->readEntry(
$_REQUEST[
"menu_entry"]);
2969 $ti->setValue($this->lmme_obj->getTitle());
2970 $ta->setValue($this->lmme_obj->getTarget());
2973 if (isset(
$_GET[
"link_ref_id"]))
2975 $link_ref_id = (int)
$_GET[
"link_ref_id"];
2980 $target_link = $obj_type.
"_".$link_ref_id;
2982 $ta->setValue($target_link);
2986 $hi->setValue($link_ref_id);
2987 $form->addItem($hi);
2992 if ($a_mode ==
"create")
2994 $form->addCommandButton(
"saveMenuEntry", $lng->txt(
"save"));
2995 $form->addCommandButton(
"editMenuProperties", $lng->txt(
"cancel"));
2996 $form->setTitle($lng->txt(
"lm_menu_new_entry"));
3000 $form->addCommandButton(
"updateMenuEntry", $lng->txt(
"save"));
3001 $form->addCommandButton(
"editMenuProperties", $lng->txt(
"cancel"));
3002 $form->setTitle($lng->txt(
"lm_menu_edit_entry"));
3005 $form->setFormAction($ilCtrl->getFormAction($this));
3018 if (empty(
$_POST[
"title"]))
3022 $ilCtrl->redirect($this,
"addMenuEntry");
3024 if (empty(
$_POST[
"target"]))
3028 $ilCtrl->redirect($this,
"addMenuEntry");
3032 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3033 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3034 $this->lmme_obj->setLinkRefId(
$_POST[
"link_ref_id"]);
3036 if (
$_POST[
"link_ref_id"])
3038 $this->lmme_obj->setLinkType(
"intern");
3041 $this->lmme_obj->create();
3044 $this->ctrl->redirect($this,
"editMenuProperties");
3052 if (empty(
$_GET[
"menu_entry"]))
3054 $this->ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3058 $this->lmme_obj->delete(
$_GET[
"menu_entry"]);
3061 $this->ctrl->redirect($this,
"editMenuProperties");
3071 if (empty(
$_GET[
"menu_entry"]))
3073 $this->ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3076 $ilCtrl->saveParameter($this, array(
"menu_entry"));
3077 $ilToolbar->addButton($this->lng->txt(
"lm_menu_select_internal_object"),
3078 $ilCtrl->getLinkTarget($this,
"showEntrySelector"));
3081 $this->tpl->setContent($form->getHTML());
3091 $this->ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3095 if (empty(
$_POST[
"title"]))
3097 $this->ilias->raiseError($this->lng->txt(
"please_enter_title"),$this->ilias->error_obj->MESSAGE);
3099 if (empty(
$_POST[
"target"]))
3101 $this->ilias->raiseError($this->lng->txt(
"please_enter_target"),$this->ilias->error_obj->MESSAGE);
3105 $this->lmme_obj->readEntry(
$_REQUEST[
"menu_entry"]);
3106 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3107 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3108 $this->lmme_obj->update();
3111 $this->ctrl->redirect($this,
"editMenuProperties");
3120 $ilTabs->setTabActive(
"settings");
3123 $ilCtrl->saveParameter($this, array(
"menu_entry"));
3125 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_menu_object_selector.html",
"Modules/LearningModule");
3129 require_once (
"./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
3132 $exp->
setExpand(
$_GET[
"lm_menu_expand"] ?
$_GET[
"lm_menu_expand"] : $this->tree->readRootId());
3133 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showEntrySelector'));
3134 $exp->setTargetGet(
"ref_id");
3135 $exp->setRefId($this->cur_ref_id);
3137 $sel_types = array(
'mcst',
'mep',
'cat',
'lm',
'dbk',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
3138 "crs",
"grp",
"book",
"tst",
"file");
3139 $exp->setSelectableTypes($sel_types);
3145 $output = $exp->getOutput();
3148 foreach ($exp->format_options as $node)
3150 if (!$node[
"container"])
3152 $pages[] = $node[
"child"];
3159 $this->tpl->setVariable(
"TXT_SET_PUBLIC_MODE", $this->lng->txt(
"set_public_mode"));
3160 $this->tpl->setVariable(
"TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt(
"choose_public_mode"));
3161 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
3162 $select_public_mode =
ilUtil::formSelect ($this->object->getPublicAccessMode(),
"lm_public_mode",$modes,
false,
true);
3163 $this->tpl->setVariable(
"SELECT_PUBLIC_MODE", $select_public_mode);
3165 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"choose_public_pages"));
3166 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
3167 $this->tpl->setVariable(
"EXPLORER",$output);
3168 $this->tpl->setVariable(
"ONCLICK",$js_pages);
3169 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
3170 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
3171 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
3172 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
3183 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
3185 if(count(
$_POST[
"id"]) > 1)
3187 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
3189 if (
$_POST[
"id"][0] != $this->object->getHeaderPage())
3191 $this->
object->setHeaderPage(
$_POST[
"id"][0]);
3195 $this->
object->setHeaderPage(0);
3197 $this->
object->updateProperties();
3198 $this->ctrl->redirect($this,
"pages");
3208 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
3210 if(count(
$_POST[
"id"]) > 1)
3212 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
3214 if (
$_POST[
"id"][0] != $this->object->getFooterPage())
3216 $this->
object->setFooterPage(
$_POST[
"id"][0]);
3220 $this->
object->setFooterPage(0);
3222 $this->
object->updateProperties();
3223 $this->ctrl->redirect($this,
"pages");
3235 $ilCtrl->redirect($this,
"chapters");
3245 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3252 $parent_id = $this->lm_tree->getParentId($node_id);
3257 $parent_id = $node_id;
3261 for ($i = 1; $i <= $num; $i++)
3264 $chap->setType(
"st");
3265 $chap->setTitle($lng->txt(
"cont_new_chap"));
3266 $chap->setLMId($this->object->getId());
3271 $ilCtrl->redirect($this,
"chapters");
3281 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3283 if ($ilUser->getPref(
"lm_js_chapter_editing") !=
"disable")
3293 $node_id = $this->lm_tree->getRootId();
3294 $first_child =
true;
3298 $node_id =
$_POST[
"id"][0];
3299 $first_child =
false;
3303 $ilLog->write(
"InsertChapterClip, num: $num, node_id: $node_id, ".
3308 $parent_id = $this->lm_tree->getParentId($node_id);
3313 $parent_id = $node_id;
3318 $chapters = $ilUser->getClipboardObjects(
"st",
true);
3319 $copied_nodes = array();
3320 foreach ($chapters as $chap)
3322 $ilLog->write(
"Call pasteTree, Target LM: ".$this->object->getId().
", Chapter ID: ".$chap[
"id"]
3323 .
", Parent ID: ".$parent_id.
", Target: ".$target);
3325 $target, $chap[
"insert_time"], $copied_nodes,
3333 $ilUser->clipboardDeleteObjectsOfType(
"pg");
3334 $ilUser->clipboardDeleteObjectsOfType(
"st");
3338 $this->
object->checkTree();
3339 $ilCtrl->redirect($this,
"chapters");
3351 if ($ilAccess->checkAccess(
"read",
"", $a_target))
3353 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3354 $_GET[
"ref_id"] = $a_target;
3355 include(
"ilias.php");
3357 }
else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
3359 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3360 $_GET[
"ref_id"] = $a_target;
3361 $_GET[
"cmd"] =
"infoScreen";
3362 include(
"ilias.php");
3365 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
3373 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
3384 if (!is_array($items))
3387 $ilCtrl->redirect($this, $a_return);
3391 foreach($items as $k => $item)
3398 foreach($todel as $k)
3406 $ilCtrl->redirect($this, $a_return);
3417 if (!is_array($items))
3420 $ilCtrl->redirect($this,
"chapters");
3424 foreach($items as $k => $item)
3431 foreach($todel as $k)
3438 $ilCtrl->redirect($this,
"chapters");
3469 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3470 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
3471 $lm_tree = $this->
object->getTree();
3472 $childs = $lm_tree->getChilds($lm_tree->readRootId());
3473 $options = array(
"" => $lng->txt(
"all"));
3474 foreach ($childs as $c)
3476 $options[$c[
"child"]] = $c[
"title"];
3479 $si->setOptions($options);
3481 $ilToolbar->addInputItem(
$si,
true);
3482 $ilToolbar->addFormButton($lng->txt(
"help_filter"),
"filterHelpChapters");
3484 include_once(
"./Modules/LearningModule/classes/class.ilHelpMappingTableGUI.php");
3489 include_once(
"./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
3493 $tpl->setContent($tbl->getHTML());
3507 $ilCtrl->redirect($this,
"showExportIDsOverview");
3520 if (is_array(
$_POST[
"exportid"]))
3522 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id)
3524 if ($exp_id !=
"" && !preg_match(
"/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
3534 $lng->txt(
"cont_exp_ids_not_resp_format3").
" ".
3535 $lng->txt(
"cont_exp_ids_not_resp_format2"));
3541 if (is_array(
$_POST[
"exportid"]))
3543 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id)
3551 $ilCtrl->redirect($this,
"showExportIdsOverview");
3564 include_once(
"./Services/Help/classes/class.ilHelpMapping.php");
3565 if (is_array(
$_POST[
"screen_ids"]))
3567 foreach (
$_POST[
"screen_ids"] as $chap => $ids)
3569 $ids = explode(
"\n", $ids);
3574 $ilCtrl->redirect($this,
"showExportIdsOverview");
3594 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3595 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
3596 $ti =
new ilTextInputGUI($this->lng->txt(
"help_tooltip_id"),
"tooltip_id");
3599 $ilToolbar->addInputItem($ti,
true);
3600 $ilToolbar->addFormButton($lng->txt(
"add"),
"addTooltip");
3601 $ilToolbar->addSeparator();
3603 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
3610 $si->setOptions($options);
3612 $ilToolbar->addInputItem(
$si,
true);
3613 $ilToolbar->addFormButton($lng->txt(
"help_filter"),
"filterTooltips");
3615 include_once(
"./Modules/LearningModule/classes/class.ilHelpTooltipTableGUI.php");
3618 $tpl->setContent($tbl->getHTML());
3632 if (trim($tt_id) !=
"")
3634 include_once(
"./Services/Help/classes/class.ilHelp.php");
3638 $fu = strpos($tt_id,
"_");
3639 $comp = substr($tt_id, 0, $fu);
3642 $ilCtrl->redirect($this,
"showTooltipList");
3656 $ilCtrl->redirect($this,
"showTooltipList");
3670 include_once(
"./Services/Help/classes/class.ilHelp.php");
3672 if (is_array(
$_POST[
"text"]))
3674 foreach (
$_POST[
"text"] as $id => $text)
3681 $ilCtrl->redirect($this,
"showTooltipList");
3691 if (is_array(
$_POST[
"id"]))
3693 include_once(
"./Services/Help/classes/class.ilHelp.php");
3694 foreach (
$_POST[
"id"] as $id)
3700 $ilCtrl->redirect($this,
"showTooltipList");
3743 if ($a_def_option !=
"")
3750 "<table><tr><td>".$im_tag.
"</td><td><b>".$lng->txt(
"cont_lm_default_layout").
3751 "</b>: ".$lng->txt(
"cont_layout_".$a_def_option).
"</td></tr></table>";
3760 $option[$l] =
"<table><tr><td style='padding: 0px 5px 5px;'>".$im_tag.
"</td><td style='padding:5px;'><b>".$lng->txt(
"cont_layout_".$l).
"</b>: ".$lng->txt(
"cont_layout_".$l.
"_desc").
"</td></tr></table>";
3763 $layout->setOptions($option);
3774 $ilCtrl->setParameter($this,
"hierarchy",
"1");
3786 if (!is_array(
$_POST[
"id"]))
3790 if ($a_in_hierarchy)
3792 $ilCtrl->redirect($this,
"chapters");
3796 $ilCtrl->redirect($this,
"pages");
3802 $tpl->setContent($this->form->getHTML());
3812 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3815 if (is_array(
$_POST[
"id"]))
3817 foreach (
$_POST[
"id"] as $id)
3821 $this->form->addItem($hi);
3825 $this->
object->getLayout());
3826 $this->form->addItem($layout);
3828 $this->form->addCommandButton(
"savePageLayout", $lng->txt(
"save"));
3829 $this->form->addCommandButton(
"pages", $lng->txt(
"cancel"));
3831 $this->form->setTitle($lng->txt(
"cont_set_layout"));
3832 $this->form->setFormAction($ilCtrl->getFormAction($this));
3843 $ilCtrl->setParameter($this,
"hierarchy",
$_GET[
"hierarchy"]);
3845 foreach (
$_POST[
"id"] as $id)
3853 if (
$_GET[
"hierarchy"] == 1)
3855 $ilCtrl->redirect($this,
"chapters");
3859 $ilCtrl->redirect($this,
"pages");