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");
36 $lng->loadLanguageModule(
"obj");
37 parent::ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
47 if ($this->ctrl->getRedirectSource() ==
"ilinternallinkgui")
53 if ($this->ctrl->getCmdClass() ==
"ilinternallinkgui")
55 $this->ctrl->setReturn($this,
"explorer");
59 $next_class = $this->ctrl->getNextClass($this);
63 if (
$_GET[
"to_props"] == 1)
65 $cmd = $this->ctrl->getCmd(
"properties");
69 $cmd = $this->ctrl->getCmd(
"chapters");
76 case "illearningprogressgui":
79 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
80 $this->
setTabs(
"learning_progress");
84 $this->ctrl->forwardCommand($new_gui);
89 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
91 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
96 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
98 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
99 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
101 $this->ctrl->forwardCommand($md_gui);
104 case "ilobjstylesheetgui":
106 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
107 $this->ctrl->setReturn($this,
"editStyleProperties");
108 $style_gui =&
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
110 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
112 $style_gui->setCreationMode(
true);
114 $ret =& $this->ctrl->forwardCommand($style_gui);
117 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
120 $this->
object->setStyleSheetId($style_id);
121 $this->
object->update();
122 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
126 case "illmpageobjectgui":
128 $ilTabs->setBackTarget($lng->txt(
"learning module"),
129 $ilCtrl->getLinkTarget($this,
"chapters"));
130 $this->ctrl->saveParameter($this, array(
"obj_id"));
132 $this->ctrl->setReturn($this,
"chapters");
137 if (
$_GET[
"obj_id"] !=
"")
140 $pg_gui->setLMPageObject($obj);
143 $ret =& $this->ctrl->forwardCommand($pg_gui);
144 if (
$cmd ==
"save" ||
$cmd ==
"cancel")
150 case "ilstructureobjectgui":
151 $ilTabs->setBackTarget($lng->txt(
"learning module"),
152 $ilCtrl->getLinkTarget($this,
"chapters"));
154 $this->ctrl->saveParameter($this, array(
"obj_id"));
156 $this->ctrl->setReturn($this,
"chapters");
158 if (
$_GET[
"obj_id"] !=
"")
161 $st_gui->setStructureObject($obj);
164 $ret =& $this->ctrl->forwardCommand($st_gui);
165 if (
$cmd ==
"save" ||
$cmd ==
"cancel")
167 if (
$_GET[
"obj_id"] ==
"")
169 $this->ctrl->redirect($this,
"chapters");
173 $this->ctrl->setCmd(
"subchap");
179 case 'ilpermissiongui':
180 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
190 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
192 $ret =& $this->ctrl->forwardCommand($perm_gui);
196 case 'ilinfoscreengui':
200 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
202 $info->enablePrivateNotes();
203 $info->enableLearningProgress();
206 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
208 $info->enableNewsEditing();
209 $info->setBlockProperty(
"news",
"settings",
true);
213 $info->addMetaDataSections($this->object->getId(), 0,
214 $this->
object->getType());
216 $ret =& $this->ctrl->forwardCommand($info);
223 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
225 $exp_gui->addFormat(
"xml",
"", $this,
"export");
226 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
228 if ($ot->getContentActivated())
230 $lng->loadLanguageModule(
"meta");
231 $langs = $ot->getLanguages();
232 foreach ($langs as $l => $ldata)
234 $exp_gui->addFormat(
"html_".$l,
"HTML (".$lng->txt(
"meta_l_".$l).
")", $this,
"exportHTML");
239 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
242 $exp_gui->addFormat(
"scorm",
"", $this,
"exportSCORM");
243 $exp_gui->addCustomColumn($lng->txt(
"cont_public_access"),
244 $this,
"getPublicAccessColValue");
245 $exp_gui->addCustomMultiCommand($lng->txt(
"cont_public_access"),
246 $this,
"publishExportFile");
247 $ret = $this->ctrl->forwardCommand($exp_gui);
250 case 'ilobjecttranslationgui':
258 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
260 $transgui->setTitleDescrOnlyMode(
false);
261 $this->ctrl->forwardCommand($transgui);
265 case "ilcommonactiondispatchergui":
266 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
268 $this->ctrl->forwardCommand($gui);
283 $new_type =
$_POST[
"new_type"]
288 if (
$cmd ==
"create" &&
289 !in_array($new_type, array(
"dbk",
"lm")))
296 $this->ctrl->setCmdClass(
"ilLMPageObjectGUI");
302 $this->ctrl->setCmdClass(
"ilStructureObjectGUI");
311 in_array($new_type, array(
"dbk",
"lm")))
335 return array(
"ilLMPageObjectGUI",
"ilStructureObjectGUI",
"ilObjStyleSheetGUI");
345 $lng->loadLanguageModule(
"style");
353 if($this->object->getType() ==
"lm")
356 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
358 $ecs->addSettingsToForm($this->form,
'lm');
361 $this->tpl->setContent($this->form->getHTML());
371 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
380 $this->form->addItem($ti);
387 $this->form->addItem($ta);
391 $this->form->addItem($online);
394 $layout = self::getLayoutOption($lng->txt(
"cont_def_layout"),
"lm_layout");
395 $this->form->addItem($layout);
398 $page_header =
new ilSelectInputGUI($lng->txt(
"cont_page_header"),
"lm_pg_header");
399 $option = array (
"st_title" => $this->lng->txt(
"cont_st_title"),
400 "pg_title" => $this->lng->txt(
"cont_pg_title"),
401 "none" => $this->lng->txt(
"cont_none"));
403 $this->form->addItem($page_header);
407 $this->form->addItem($chap_num);
411 $option = array (
"chapters" => $this->lng->txt(
"cont_chapters_only"),
412 "pages" => $this->lng->txt(
"cont_chapters_and_pages"));
414 $this->form->addItem($toc_mode);
417 if (!$this->
ilias->getSetting(
'disable_comments'))
419 $this->lng->loadLanguageModule(
"notes");
421 $pub_nodes->
setInfo($this->lng->txt(
"cont_lm_comments_desc"));
422 $this->form->addItem($pub_nodes);
427 $lpp->
setInfo($this->lng->txt(
"cont_layout_per_page_info"));
428 $this->form->addItem($lpp);
431 $synch =
new ilCheckboxInputGUI($lng->txt(
"cont_synchronize_frames"),
"cobj_clean_frames");
432 $synch->
setInfo($this->lng->txt(
"cont_synchronize_frames_desc"));
433 $this->form->addItem($synch);
436 $com =
new ilCheckboxInputGUI($lng->txt(
"enable_hist_user_comments"),
"cobj_user_comments");
437 $com->
setInfo($this->lng->txt(
"enable_hist_user_comments_desc"));
438 $this->form->addItem($com);
441 $this->lng->loadLanguageModule(
'rating');
443 $rate->
setInfo($this->lng->txt(
'rating_activate_rating_info'));
444 $this->form->addItem($rate);
445 $ratep =
new ilCheckboxInputGUI($this->lng->txt(
'lm_activate_rating'),
'rating_pages');
446 $this->form->addItem($ratep);
449 $qfeed =
new ilCheckboxInputGUI($lng->txt(
"cont_disable_def_feedback"),
"disable_def_feedback");
450 $qfeed->
setInfo($this->lng->txt(
"cont_disable_def_feedback_info"));
451 $this->form->addItem($qfeed);
453 $this->form->setTitle($lng->txt(
"cont_general_properties"));
454 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
455 $this->form->setFormAction($ilCtrl->getFormAction($this));
465 $title = $this->
object->getTitle();
466 $description = $this->
object->getDescription();
467 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
469 if ($ot->getContentActivated())
471 $title = $ot->getDefaultTitle();
472 $description = $ot->getDefaultDescription();
475 $values[
"title"] = $title;
476 $values[
"description"] = $description;
477 if ($this->object->getOnline())
479 $values[
"cobj_online"] =
true;
481 $values[
"lm_layout"] = $this->
object->getLayout();
482 $values[
"lm_pg_header"] = $this->
object->getPageHeader();
483 if ($this->object->isActiveNumbering())
485 $values[
"cobj_act_number"] =
true;
487 $values[
"toc_mode"] = $this->
object->getTOCMode();
488 if ($this->object->publicNotes())
490 $values[
"cobj_pub_notes"] =
true;
492 if ($this->object->cleanFrames())
494 $values[
"cobj_clean_frames"] =
true;
496 if ($this->object->isActiveHistoryUserComments())
498 $values[
"cobj_user_comments"] =
true;
500 $values[
"layout_per_page"] = $this->
object->getLayoutPerPage();
501 $values[
"rating"] = $this->
object->hasRating();
502 $values[
"rating_pages"] = $this->
object->hasRatingPages();
503 $values[
"disable_def_feedback"] = $this->
object->getDisableDefaultFeedback();
505 $this->form->setValuesByArray($values);
517 if ($this->form->checkInput())
519 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
521 if ($ot->getContentActivated())
523 $ot->setDefaultTitle(
$_POST[
'title']);
524 $ot->setDefaultDescription(
$_POST[
'description']);
528 $this->
object->setTitle(
$_POST[
'title']);
529 $this->
object->setDescription(
$_POST[
'description']);
530 $this->
object->setLayout(
$_POST[
"lm_layout"]);
531 $this->
object->setPageHeader(
$_POST[
"lm_pg_header"]);
532 $this->
object->setTOCMode(
$_POST[
"toc_mode"]);
533 $this->
object->setOnline(
$_POST[
"cobj_online"]);
534 $this->
object->setActiveNumbering(
$_POST[
"cobj_act_number"]);
535 $this->
object->setCleanFrames(
$_POST[
"cobj_clean_frames"]);
536 if (!$this->
ilias->getSetting(
'disable_comments'))
538 $this->
object->setPublicNotes(
$_POST[
"cobj_pub_notes"]);
540 $this->
object->setHistoryUserComments(
$_POST[
"cobj_user_comments"]);
541 $this->
object->setLayoutPerPage(
$_POST[
"layout_per_page"]);
542 $this->
object->setRating(
$_POST[
"rating"]);
543 $this->
object->setRatingPages(
$_POST[
"rating_pages"]);
544 $this->
object->setDisableDefaultFeedback((
int)
$_POST[
"disable_def_feedback"]);
545 $this->
object->updateProperties();
546 $this->
object->update();
548 if($this->object->getType() ==
'lm')
551 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
553 if($ecs->handleSettingsUpdate())
567 $this->ctrl->redirect($this,
"properties");
571 $lng->loadLanguageModule(
"style");
575 $this->form->setValuesByPost();
576 $this->tpl->setContent($this->form->getHTML());
588 $tpl->setContent($this->form->getHTML());
598 $lng->loadLanguageModule(
"style");
600 $ilTabs->setTabActive(
"settings");
603 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
606 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
607 $style_id = $this->
object->getStyleSheetId();
609 if ($fixed_style > 0)
613 $this->lng->txt(
"global_fixed").
")");
614 $this->form->addItem($st);
621 $st_styles[0] = $this->lng->txt(
"default");
631 $this->form->addItem($st);
636 $this->form->addCommandButton(
"editStyle",
637 $lng->txt(
"cont_edit_style"));
638 $this->form->addCommandButton(
"deleteStyle",
639 $lng->txt(
"cont_delete_style"));
647 $st_styles,
false,
true);
648 $style_sel =
new ilSelectInputGUI($lng->txt(
"cont_current_style"),
"style_id");
650 $style_sel->setValue($style_id);
651 $this->form->addItem($style_sel);
653 $this->form->addCommandButton(
"saveStyleSettings",
655 $this->form->addCommandButton(
"createStyle",
656 $lng->txt(
"sty_create_ind_style"));
659 $this->form->setTitle($lng->txt(
"cont_style"));
660 $this->form->setFormAction($ilCtrl->getFormAction($this));
670 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
680 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
690 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
700 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
702 || $this->object->getStyleSheetId() == 0))
705 $this->
object->update();
708 $this->ctrl->redirect($this,
"editStyleProperties");
718 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
723 $menu->
setChecked($this->object->isActiveLMMenu());
724 $form->addItem($menu);
728 $toc->
setChecked($this->object->isActiveTOC());
729 $form->addItem($toc);
732 $print =
new ilCheckboxInputGUI($this->lng->txt(
"cont_print_view"),
"cobj_act_print");
733 $print->
setChecked($this->object->isActivePrintView());
734 $form->addItem($print);
737 $glo =
new ilCheckboxInputGUI($this->lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
738 $glo->
setChecked($this->object->isActivePreventGlossaryAppendix());
739 $print->addSubItem($glo);
742 $hhfp =
new ilCheckboxInputGUI($this->lng->txt(
"cont_hide_head_foot_print"),
"hide_head_foot_print");
743 $hhfp->
setChecked($this->object->getHideHeaderFooterPrint());
744 $print->addSubItem($hhfp);
747 $no_download_file_available =
748 " ".$lng->txt(
"cont_no_download_file_available").
749 " <a href='".$ilCtrl->getLinkTargetByClass(
"ilexportgui",
"").
"'>".$lng->txt(
"change").
"</a>";
750 $types = array(
"xml",
"html",
"scorm");
751 foreach($types as $type)
753 if ($this->object->getPublicExportFile($type) !=
"")
755 if (is_file($this->object->getExportDirectory($type).
"/".
756 $this->
object->getPublicExportFile($type)))
758 $no_download_file_available =
"";
762 $dl =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"cobj_act_downloads");
763 $dl->
setInfo($this->lng->txt(
"cont_downloads_desc").$no_download_file_available);
764 $dl->setChecked($this->object->isActiveDownloads());
768 $pdl =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads_public_desc"),
"cobj_act_downloads_public");
769 $pdl->
setChecked($this->object->isActiveDownloadsPublic());
770 $dl->addSubItem($pdl);
772 $form->addCommandButton(
"saveMenuProperties", $lng->txt(
"save"));
774 $form->setTitle($lng->txt(
"cont_lm_menu"));
775 $form->setFormAction($ilCtrl->getFormAction($this));
787 $lng->loadLanguageModule(
"style");
789 $ilTabs->setTabActive(
"settings");
792 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
793 $ilToolbar->addFormButton($this->lng->txt(
"add_menu_entry"),
"addMenuEntry");
794 $ilToolbar->setCloseFormTag(
false);
797 $form->setOpenTag(
false);
798 $form->setCloseTag(
false);
801 $entries = $this->lmme_obj->getMenuEntries();
802 include_once(
"./Modules/LearningModule/classes/class.ilLMMenuItemsTableGUI.php");
804 $table->setOpenFormTag(
false);
806 $tpl->setContent($form->getHTML().
"<br />".$table->getHTML());
816 $this->
object->setActiveLMMenu((
int)
$_POST[
"cobj_act_lm_menu"]);
817 $this->
object->setActiveTOC((
int) $_POST[
"cobj_act_toc"]);
818 $this->
object->setActivePrintView((
int) $_POST[
"cobj_act_print"]);
819 $this->
object->setActivePreventGlossaryAppendix((
int) $_POST[
"cobj_act_print_prev_glo"]);
820 $this->
object->setHideHeaderFooterPrint((
int) $_POST[
"hide_head_foot_print"]);
821 $this->
object->setActiveDownloads((
int) $_POST[
"cobj_act_downloads"]);
822 $this->
object->setActiveDownloadsPublic((
int) $_POST[
"cobj_act_downloads_public"]);
823 $this->
object->updateProperties();
827 $this->lmme_obj->updateActiveStatus($_POST[
"menu_entries"]);
830 $this->ctrl->redirect($this,
"editMenuProperties");
840 switch ($this->object->getType())
843 $gui_class =
"ilobjlearningmodulegui";
847 $gui_class =
"ilobjdlbookgui";
851 $ilCtrl->setParameterByClass($gui_class,
"active_node",
$_GET[
"active_node"]);
853 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
860 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
863 require_once (
"./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
864 $exp =
new ilLMEditorExplorer($this->ctrl->getLinkTarget($this,
"view"),
867 $exp->setTargetGet(
"obj_id");
868 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"explorer"));
870 if (
$_GET[
"lmmovecopy"] ==
"1")
876 if (
$_GET[
"lmexpand"] ==
"")
878 $mtree =
new ilTree($this->object->getId());
880 $mtree->setTreeTablePK(
"lm_id");
881 $expanded = $mtree->readRootId();
885 $expanded =
$_GET[
"lmexpand"];
887 if (
$_GET[
"active_node"] !=
"")
889 $path = $this->lm_tree->getPathId(
$_GET[
"active_node"]);
890 $exp->setForceOpenPath(
$path);
892 $exp->highlightNode(
$_GET[
"active_node"]);
894 $exp->setExpand($expanded);
898 $output = $exp->getOutput();
901 if ($ilCtrl->isAsynch())
906 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
925 $this->tpl->setCurrentBlock(
"content");
926 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_chap_and_pages"));
927 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
928 $this->tpl->setVariable(
"EXPLORER",$output);
929 $this->ctrl->setParameter($this,
"lmexpand",
$_GET[
"lmexpand"]);
930 $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this,
"explorer"));
931 $this->tpl->parseCurrentBlock();
932 $this->tpl->show(
false);
941 include_once
"./Services/COPage/classes/class.ilWysiwygUtil.php";
942 $popup =
new ilWysiwygUtil();
943 $popup->show(
$_GET[
"ptype"]);
954 $this->
object->executeDragDrop(
$_POST[
"il_hform_source_id"],
$_POST[
"il_hform_target_id"],
956 $ilCtrl->redirect($this,
"chapters");
961 $forms = array(self::CFORM_NEW => $this->
initCreateForm($a_new_type),
971 $a_new_object->setCleanFrames(
true);
975 $a_new_object->createLMTree();
978 $a_new_object->addFirstChapterAndPage();
983 "&baseClass=ilLMEditorGUI");
993 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
997 $this->ctrl->setParameter($this,
"new_type", $new_type);
1000 $form->setTableWidth(
"600px");
1005 $fi->setRequired(
true);
1007 $form->addItem($fi);
1011 $cb->
setInfo($this->lng->txt(
""));
1012 $form->addItem($cb);
1014 $form->addCommandButton(
"importFile", $lng->txt(
"import"));
1015 $form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
1017 $form->setTitle($this->lng->txt(
"import_".$new_type));
1018 $form->setFormAction($ilCtrl->getFormAction($this));
1028 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1030 $bib_gui->setObject($this->
object);
1031 $bibItemName =
$_POST[
"bibItemName"] ?
$_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
1032 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1033 if ($bibItemIndex ==
"")
1035 $bibItemPath =
$_POST[
"bibItemPath"] ?
$_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
1036 if ($bibItemName !=
"")
1038 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
1039 $data = $bib_gui->bib_obj->getElement(
"BibItem");
1040 $bibItemIndex = (count(
$data) - 1);
1046 if ($a_target ==
"")
1048 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1051 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1072 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1074 $bib_gui->setObject($this->
object);
1075 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1076 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
1077 if (strpos($bibItemIndex,
",") > 0)
1079 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
1081 if ($a_target ==
"")
1083 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1086 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1108 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1110 $bib_gui->setObject($this->
object);
1111 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1113 if ($bibItemIndex < 0)
1117 if ($a_target ==
"")
1119 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1122 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1143 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1145 $bib_gui->setObject($this->
object);
1146 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
1148 if ($bibItemIndex < 0)
1152 $bibItemIndex = $bib_gui->save($bibItemIndex);
1154 if ($a_target ==
"")
1156 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
1159 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
1205 global $_FILES, $rbacsystem, $ilDB,
$tpl;
1207 include_once
"./Modules/LearningModule/classes/class.ilObjLearningModule.php";
1209 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
$_GET[
"new_type"]))
1211 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->
ilias->error_obj->MESSAGE);
1216 if ($form->checkInput())
1219 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
1221 $newObj->setType(
$_GET[
"new_type"]);
1222 $newObj->setTitle($_FILES[
"xmldoc"][
"name"]);
1223 $newObj->setDescription(
"");
1224 $newObj->create(
true);
1225 $newObj->createReference();
1226 $newObj->putInTree(
$_GET[
"ref_id"]);
1227 $newObj->setPermissions(
$_GET[
"ref_id"]);
1228 $newObj->notify(
"new",
$_GET[
"ref_id"],
$_GET[
"parent_non_rbac_id"],
$_GET[
"ref_id"],$newObj->getRefId());
1231 $newObj->createLMTree();
1234 $mess = $newObj->importFromZipFile($_FILES[
"xmldoc"][
"tmp_name"], $_FILES[
"xmldoc"][
"name"],
1241 "&baseClass=ilLMEditorGUI");
1245 $link =
'<a href="'.
"ilias.php?ref_id=".$newObj->getRefId().
1246 "&baseClass=ilLMEditorGUI".
'" target="_top">'.$this->lng->txt(
"btn_next").
'</a>';
1247 $tpl->setContent(
"<br />".$link.
"<br /><br />".$mess.$link);
1252 $form->setValuesByPost();
1253 $tpl->setContent($form->getHtml());
1267 $ilCtrl->setParameter($this,
"backcmd",
"chapters");
1269 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
1272 $form_gui->setTitle($this->object->getTitle());
1274 $form_gui->setTree($this->lm_tree);
1275 $form_gui->setMaxDepth(0);
1276 $form_gui->setCurrentTopNodeId($this->tree->getRootId());
1277 $form_gui->addMultiCommand($lng->txt(
"delete"),
"delete");
1278 $form_gui->addMultiCommand($lng->txt(
"cut"),
"cutItems");
1279 $form_gui->addMultiCommand($lng->txt(
"copy"),
"copyItems");
1280 if ($this->object->getLayoutPerPage())
1282 $form_gui->addMultiCommand($lng->txt(
"cont_set_layout"),
"setPageLayoutInHierarchy");
1285 $form_gui->addCommand($lng->txt(
"cont_save_all_titles"),
"saveAllTitles");
1286 $up_gui = ($this->
object->getType() ==
"dbk")
1288 :
"ilobjlearningmodulegui";
1289 $form_gui->setExplorerUpdater(
"tree",
"tree_div",
1290 $ilCtrl->getLinkTargetByClass($up_gui,
"explorer",
"",
true));
1292 $ctpl =
new ilTemplate(
"tpl.chap_and_pages.html",
true,
true,
"Modules/LearningModule");
1293 $ctpl->setVariable(
"HIERARCHY_FORM", $form_gui->getHTML());
1294 $ilCtrl->setParameter($this,
"obj_id",
"");
1296 $ml_head = self::getMultiLangHeader($this->object->getId(), $this);
1298 $this->tpl->setContent($ml_head.$ctpl->get());
1312 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
1316 if ($ot->getContentActivated())
1318 $lng->loadLanguageModule(
"meta");
1321 include_once(
"./Services/COPage/classes/class.ilPageMultiLangGUI.php");
1323 $ml_head = $ml_gui->getMultiLangInfo(
$_GET[
"transl"]);
1326 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
1328 $list->setListTitle($lng->txt(
"actions"));
1329 $list->setId(
"copage_act");
1331 if (!in_array(
$_GET[
"transl"], array(
"",
"-")))
1333 $l = $ot->getMasterLanguage();
1334 $list->addItem($lng->txt(
"cont_edit_language_version").
": ".
1335 $lng->txt(
"meta_l_".$l),
"",
1336 $ilCtrl->getLinkTarget($a_gui_class,
"editMasterLanguage"));
1340 foreach ($ot->getLanguages() as $al =>
$lang)
1342 if (
$_GET[
"transl"] != $al &&
1343 $al != $ot->getMasterLanguage())
1345 $ilCtrl->setParameter($a_gui_class,
"totransl", $al);
1346 $list->addItem($lng->txt(
"cont_edit_language_version").
": ".
1347 $lng->txt(
"meta_l_".$al),
"",
1348 $ilCtrl->getLinkTarget($a_gui_class,
"switchToLanguage"));
1349 $ilCtrl->setParameter($a_gui_class,
"totransl",
$_GET[
"totransl"]);
1356 $ml_head =
'<div class="ilFloatLeft">'.$ml_head.
'</div><div style="margin: 5px 0;" class="small ilRight">'.$list->getHTML().
"</div>";
1377 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1378 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1379 $ilToolbar->addButton($lng->txt(
"pg_add"),
1380 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create"));
1381 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1383 include_once(
"./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
1385 $tpl->setContent(
$t->getHTML());
1391 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.all_pages.html",
"Modules/LearningModule");
1394 $this->tpl->setCurrentBlock(
"form");
1395 $this->ctrl->setParameter($this,
"backcmd",
"pages");
1396 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1397 $this->tpl->setVariable(
"HEADER_TEXT", $this->lng->txt(
"cont_pages"));
1398 $this->tpl->setVariable(
"CONTEXT", $this->lng->txt(
"cont_usage"));
1403 foreach ($pages as $page)
1405 $this->tpl->setCurrentBlock(
"table_row");
1408 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1411 $lm_set->get(
"time_scheduled_page_activation"));
1414 $img_sc = (
$lm_set->get(
"time_scheduled_page_activation") &&
1422 $this->tpl->setVariable(
"IMG_ALT",
1423 $this->lng->txt(
"cont_page_deactivated"));
1428 $this->object->getType()))
1431 $this->tpl->setVariable(
"IMG_ALT",
1432 $this->lng->txt(
"cont_page_deactivated_elements"));
1437 $this->tpl->setVariable(
"IMG_ALT",
1438 $this->lng->txt(
"pg"));
1446 $this->tpl->setVariable(
"CHECKBOX_ID", $page[
"obj_id"]);
1447 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1450 $this->ctrl->setParameter($this,
"backcmd",
"");
1451 $this->ctrl->setParameterByClass(
"ilLMPageObjectGUI",
"obj_id", $page[
"obj_id"]);
1453 $this->tpl->setVariable(
"LINK_TARGET",
1454 $this->ctrl->getLinkTargetByClass(
"ilLMPageObjectGUI",
"edit"));
1457 $this->tpl->setVariable(
"TEXT_CONTENT", $page[
"title"]);
1460 if ($this->lm_tree->isInTree($page[
"obj_id"]))
1471 if ($page[
"obj_id"] == $this->object->getHeaderPage())
1473 $add_str =
" <b>(".$this->lng->txt(
"cont_header").
")</b>";
1475 if ($page[
"obj_id"] == $this->object->getFooterPage())
1477 $add_str =
" <b>(".$this->lng->txt(
"cont_footer").
")</b>";
1480 $this->tpl->setVariable(
"TEXT_CONTEXT", $path_str.$add_str);
1483 $this->tpl->parseCurrentBlock();
1487 $this->tpl->setCurrentBlock(
"notfound");
1488 $this->tpl->setVariable(
"NUM_COLS", 4);
1489 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1490 $this->tpl->parseCurrentBlock();
1494 $acts = array(
"delete" =>
"delete",
"movePage" =>
"movePage",
"copyPage" =>
"copyPage",
1495 "selectHeader" =>
"selectHeader",
"selectFooter" =>
"selectFooter",
1496 "activatePages" =>
"cont_de_activate");
1500 $acts[
"pastePage"] =
"pastePage";
1508 $this->tpl->setVariable(
"NUM_COLS", 4);
1521 $this->tpl->setVariable(
"NUM_COLS", 4);
1523 $subobj = array(
"pg");
1525 $this->tpl->setCurrentBlock(
"add_object");
1526 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1527 $this->tpl->setVariable(
"BTN_NAME",
"create");
1528 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"create"));
1529 $this->tpl->parseCurrentBlock();
1532 $this->tpl->setCurrentBlock(
"form");
1533 $this->tpl->parseCurrentBlock();
1547 include_once(
"./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
1549 $this->object->getId(), $this->
object->getType());
1551 $tpl->setContent($table_gui->getHTML());
1559 global
$tpl, $ilToolbar;
1564 $ilToolbar->addButton($this->lng->txt(
"cont_fix_tree"),
1565 $this->ctrl->getLinkTarget($this,
"fixTreeConfirm"));
1573 if (is_array(
$_POST[
"id"]))
1575 foreach(
$_POST[
"id"] as $id)
1577 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1583 $this->ctrl->redirect($this,
"pages");
1593 $this->
ilias->raiseError($this->lng->txt(
"no_page_in_clipboard"),$this->
ilias->error_obj->MESSAGE);
1604 == $this->object->getID())
1607 $new_page =& $lm_page->copy();
1608 $id = $new_page->getId();
1614 $lm_obj =& $this->
ilias->obj_factory->getInstanceByObjId($lm_id);
1616 $copied_nodes = array();
1617 $new_page =& $lm_page->copyToOtherContObject($this->
object, $copied_nodes);
1618 $id = $new_page->getId();
1628 != $this->object->getID())
1631 $lm_obj =& $this->
ilias->obj_factory->getInstanceByObjId($lm_id);
1633 $lm_page->setLMId($this->object->getID());
1635 $page =& $lm_page->getPageObject();
1637 $page->setParentId($this->object->getID());
1644 $this->ctrl->redirect($this,
"pages");
1656 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1663 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_copied"),
true);
1665 $this->ctrl->redirect($this,
"pages");
1675 function delete($a_parent_subobj_id = 0)
1679 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1684 $this->
ilias->raiseError($this->lng->txt(
"cont_select_item"), $this->
ilias->error_obj->MESSAGE);
1687 if ($a_parent_subobj_id == 0)
1692 if ($a_parent_subobj_id != 0)
1694 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd",
$_GET[
"backcmd"]);
1695 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1696 $form_action = $this->ctrl->getFormActionByClass(
"ilStructureObjectGUI");
1700 $this->ctrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
1701 $form_action = $this->ctrl->getFormAction($this);
1705 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1707 $cgui->setFormAction($form_action);
1708 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1709 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDelete");
1710 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDelete");
1712 foreach(
$_POST[
"id"] as $id)
1718 " ".$obj->getTitle();
1720 $cgui->addItem(
"id[]", $id, $caption);
1724 $this->tpl->setContent($cgui->getHTML());
1732 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1746 $tree->setTableNames(
'lm_tree',
'lm_data');
1747 $tree->setTreeTablePK(
"lm_id");
1752 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1756 foreach (
$_POST[
"id"] as $id)
1761 $node_data =
$tree->getNodeData($id);
1762 if (is_object($obj))
1764 $obj->setLMId($this->object->getId());
1766 include_once(
"./Services/History/classes/class.ilHistory.php");
1769 $this->
object->getType());
1773 if(
$tree->isInTree($id))
1775 $tree->deleteTree($node_data);
1781 $this->
object->checkTree();
1786 if ($a_parent_subobj_id == 0)
1788 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1804 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1807 for ($i = 1; $i < (count($tmpPath) - 1); $i++)
1814 $path .= $tmpPath[$i][
"title"];
1829 foreach ($a_actions as $name =>
$lng)
1831 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1834 $notoperations = array();
1836 $operations = array();
1842 if (!in_array($row[
"name"], $notoperations))
1844 $operations[] =
$row;
1849 if (count($operations)>0)
1851 foreach ($operations as $val)
1853 $this->tpl->setCurrentBlock(
"operation_btn");
1854 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1855 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
1856 $this->tpl->parseCurrentBlock();
1859 $this->tpl->setCurrentBlock(
"operation");
1861 $this->tpl->parseCurrentBlock();
1872 $this->
setFormAction(
"addRole", $this->ctrl->getLinkTarget($this,
"addRole"));
1873 $this->
setFormAction(
"permSave", $this->ctrl->getLinkTarget($this,
"permSave"));
1874 $this->permObject();
1883 $this->
setReturnLocation(
"permSave", $this->ctrl->getLinkTarget($this,
"perm"));
1884 $this->permSaveObject();
1893 $this->infoObject();
1903 $this->addRoleObject();
1913 $this->ownerObject();
1922 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
1925 parent::viewObject();
1941 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1944 if(count(
$_POST[
"id"]) > 1)
1946 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->
ilias->error_obj->MESSAGE);
1951 $this->
ilias->raiseError($this->lng->txt(
"cont_select_item"), $this->
ilias->error_obj->MESSAGE);
1959 if ($a_parent_subobj_id == 0)
1961 $this->ctrl->redirect($this,
"chapters");
1991 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1994 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_cut"),
true);
2000 $this->ctrl->redirect($this,
"pages");
2008 if (
$_GET[
"new_type"] ==
"pg")
2010 $this->ctrl->redirect($this,
"pages");
2014 $this->ctrl->redirect($this,
"chapters");
2024 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2026 $cont_exp->buildExportFile();
2037 $changelink =
"<a href='".$ilCtrl->getLinkTarget($this,
"editMenuProperties").
"'>".$lng->txt(
"change").
"</a>";
2038 if (!$this->object->isActiveLMMenu())
2040 $add =
"<br />".$lng->txt(
"cont_download_no_menu").
" ".$changelink;
2042 else if (!$this->object->isActiveDownloads())
2044 $add =
"<br />".$lng->txt(
"cont_download_no_download").
" ".$changelink;
2048 if ($this->object->getPublicExportFile($a_type) == $a_file)
2050 return $lng->txt(
"yes").$add;
2065 if(!isset($a_files))
2071 foreach ($a_files as $f)
2073 $file = explode(
":", $f);
2074 $export_dir = $this->
object->getExportDirectory(
$file[0]);
2076 if ($this->object->getPublicExportFile(
$file[0]) ==
2079 $this->
object->setPublicExportFile(
$file[0],
"");
2083 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
2086 $this->
object->update();
2088 $ilCtrl->redirectByClass(
"ilexportgui");
2096 if(!isset(
$_POST[
"file"]))
2098 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
2101 if (count(
$_POST[
"file"]) > 1)
2103 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->
ilias->error_obj->MESSAGE);
2107 $export_dir = $this->
object->getOfflineDirectory();
2125 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2127 $cgui->setFormAction($this->ctrl->getFormAction($this));
2128 $cgui->setHeaderText($this->lng->txt(
"cont_fix_tree_confirm"));
2129 $cgui->setCancel($this->lng->txt(
"cancel"),
"showMaintenance");
2130 $cgui->setConfirm($this->lng->txt(
"cont_fix_tree"),
"fixTree");
2132 $this->tpl->setContent($cgui->getHTML());
2140 $this->
object->fixTree();
2142 $this->ctrl->redirect($this,
"showMaintenance");
2149 $a_active =
"content", $a_use_global_tabs =
false, $a_as_subtabs =
false,
2152 global
$ilCtrl,
$ilUser, $ilAccess, $ilTabs, $rbacsystem, $ilPluginAdmin, $ilHelp;
2154 $ilHelp->setScreenIdComponent(
"lm");
2158 $addcmd =
"addSubTabTarget";
2159 $getcmd =
"getSubTabHTML";
2163 $addcmd =
"addTarget";
2164 $getcmd =
"getHTML";
2167 $active[$a_active] =
true;
2169 if (!$this->object->isActiveLMMenu())
2174 if ($a_use_global_tabs)
2176 $tabs_gui = $ilTabs;
2186 $showViewInFrameset =
true;
2188 if ($showViewInFrameset && !$a_offline)
2194 $buttonTarget =
"_top";
2197 if ($a_export_format ==
"scorm")
2202 include_once(
"./Services/Payment/classes/class.ilPaymentObject.php");
2206 if (!$a_offline && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2208 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2209 $tabs_gui->$addcmd(
"content",
2210 $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"layout"),
2211 "",
"", $buttonTarget, $active[
"content"]);
2212 if ($active[
"content"])
2214 $ilHelp->setScreenId(
"content");
2215 $ilHelp->setSubScreenId(
"content");
2220 if (!$requires_purchase_to_access && $this->object->isActiveTOC() && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2224 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2225 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showTableOfContents");
2229 $link =
"./table_of_contents.html";
2232 $tabs_gui->$addcmd(
"cont_toc", $link,
2233 "",
"", $buttonTarget, $active[
"toc"]);
2237 if (!$requires_purchase_to_access && $this->object->isActivePrintView() && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2241 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2242 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showPrintViewSelection");
2243 $tabs_gui->$addcmd(
"cont_print_view", $link,
2244 "",
"", $buttonTarget, $active[
"print"]);
2249 if (!$requires_purchase_to_access && $ilUser->getId() == ANONYMOUS_USER_ID)
2251 $is_public = $this->
object->isActiveDownloadsPublic();
2253 else if(!$requires_purchase_to_access)
2258 if (!$requires_purchase_to_access && $this->object->isActiveDownloads() && !$a_offline && $is_public &&
2259 $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2261 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2262 $link = $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showDownloadList");
2263 $tabs_gui->$addcmd(
"download", $link,
2264 "",
"", $buttonTarget, $active[
"download"]);
2268 if ($a_export_format !=
"scorm" && !$a_offline)
2272 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $_GET[
"obj_id"]);
2273 $link = $this->ctrl->getLinkTargetByClass(
2274 array(
"illmpresentationgui",
"ilinfoscreengui"),
"showSummary");
2278 $link =
"./info.html";
2281 $tabs_gui->$addcmd(($requires_purchase_to_access ?
'buy' :
'info_short'), $link,
2282 "",
"", $buttonTarget, $active[
"info"]);
2285 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2287 $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]) &&
2290 include_once
'./Services/Object/classes/class.ilObjectLP.php';
2294 $tabs_gui->$addcmd(
"learning_progress",
2295 $this->ctrl->getLinkTargetByClass(array(
"illmpresentationgui",
"illearningprogressgui"),
"editmanual"),
2296 "",
"", $buttonTarget, $active[
"learning_progress"]);
2300 $tabs_gui->$addcmd(
"learning_progress",
2301 $this->ctrl->getLinkTargetByClass(array(
"illmpresentationgui",
"illearningprogressgui"),
"showtlt"),
2302 "",
"", $buttonTarget, $active[
"learning_progress"]);
2307 if (!$a_offline && $a_cur_page > 0)
2309 if ($rbacsystem->checkAccess(
"write", $_GET[
"ref_id"]))
2312 $page_id = $a_cur_page;
2313 $tabs_gui->$addcmd(
"edit_page", ILIAS_HTTP_PATH.
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=".$_GET[
"ref_id"].
2314 "&obj_id=".$page_id.
"&to_page=1",
2315 "",
"", $buttonTarget, $active[
"edit_page"]);
2319 if(!$requires_purchase_to_access)
2323 $entries = $this->lmme_obj->getMenuEntries(
true);
2325 if (count($entries) > 0 && $ilAccess->checkAccess(
"read",
"", $_GET[
"ref_id"]))
2327 foreach ($entries as $entry)
2330 if ($entry[
"type"] ==
"intern")
2332 $entry[
"link"] = ILIAS_HTTP_PATH.
"/goto.php?target=".$entry[
"link"];
2336 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:'))
2338 $entry[
"link"] =
"http://".$entry[
"link"];
2341 if (!strstr($entry[
"link"],
'mailto:'))
2345 $tabs_gui->$addcmd($entry[
"title"],
2347 "",
"",
"_blank",
"",
true);
2353 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
2354 $plugin_html =
false;
2355 foreach ($pl_names as $pl)
2358 $gui_class = $ui_plugin->getUIClassInstance();
2359 $resp = $gui_class->modifyGUI(
"Modules/LearningModule",
"lm_menu_tabs",
2360 array(
"lm_menu_tabs" => $tabs_gui));
2364 return $tabs_gui->$getcmd();
2372 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2374 $cont_exp->buildExportFile();
2375 $this->offlineList();
2383 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
2386 if ($ot->getContentActivated())
2388 $format = explode(
"_",
$_POST[
"format"]);
2391 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2393 $cont_exp->buildExportFile();
2403 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2405 $cont_exp->buildExportFile();
2419 $par_id = $tree->getParentId(
$_GET[
"ref_id"]);
2423 if($par_id != ROOT_FOLDER_ID)
2425 $this->ctrl->addLocation(
"...",
2432 if ($parent_title ==
"ILIAS")
2434 $parent_title = $lng->txt(
"repository");
2438 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $par_id);
2439 $this->ctrl->addLocation($parent_title,
2440 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
2442 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
2444 if (!$a_omit_obj_id)
2448 $lmtree =& $this->
object->getTree();
2456 $path = $lmtree->getPathFull($lmtree->getRootId());
2459 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
2468 if (
$row[
"child"] == 1)
2470 $this->ctrl->setParameter($this,
"obj_id",
"");
2471 $this->ctrl->addLocation(
2472 $this->object->getTitle(),
2473 $this->ctrl->getLinkTarget($this,
"chapters"),
"",
$_GET[
"ref_id"]);
2477 $title =
$row[
"title"];
2478 switch(
$row[
"type"])
2481 $this->ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id",
$row[
"child"]);
2482 $this->ctrl->addLocation(
2484 $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
2488 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$row[
"child"]);
2489 $this->ctrl->addLocation(
2491 $this->ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
2496 if (!$a_omit_obj_id)
2498 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
2520 include_once(
"./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
2522 $tpl->setContent($table->getHTML());
2536 global
$lng, $ilHelp;
2538 $ilHelp->setScreenIdComponent(
"lm");
2541 $this->tpl->setTitle($this->object->getTitle());
2543 $lng->txt(
"obj_lm"));
2559 $ilTabs->addSubtab(
"chapters",
2560 $lng->txt(
"cont_chapters"),
2561 $ilCtrl->getLinkTarget($this,
"chapters"));
2564 $ilTabs->addSubtab(
"pages",
2565 $lng->txt(
"cont_all_pages"),
2566 $ilCtrl->getLinkTarget($this,
"pages"));
2569 $ilTabs->addSubtab(
"questions",
2570 $lng->txt(
"objs_qst"),
2571 $ilCtrl->getLinkTarget($this,
"listQuestions"));
2574 if (
$lm_set->get(
"html_export_ids"))
2578 $ilTabs->addSubtab(
"export_ids",
2579 $lng->txt(
"cont_html_export_ids"),
2580 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview"));
2585 $lng->loadLanguageModule(
"help");
2586 $ilTabs->addSubtab(
"export_ids",
2587 $lng->txt(
"cont_online_help_ids"),
2588 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview"));
2590 $ilTabs->addSubtab(
"help_tooltips",
2591 $lng->txt(
"help_tooltips"),
2592 $ilCtrl->getLinkTarget($this,
"showTooltipList"));
2596 $ilTabs->addSubtab(
"internal_links",
2597 $lng->txt(
"cont_internal_links"),
2598 $ilCtrl->getLinkTarget($this,
"listLinks"));
2601 if ($this->object->getType() ==
"lm")
2603 if(@include_once(
'HTTP/Request.php'))
2605 $ilTabs->addSubtab(
"link_check",
2606 $lng->txt(
"link_check"),
2607 $ilCtrl->getLinkTarget($this,
"linkChecker"));
2612 $ilTabs->addSubtab(
"maintenance",
2613 $lng->txt(
"cont_maintenance"),
2614 $ilCtrl->getLinkTarget($this,
"showMaintenance"));
2616 $ilTabs->activateSubTab($a_active);
2617 $ilTabs->activateTab(
"content");
2627 $tabs_gui = $ilTabs;
2630 $ilTabs->addTab(
"content",
2631 $lng->txt(
"content"),
2632 $this->ctrl->getLinkTarget($this,
"chapters"));
2635 $ilTabs->addTab(
"info",
2636 $lng->txt(
"info_short"),
2637 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary'));
2640 $ilTabs->addTab(
"settings",
2641 $lng->txt(
"settings"),
2642 $this->ctrl->getLinkTarget($this,
'properties'));
2646 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2649 $ilTabs->addTab(
'learning_progress',
2650 $lng->txt(
"learning_progress"),
2651 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
''));
2654 if ($this->object->getType() !=
"lm")
2657 $ilTabs->addTab(
"bib_data",
2658 $lng->txt(
"bib_data"),
2659 $this->ctrl->getLinkTarget($this,
"editBibItem"));
2663 $ilTabs->addTab(
"history",
2664 $lng->txt(
"history"),
2665 $this->ctrl->getLinkTarget($this,
"history"));
2668 $ilTabs->addTab(
"meta",
2669 $lng->txt(
"meta_data"),
2670 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''));
2672 if ($this->object->getType() ==
"lm")
2675 $ilTabs->addTab(
"export",
2676 $lng->txt(
"export"),
2677 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
2681 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
2683 $ilTabs->addTab(
"perm",
2684 $lng->txt(
"perm_settings"),
2685 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
2690 $ilTabs->activateTab($a_act);
2694 $ilTabs->addNonTabbedLink(
"pres_mode", $lng->txt(
"cont_presentation_view"),
2695 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->object->getRefID(),
"_top");
2705 if (in_array($a_active,
2706 array(
"cont_general_properties",
"cont_style",
"cont_lm_menu",
"public_section",
2707 "cont_glossaries",
"cont_multilinguality",
"obj_multilinguality")))
2710 $ilTabs->addSubTabTarget(
"cont_general_properties",
2711 $this->ctrl->getLinkTarget($this,
'properties'),
2715 $ilTabs->addSubTabTarget(
"cont_style",
2716 $this->ctrl->getLinkTarget($this,
'editStyleProperties'),
2720 $ilTabs->addSubTabTarget(
"cont_lm_menu",
2721 $this->ctrl->getLinkTarget($this,
'editMenuProperties'),
2725 $ilTabs->addSubTabTarget(
"cont_glossaries",
2726 $this->ctrl->getLinkTarget($this,
'editGlossaries'),
2729 if ($ilSetting->get(
"pub_section"))
2731 if ($this->object->getType() !=
"dbk")
2734 $ilTabs->addSubTabTarget(
"public_section",
2735 $this->ctrl->getLinkTarget($this,
'editPublicSection'),
2745 $ilTabs->addSubTabTarget(
"obj_multilinguality",
2746 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""));
2748 $ilTabs->setSubTabActive($a_active);
2754 global $ilTabs, $ilToobar, $ilAccess;
2757 if (!$ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
"read",
"", $this->object->getRefId()))
2764 $ilTabs->setTabActive(
"settings");
2766 switch ($this->object->getType())
2769 $gui_class =
"ilobjlearningmodulegui";
2773 $gui_class =
"ilobjdlbookgui";
2777 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_public_selector.html",
2778 "Modules/LearningModule");
2785 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
2786 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2788 $si->setOptions($modes);
2789 $si->setValue($this->object->getPublicAccessMode());
2790 $my_toolbar->addInputItem(
$si,
true);
2791 $my_toolbar->setOpenFormTag(
false);
2792 $my_toolbar->setCloseFormTag(
false);
2793 $my_toolbar->addFormButton($this->lng->txt(
"save"),
"savePublicSection");
2794 $this->tpl->setVariable(
"TOOLBAR", $my_toolbar->getHTML());
2795 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
2797 if ($this->object->getPublicAccessMode() ==
"selected")
2799 $this->tpl->setCurrentBlock(
"select_pages");
2800 require_once (
"./Modules/LearningModule/classes/class.ilPublicSectionSelector.php");
2808 $output = $exp->getOutput();
2811 foreach ($exp->format_options as $node)
2813 if (!$node[
"container"])
2815 $pages[] = $node[
"child"];
2820 $this->tpl->setVariable(
"EXPLORER",$output);
2821 $this->tpl->setVariable(
"ONCLICK",$js_pages);
2822 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
2823 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
2824 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2826 $this->tpl->parseCurrentBlock();
2833 $this->
object->setPublicAccessMode(
$_POST[
"lm_public_mode"]);
2834 $this->
object->updateProperties();
2837 $this->ctrl->redirect($this,
"editPublicSection");
2849 require_once(
"./Services/History/classes/class.ilHistoryGUI.php");
2851 $this->
object->getType());
2853 $this->ctrl->getParameterArray($this,
"history"),
2854 $this->
object->isActiveHistoryUserComments()
2857 $this->tpl->setVariable(
"ADM_CONTENT", $hist_html);
2872 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
2874 $actions->setSelectionHeaderClass(
'small');
2875 $actions->setItemLinkClass(
'xsmall');
2876 $actions->setListTitle($this->lng->txt(
'actions'));
2878 $this->ctrl->setParameterByClass(
'ilLMPageObjectGUI',
'obj_id', $row[
'page_id']);
2880 $this->lng->txt(
'edit'),
2882 $this->ctrl->getLinkTargetByClass(
'ilLMPageObjectGUI',
'edit')
2884 $this->ctrl->clearParametersByClass(
'ilLMPageObjectGUI');
2885 $row[
'action_html'] =
$actions->getHTML();
2899 require_once
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
2904 include_once
"Services/Cron/classes/class.ilCronManager.php";
2907 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2908 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2910 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
2913 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
2915 $toolbar->addInputItem($chb);
2916 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
2917 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
2921 $tgui->setLinkChecker($this->link_checker_obj)
2922 ->setRowHandler($this)
2923 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
2925 return $tpl->setContent($tgui->prepareHTML()->getHTML().$toolbar->getHTML());
2932 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2935 $link_check_notify->setUserId($ilUser->getId());
2936 $link_check_notify->setObjId($this->object->getId());
2938 if(
$_POST[
'link_check_message'])
2941 $link_check_notify->addNotifier();
2946 $link_check_notify->deleteNotifier();
2959 if(!$this->link_checker_obj->checkPear())
2967 $this->link_checker_obj->checkLinks();
2979 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
2982 $this->link_checker_obj->setObjId($this->object->getId());
2989 include_once
'./Modules/LearningModule/classes/class.ilLMMenuEditor.php';
2992 $this->lmme_obj->setObjId($this->object->getId());
3006 $ilTabs->setTabActive(
"settings");
3009 $ilToolbar->addButton($this->lng->txt(
"lm_menu_select_internal_object"),
3010 $ilCtrl->getLinkTarget($this,
"showEntrySelector"));
3013 $this->tpl->setContent($form->getHTML());
3025 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3029 $ti =
new ilTextInputGUI($this->lng->txt(
"lm_menu_entry_title"),
"title");
3032 $form->addItem($ti);
3035 $ta =
new ilTextInputGUI($this->lng->txt(
"lm_menu_entry_target"),
"target");
3038 $form->addItem($ta);
3040 if ($a_mode ==
"edit")
3043 $this->lmme_obj->readEntry(
$_REQUEST[
"menu_entry"]);
3044 $ti->setValue($this->lmme_obj->getTitle());
3045 $ta->setValue($this->lmme_obj->getTarget());
3048 if (isset(
$_GET[
"link_ref_id"]))
3050 $link_ref_id = (int)
$_GET[
"link_ref_id"];
3055 $target_link = $obj_type.
"_".$link_ref_id;
3056 $ti->setValue($title);
3057 $ta->setValue($target_link);
3061 $hi->setValue($link_ref_id);
3062 $form->addItem($hi);
3067 if ($a_mode ==
"create")
3069 $form->addCommandButton(
"saveMenuEntry", $lng->txt(
"save"));
3070 $form->addCommandButton(
"editMenuProperties", $lng->txt(
"cancel"));
3071 $form->setTitle($lng->txt(
"lm_menu_new_entry"));
3075 $form->addCommandButton(
"updateMenuEntry", $lng->txt(
"save"));
3076 $form->addCommandButton(
"editMenuProperties", $lng->txt(
"cancel"));
3077 $form->setTitle($lng->txt(
"lm_menu_edit_entry"));
3080 $form->setFormAction($ilCtrl->getFormAction($this));
3093 if (empty(
$_POST[
"title"]))
3097 $ilCtrl->redirect($this,
"addMenuEntry");
3099 if (empty(
$_POST[
"target"]))
3103 $ilCtrl->redirect($this,
"addMenuEntry");
3107 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3108 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3109 $this->lmme_obj->setLinkRefId(
$_POST[
"link_ref_id"]);
3111 if (
$_POST[
"link_ref_id"])
3113 $this->lmme_obj->setLinkType(
"intern");
3116 $this->lmme_obj->create();
3119 $this->ctrl->redirect($this,
"editMenuProperties");
3127 if (empty(
$_GET[
"menu_entry"]))
3129 $this->
ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->
ilias->error_obj->MESSAGE);
3133 $this->lmme_obj->delete(
$_GET[
"menu_entry"]);
3136 $this->ctrl->redirect($this,
"editMenuProperties");
3146 if (empty(
$_GET[
"menu_entry"]))
3148 $this->
ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->
ilias->error_obj->MESSAGE);
3151 $ilCtrl->saveParameter($this, array(
"menu_entry"));
3152 $ilToolbar->addButton($this->lng->txt(
"lm_menu_select_internal_object"),
3153 $ilCtrl->getLinkTarget($this,
"showEntrySelector"));
3156 $this->tpl->setContent($form->getHTML());
3166 $this->
ilias->raiseError($this->lng->txt(
"no_menu_entry_id"),$this->
ilias->error_obj->MESSAGE);
3170 if (empty(
$_POST[
"title"]))
3172 $this->
ilias->raiseError($this->lng->txt(
"please_enter_title"),$this->
ilias->error_obj->MESSAGE);
3174 if (empty(
$_POST[
"target"]))
3176 $this->
ilias->raiseError($this->lng->txt(
"please_enter_target"),$this->
ilias->error_obj->MESSAGE);
3180 $this->lmme_obj->readEntry(
$_REQUEST[
"menu_entry"]);
3181 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3182 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3183 $this->lmme_obj->update();
3186 $this->ctrl->redirect($this,
"editMenuProperties");
3195 $ilTabs->setTabActive(
"settings");
3198 $ilCtrl->saveParameter($this, array(
"menu_entry"));
3200 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_menu_object_selector.html",
"Modules/LearningModule");
3204 require_once (
"./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
3207 $exp->
setExpand(
$_GET[
"lm_menu_expand"] ?
$_GET[
"lm_menu_expand"] : $this->tree->readRootId());
3208 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showEntrySelector'));
3209 $exp->setTargetGet(
"ref_id");
3210 $exp->setRefId($this->cur_ref_id);
3212 $sel_types = array(
'mcst',
'mep',
'cat',
'lm',
'dbk',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
3213 "crs",
"grp",
"book",
"tst",
"file");
3214 $exp->setSelectableTypes($sel_types);
3220 $output = $exp->getOutput();
3223 foreach ($exp->format_options as $node)
3225 if (!$node[
"container"])
3227 $pages[] = $node[
"child"];
3234 $this->tpl->setVariable(
"TXT_SET_PUBLIC_MODE", $this->lng->txt(
"set_public_mode"));
3235 $this->tpl->setVariable(
"TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt(
"choose_public_mode"));
3236 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
3237 $select_public_mode =
ilUtil::formSelect ($this->object->getPublicAccessMode(),
"lm_public_mode",$modes,
false,
true);
3238 $this->tpl->setVariable(
"SELECT_PUBLIC_MODE", $select_public_mode);
3240 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"choose_public_pages"));
3241 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
3242 $this->tpl->setVariable(
"EXPLORER",$output);
3243 $this->tpl->setVariable(
"ONCLICK",$js_pages);
3244 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
3245 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
3246 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
3247 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
3258 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
3260 if(count(
$_POST[
"id"]) > 1)
3262 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->
ilias->error_obj->MESSAGE);
3264 if (
$_POST[
"id"][0] != $this->object->getHeaderPage())
3266 $this->
object->setHeaderPage(
$_POST[
"id"][0]);
3270 $this->
object->setHeaderPage(0);
3272 $this->
object->updateProperties();
3273 $this->ctrl->redirect($this,
"pages");
3283 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
3285 if(count(
$_POST[
"id"]) > 1)
3287 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->
ilias->error_obj->MESSAGE);
3289 if (
$_POST[
"id"][0] != $this->object->getFooterPage())
3291 $this->
object->setFooterPage(
$_POST[
"id"][0]);
3295 $this->
object->setFooterPage(0);
3297 $this->
object->updateProperties();
3298 $this->ctrl->redirect($this,
"pages");
3310 $ilCtrl->redirect($this,
"chapters");
3320 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3327 $parent_id = $this->lm_tree->getParentId($node_id);
3332 $parent_id = $node_id;
3336 for ($i = 1; $i <= $num; $i++)
3339 $chap->setType(
"st");
3340 $chap->setTitle($lng->txt(
"cont_new_chap"));
3341 $chap->setLMId($this->object->getId());
3346 $ilCtrl->redirect($this,
"chapters");
3356 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3361 $ilLog->write(
"InsertChapterClip, num: $num, node_id: $node_id, ".
3366 $parent_id = $this->lm_tree->getParentId($node_id);
3371 $parent_id = $node_id;
3376 $chapters = $ilUser->getClipboardObjects(
"st",
true);
3377 $copied_nodes = array();
3378 foreach ($chapters as $chap)
3380 $ilLog->write(
"Call pasteTree, Target LM: ".$this->object->getId().
", Chapter ID: ".$chap[
"id"]
3381 .
", Parent ID: ".$parent_id.
", Target: ".$target);
3383 $target, $chap[
"insert_time"], $copied_nodes,
3391 $ilUser->clipboardDeleteObjectsOfType(
"pg");
3392 $ilUser->clipboardDeleteObjectsOfType(
"st");
3396 $this->
object->checkTree();
3397 $ilCtrl->redirect($this,
"chapters");
3409 if ($ilAccess->checkAccess(
"read",
"", $a_target))
3411 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3412 $_GET[
"ref_id"] = $a_target;
3413 include(
"ilias.php");
3415 }
else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
3417 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3418 $_GET[
"ref_id"] = $a_target;
3419 $_GET[
"cmd"] =
"infoScreen";
3420 include(
"ilias.php");
3423 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
3431 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
3442 if (!is_array($items))
3445 $ilCtrl->redirect($this, $a_return);
3449 foreach($items as $k => $item)
3456 foreach($todel as $k)
3464 $ilCtrl->redirect($this, $a_return);
3475 if (!is_array($items))
3478 $ilCtrl->redirect($this,
"chapters");
3482 foreach($items as $k => $item)
3489 foreach($todel as $k)
3496 $ilCtrl->redirect($this,
"chapters");
3527 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3528 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
3529 $lm_tree = $this->
object->getTree();
3530 $childs = $lm_tree->getChilds($lm_tree->readRootId());
3531 $options = array(
"" => $lng->txt(
"all"));
3532 foreach ($childs as $c)
3534 $options[$c[
"child"]] = $c[
"title"];
3539 $ilToolbar->addInputItem(
$si,
true);
3540 $ilToolbar->addFormButton($lng->txt(
"help_filter"),
"filterHelpChapters");
3542 include_once(
"./Modules/LearningModule/classes/class.ilHelpMappingTableGUI.php");
3547 include_once(
"./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
3551 $tpl->setContent($tbl->getHTML());
3565 $ilCtrl->redirect($this,
"showExportIDsOverview");
3578 if (is_array(
$_POST[
"exportid"]))
3580 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id)
3582 if ($exp_id !=
"" && !preg_match(
"/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
3592 $lng->txt(
"cont_exp_ids_not_resp_format3").
" ".
3593 $lng->txt(
"cont_exp_ids_not_resp_format2"));
3599 if (is_array(
$_POST[
"exportid"]))
3601 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id)
3609 $ilCtrl->redirect($this,
"showExportIdsOverview");
3622 include_once(
"./Services/Help/classes/class.ilHelpMapping.php");
3623 if (is_array(
$_POST[
"screen_ids"]))
3625 foreach (
$_POST[
"screen_ids"] as $chap => $ids)
3627 $ids = explode(
"\n", $ids);
3632 $ilCtrl->redirect($this,
"showExportIdsOverview");
3652 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3653 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
3654 $ti =
new ilTextInputGUI($this->lng->txt(
"help_tooltip_id"),
"tooltip_id");
3657 $ilToolbar->addInputItem($ti,
true);
3658 $ilToolbar->addFormButton($lng->txt(
"add"),
"addTooltip");
3659 $ilToolbar->addSeparator();
3661 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
3670 $ilToolbar->addInputItem(
$si,
true);
3671 $ilToolbar->addFormButton($lng->txt(
"help_filter"),
"filterTooltips");
3673 include_once(
"./Modules/LearningModule/classes/class.ilHelpTooltipTableGUI.php");
3676 $tpl->setContent($tbl->getHTML());
3690 if (trim($tt_id) !=
"")
3692 if (is_int(strpos($tt_id,
"_")))
3694 include_once(
"./Services/Help/classes/class.ilHelp.php");
3698 $fu = strpos($tt_id,
"_");
3699 $comp = substr($tt_id, 0, $fu);
3707 $ilCtrl->redirect($this,
"showTooltipList");
3721 $ilCtrl->redirect($this,
"showTooltipList");
3735 include_once(
"./Services/Help/classes/class.ilHelp.php");
3737 if (is_array(
$_POST[
"text"]))
3739 foreach (
$_POST[
"text"] as $id => $text)
3746 $ilCtrl->redirect($this,
"showTooltipList");
3756 if (is_array(
$_POST[
"id"]))
3758 include_once(
"./Services/Help/classes/class.ilHelp.php");
3759 foreach (
$_POST[
"id"] as $id)
3765 $ilCtrl->redirect($this,
"showTooltipList");
3807 if ($a_def_option !=
"")
3813 $layout->addOption(
new ilRadioOption(
"<table><tr><td>".$im_tag.
"</td><td><b>".
3814 $lng->txt(
"cont_lm_default_layout").
3815 "</b>: ".$lng->txt(
"cont_layout_".$a_def_option).
3816 "</td></tr></table>",
""));
3825 $layout->addOption(
new ilRadioOption(
"<table><tr><td style='padding: 0px 5px 5px;'>".
3826 $im_tag.
"</td><td style='padding:5px;'><b>".$lng->txt(
"cont_layout_".$l).
"</b>: ".
3827 $lng->txt(
"cont_layout_".$l.
"_desc").
"</td></tr></table>", $l));
3839 $ilCtrl->setParameter($this,
"hierarchy",
"1");
3851 if (!is_array(
$_POST[
"id"]))
3855 if ($a_in_hierarchy)
3857 $ilCtrl->redirect($this,
"chapters");
3861 $ilCtrl->redirect($this,
"pages");
3867 $tpl->setContent($this->form->getHTML());
3877 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3880 if (is_array(
$_POST[
"id"]))
3882 foreach (
$_POST[
"id"] as $id)
3886 $this->form->addItem($hi);
3889 $layout = self::getLayoutOption($lng->txt(
"cont_layout"),
"layout",
3890 $this->
object->getLayout());
3891 $this->form->addItem($layout);
3893 $this->form->addCommandButton(
"savePageLayout", $lng->txt(
"save"));
3894 $this->form->addCommandButton(
"pages", $lng->txt(
"cancel"));
3896 $this->form->setTitle($lng->txt(
"cont_set_layout"));
3897 $this->form->setFormAction($ilCtrl->getFormAction($this));
3908 $ilCtrl->setParameter($this,
"hierarchy",
$_GET[
"hierarchy"]);
3910 foreach (
$_POST[
"id"] as $id)
3918 if (
$_GET[
"hierarchy"] == 1)
3920 $ilCtrl->redirect($this,
"chapters");
3924 $ilCtrl->redirect($this,
"pages");
3943 $ilTabs->setTabActive(
"settings");
3946 $ilToolbar->addButton($lng->txt(
"add"),
3947 $ilCtrl->getLinkTarget($this,
"showLMGlossarySelector"));
3949 include_once(
"./Modules/LearningModule/classes/class.ilLMGlossaryTableGUI.php");
3952 $tpl->setContent(
$tab->getHTML());
3966 $ilTabs->setTabActive(
"settings");
3969 include_once
'Services/Search/classes/class.ilSearchRootSelector.php';
3972 $exp->
setExpand(
$_GET[
"search_root_expand"] ?
$_GET[
"search_root_expand"] : $tree->readRootId());
3973 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'showLMGlossarySelector'));
3974 $exp->setTargetClass(get_class($this));
3975 $exp->setCmd(
'confirmGlossarySelection');
3976 $exp->setClickableTypes(array(
"glo"));
3977 $exp->addFilter(
"glo");
3981 $tpl->setContent($exp->getOutput());
3992 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
3994 $ilCtrl->setParameter($this,
"glo_ref_id",
$_GET[
"root_id"]);
3995 $cgui->setFormAction($ilCtrl->getFormAction($this));
3996 $cgui->setHeaderText($lng->txt(
"cont_link_glo_in_lm"));
3997 $cgui->setCancel($lng->txt(
"no"),
"selectLMGlossary");
3998 $cgui->setConfirm($lng->txt(
"yes"),
"selectLMGlossaryLink");
3999 $tpl->setContent($cgui->getHTML());
4010 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
4012 $this->
object->autoLinkGlossaryTerms($glo_id);
4027 $glos = $this->
object->getAutoGlossaries();
4028 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
4030 if (!in_array($glo_id, $glos))
4034 $this->
object->setAutoGlossaries($glos);
4035 $this->
object->update();
4038 $ilCtrl->redirect($this,
"editGlossaries");
4051 $this->
object->removeAutoGlossary((
int)
$_GET[
"glo_id"]);
4052 $this->
object->update();
4055 $ilCtrl->redirect($this,
"editGlossaries");
4068 $ilCtrl->setParameter($this,
"transl",
"");
4069 $ilCtrl->redirect($this,
"chapters");
4082 $ilCtrl->setParameter($this,
"transl",
$_GET[
"totransl"]);
4083 $ilCtrl->redirect($this,
"chapters");
4089 return parent::redrawHeaderActionObject();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
cutItems($a_return="chapters")
Copy items to clipboard, then cut them from the current tree.
saveBibItem()
save bib item (module call)
exportSCORM()
create scorm package
addTabs($a_act="")
Adds tabs.
This class represents an option in a radio group.
moveChapter($a_parent_subobj_id=0)
move a single chapter (selection)
deleteBibItemObject($a_target="")
delete bib item (admin call)
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
editMasterLanguage()
Edit master language.
static saveExportId($a_lm_id, $a_lmobj_id, $a_exp_id, $a_type="pg")
Save export id.
pasteChapter($a_parent_subobj_id=0)
paste chapter
Class ilObjLearningModule.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
initMenuForm()
Init menu form.
setSubTabs($a_active)
Set sub tabs.
saveExportIds()
Save export IDs.
setPageLayoutInHierarchy()
Set layout for multipl pages.
setValue($a_value)
Set Value.
showActions($a_actions)
show possible action (form buttons)
exportHTML()
create html package
static getMultiLangHeader($a_lm_id, $a_gui_class)
Get multi lang header.
selectLMGlossary()
Select lm glossary.
initMenuEntryForm($a_mode="edit")
Init menu entry form.
setTargetGet($a_target_get)
set the varname in Get-string public
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="")
Build img tag.
initStylePropertiesForm()
Init style properties form.
setTabs($a_act="")
output tabs
initImportForm()
Init import form.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
showMaintenance()
Show maintenance.
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.
updateMenuEntry()
update a menu entry
addBibItemObject($a_target="")
add bib item (admin call)
Class ilObject Basic functions for all objects.
savePageLayout()
Save page layout.
listLinks()
List all broken links.
activatePages()
activates or deactivates pages
setReturnLocation($a_cmd, $a_location)
set specific return location for command
saveTooltips()
Save tooltips.
_goto($a_target)
redirect script
static _requiresPurchaseToAccess($a_ref_id, $a_purchasetype='')
this function should be used by all buyable repository objects !!
addObserver(&$a_class, $a_method, $a_element)
static get($a_var)
Get a value.
const LP_MODE_COLLECTION_MANUAL
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
Class ilStructureObjectGUI.
static pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_source_lm=null)
Paste item (tree) from clipboard to current lm.
setFormAction($a_cmd, $a_formaction)
set specific form action for command
static getLayoutOption($a_txt, $a_var, $a_def_option="")
Save help mapping.
static set($a_var, $a_val)
Set a value.
popup()
popup window for wysiwyg editor
showExportIDsOverview($a_validation=false)
Show export IDs overview.
static _lookupTitle($a_id)
lookup object title
Export class for content objects.
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
const LP_MODE_COLLECTION_TLT
editMenuProperties()
Edit menu properies.
viewObject()
list childs of current object
createObject()
create new object form
createPDF()
export content object
getAvailableLayouts()
get all available lm layouts
class for checking external links in page objects.
static _lookupTitle($a_obj_id)
Lookup title.
saveMenuProperties()
save properties
saveAllTitles()
Save all titles of chapters/pages.
formatInvalidLinkArray(Array $row)
saveStyleSettings()
Save style settings.
getPropertiesFormValues()
Get values for properties form.
storeContentObject($a_type, $a_id, $a_action="cut")
view()
view content object
addBibItem()
add bib item (module call)
Class ilECSLearningModuleSettings.
static _lookupObjectId($a_ref_id)
lookup object id
fixTreeConfirm()
confirm screen for tree fixing
static getTooltipComponents($a_module_id=0)
Get all tooltip components.
class ilLinkCheckerTableGUI
proceedDragDrop()
proceed drag and drop operations on pages/chapters
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
downloadPDFFile()
download export file
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
owner()
show owner of content object
clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
activateStatistics($a_act=true)
selectFooter()
select page as footer
saveProperties()
save properties
setilLMMenu($a_offline=false, $a_export_format="", $a_active="content", $a_use_global_tabs=false, $a_as_subtabs=false, $a_cur_page=0)
get lm menu html
saveHelpMapping()
Save help mapping.
addLocations($a_omit_obj_id=false)
display locator
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
afterSave(ilObject $a_new_object)
_createEntry($a_obj_id, $a_action, $a_info_params="", $a_obj_type="", $a_user_comment="", $a_update_last=false)
Creates a new history entry for an object.
deleteBibItem()
delete bib item (module call)
exportObject()
export object
TableGUI class for (broken) links in learning module.
if(!is_array($argv)) $options
saveScreenIdsForChapter($a_chap, $a_ids)
Save screen ids for chapter.
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
deleteTooltips()
Delete tooltips.
properties()
edit properties form
_writeActive($a_id, $a_parent_type, $a_active, $a_reset_scheduled_activation=true, $a_lang="-")
write activation status
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
copyItems()
Copy items to clipboard.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
selectHeader()
select page as header
importObject()
display dialogue for importing XML-LeaningObjects
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
addMenuEntry()
display add menu entry form
special template class to simplify handling of ITX/PEAR
omitLocator($a_omit=true)
deleteMenuEntry()
drop a menu entry
selectLMGlossaryLink()
Select a glossary and link all its terms.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
_lookupContObjID($a_id)
get learning module / digibook id for lm object
TableGUI class for glossary tables.
This class represents a text property in a property form.
permSave()
save permissions
insertChapterClip()
Insert Chapter from clipboard.
saveMenuEntry()
save new menu entry
copyChapter($a_parent_subobj_id=0)
copy a single chapter (selection)
& executeCommand()
execute command
Page multilinguality GUI class.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
getPageList($lm_id)
static
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
redirection script todo: (a better solution should control the processing via a xml file) ...
setPageLayout($a_in_hierarchy=false)
Set layout for multipl pages.
interface ilLinkCheckerGUIRowHandling
setMaxLength($a_maxlength)
Set Max Length.
publishExportFile($a_files)
download export file
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
initCreateForm($a_new_type)
Init object creation form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
ilObjContentObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
Constructor.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
prepareOutput()
prepare output
static _lookupType($a_id, $a_reference=false)
lookup object type
static array_php2js($data)
convert php arrays to javascript arrays
static _lookupContainsDeactivatedElements($a_id, $a_parent_type, $a_lang="-")
lookup whether page contains deactivated elements
static _isScheduledActivation($a_id, $a_parent_type, $a_lang="-")
Check whether page is activated by time schedule.
explorer()
output explorer tree
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
cancelDelete()
cancel delete
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
This class provides user interface methods for history entries.
static isOnlineHelpModule($a_id, $a_as_obj_id=false)
Is module an online module.
User interface class for advanced drop-down selection lists.
notify($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
notifys an object about an event occured Based on the event passed, each object may decide how it rea...
_lookupStandard($a_id)
Lookup standard flag.
confirmedDelete($a_parent_subobj_id=0)
delete page object or structure objects
setContentSubTabs($a_active)
Set pages tabs.
editMenuEntry()
edit menu entry form
This class represents a non editable value in a property form.
saveBibItemObject($a_target="")
save bib item (admin call)
Class ilObjStyleSheetGUI.
confirmGlossarySelection()
Confirm glossary selection.
_writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content object
filterTooltips()
Filter tooltips.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
static getInstance($a_obj_id)
Get instance.
deleteStyle()
Delete Style.
initPropertiesForm()
Init properties form.
Class ilObjContentObjectGUI.
getCreationMode()
get creation mode
getRefId()
get reference id public
getContextPath($a_endnode_id, $a_startnode_id=1)
get context path in content object tree
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
editBibItemObject($a_target="")
edit bib items (admin call)
static deleteTooltip($a_id)
Delete tooltip.
_getNotifyStatus($a_usr_id, $a_obj_id)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
export()
export content object
getHistoryTable($a_header_params, $a_user_comment=false)
get history table
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
setTabs()
set admin tabs public
editGlossaries()
Edit automatically linked glossaries.
initSetPageLayoutForm()
Init set page layout form.
Class ilObjContentObject.
switchToLanguage()
Switch to language.
importFileObject()
display status information or report errors messages in case of error
update()
update object in db
editStyleProperties()
Edit style properties.
static isJobActive($a_job_id)
Check if given job is currently active.
showLMGlossarySelector()
Select LM Glossary.
static updateTooltip($a_id, $a_text, $a_tt_id)
Update tooltip.
static redirect($a_script)
http redirect to other script
cutChapter()
Cut chapter(s)
static getInstance($a_obj_id)
filterHelpChapters()
Filter help chapters.
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
showTooltipList()
Show export IDs overview.
initCreationForms($a_new_type)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
removeLMGlossary()
Remove lm glossary.
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.
GUI class for object translation handling.
TableGUI class for all pages of a learning module.
Confirmation screen class.
insertChapter()
Insert (multiple) chapters at node.
createStyle()
Create Style.
listQuestions()
List questions.
editBibItem()
edit bib items (module call)