67 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
false)
71 $this->lng =
$DIC->language();
72 $this->access =
$DIC->access();
73 $this->tabs =
$DIC->tabs();
74 $this->
error = $DIC[
"ilErr"];
76 $this->
user = $DIC->user();
77 $this->tpl =
$DIC[
"tpl"];
78 $this->toolbar =
$DIC->toolbar();
79 $this->rbacsystem =
$DIC->rbac()->system();
80 $this->tree =
$DIC->repositoryTree();
81 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
82 $this->help =
$DIC[
"ilHelp"];
83 $this->locator =
$DIC[
"ilLocator"];
84 $this->db =
$DIC->database();
85 $this->log =
$DIC[
"ilLog"];
89 $lng->loadLanguageModule(
"content");
90 $lng->loadLanguageModule(
"obj");
91 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
107 if ($this->ctrl->getRedirectSource() ==
"ilinternallinkgui") {
112 if ($this->ctrl->getCmdClass() ==
"ilinternallinkgui") {
113 $this->ctrl->setReturn($this,
"explorer");
117 $next_class = $this->ctrl->getNextClass($this);
120 if (
$_GET[
"to_props"] == 1) {
121 $cmd = $this->ctrl->getCmd(
"properties");
123 $cmd = $this->ctrl->getCmd(
"chapters");
127 switch ($next_class) {
128 case 'illtiproviderobjectsettinggui':
131 $ilTabs->setTabActive(
"settings");
135 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
136 $lti_gui->offerLTIRolesForSelection(
true);
137 $this->ctrl->forwardCommand($lti_gui);
142 case "illearningprogressgui":
145 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
146 $this->
setTabs(
"learning_progress");
149 $this->ctrl->forwardCommand($new_gui);
153 case 'ilobjectmetadatagui':
154 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
155 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
162 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
164 $md_gui->addMDObserver($this->
object,
'MDUpdateListener',
'Educational');
165 $md_gui->addMDObserver($this->
object,
'MDUpdateListener',
'General');
166 $this->ctrl->forwardCommand($md_gui);
169 case "ilobjstylesheetgui":
171 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
172 $this->ctrl->setReturn($this,
"editStyleProperties");
173 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
174 $style_gui->omitLocator();
175 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
176 $style_gui->setCreationMode(
true);
178 $ret = $this->ctrl->forwardCommand($style_gui);
180 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
182 $this->
object->setStyleSheetId($style_id);
183 $this->
object->update();
184 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
188 case "illmpageobjectgui":
190 $ilTabs->setBackTarget(
191 $lng->txt(
"learning module"),
192 $ilCtrl->getLinkTarget($this,
"chapters")
194 $this->ctrl->saveParameter($this, array(
"obj_id"));
196 $this->ctrl->setReturn($this,
"chapters");
199 if (
$_GET[
"obj_id"] !=
"") {
201 $pg_gui->setLMPageObject($obj);
203 $ret = $this->ctrl->forwardCommand($pg_gui);
206 case "ilstructureobjectgui":
207 $ilTabs->setBackTarget(
208 $lng->txt(
"learning module"),
209 $ilCtrl->getLinkTarget($this,
"chapters")
212 $this->ctrl->saveParameter($this, array(
"obj_id"));
214 $this->ctrl->setReturn($this,
"chapters");
216 if (
$_GET[
"obj_id"] !=
"") {
218 $st_gui->setStructureObject($obj);
220 $ret = $this->ctrl->forwardCommand($st_gui);
221 if ($cmd ==
"save" || $cmd ==
"cancel") {
222 if (
$_GET[
"obj_id"] ==
"") {
223 $this->ctrl->redirect($this,
"chapters");
225 $this->ctrl->setCmd(
"subchap");
231 case 'ilpermissiongui':
232 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
239 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
241 $ret = $this->ctrl->forwardCommand($perm_gui);
245 case 'ilinfoscreengui':
249 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
251 $info->enablePrivateNotes();
252 $info->enableLearningProgress();
255 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
256 $info->enableNewsEditing();
257 $info->setBlockProperty(
"news",
"settings",
true);
261 $info->addMetaDataSections(
262 $this->object->getId(),
264 $this->object->getType()
267 $ret = $this->ctrl->forwardCommand(
$info);
275 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
277 $exp_gui->addFormat(
"xml");
278 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
280 if ($ot->getContentActivated()) {
281 $exp_gui->addFormat(
"xml_master",
"XML (" .
$lng->txt(
"cont_master_language_only") .
")", $this,
"export");
282 $exp_gui->addFormat(
"xml_masternomedia",
"XML (" .
$lng->txt(
"cont_master_language_only_no_media") .
")", $this,
"export");
284 $lng->loadLanguageModule(
"meta");
285 $langs = $ot->getLanguages();
286 foreach ($langs as
$l => $ldata) {
287 $exp_gui->addFormat(
"html_" .
$l,
"HTML (" .
$lng->txt(
"meta_l_" .
$l) .
")", $this,
"exportHTML");
289 $exp_gui->addFormat(
"html_all",
"HTML (" .
$lng->txt(
"cont_all_languages") .
")", $this,
"exportHTML");
291 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
294 $exp_gui->addFormat(
"scorm",
"", $this,
"exportSCORM");
295 $exp_gui->addCustomColumn(
296 $lng->txt(
"cont_public_access"),
298 "getPublicAccessColValue"
300 $exp_gui->addCustomMultiCommand(
301 $lng->txt(
"cont_public_access"),
305 $ret = $this->ctrl->forwardCommand($exp_gui);
308 case 'ilobjecttranslationgui':
313 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
315 $transgui->setTitleDescrOnlyMode(
false);
316 $this->ctrl->forwardCommand($transgui);
320 case "ilcommonactiondispatchergui":
321 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
323 $this->ctrl->forwardCommand($gui);
326 case 'ilobjectcopygui':
328 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
331 $this->ctrl->forwardCommand($cp);
334 case "ilmobmultisrtuploadgui":
339 include_once(
"./Services/MediaObjects/classes/class.ilMobMultiSrtUploadGUI.php");
340 include_once(
"./Modules/LearningModule/classes/class.ilLMMultiSrt.php");
342 $this->ctrl->forwardCommand($gui);
345 case "illmimportgui":
350 include_once(
"./Modules/LearningModule/classes/class.ilLMImportGUI.php");
352 $this->ctrl->forwardCommand($gui);
355 case "illmeditshorttitlesgui":
360 include_once(
"./Modules/LearningModule/classes/class.ilLMEditShortTitlesGUI.php");
362 $this->ctrl->forwardCommand($gui);
366 $new_type =
$_POST[
"new_type"]
371 if ($cmd ==
"create" &&
372 !in_array($new_type, array(
"lm"))) {
376 $this->ctrl->setCmdClass(
"ilLMPageObjectGUI");
382 $this->ctrl->setCmdClass(
"ilStructureObjectGUI");
389 in_array($new_type, array(
"lm"))) {
395 $ret = $this->$cmd();
399 $ret = $this->$cmd();
409 return array(
"ilLMPageObjectGUI",
"ilStructureObjectGUI",
"ilObjStyleSheetGUI");
419 $lng->loadLanguageModule(
"style");
427 if ($this->object->getType() ==
"lm") {
429 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
431 $ecs->addSettingsToForm($this->form,
'lm');
434 $this->tpl->setContent($this->form->getHTML());
448 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
453 $ti->setRequired(
true);
454 $this->form->addItem($ti);
458 $this->form->addItem($ta);
460 $lng->loadLanguageModule(
"rep");
462 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
467 $this->form->addItem($online);
471 $section->setTitle($this->lng->txt(
'cont_presentation'));
475 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
479 $this->form->addItem($layout);
483 $lpp->setInfo($this->lng->txt(
"cont_layout_per_page_info"));
484 $this->form->addItem($lpp);
488 $option = array(
"st_title" => $this->lng->txt(
"cont_st_title"),
489 "pg_title" => $this->lng->txt(
"cont_pg_title"),
490 "none" => $this->lng->txt(
"cont_none"));
491 $page_header->setOptions($option);
492 $this->form->addItem($page_header);
496 $this->form->addItem($chap_num);
500 $option = array(
"chapters" => $this->lng->txt(
"cont_chapters_only"),
501 "pages" => $this->lng->txt(
"cont_chapters_and_pages"));
502 $toc_mode->setOptions($option);
503 $this->form->addItem($toc_mode);
507 $progr_icons->setInfo($this->lng->txt(
"cont_progress_icons_info"));
508 $this->form->addItem($progr_icons);
512 $section->setTitle($this->lng->txt(
'cont_self_assessment'));
518 $op1 =
new ilRadioOption(
$lng->txt(
"cont_tries_reset_on_visit"), 0,
$lng->txt(
"cont_tries_reset_on_visit_info"));
519 $radg->addOption($op1);
521 $radg->addOption($op2);
522 $this->form->addItem($radg);
526 $qfeed->setInfo($this->lng->txt(
"cont_restrict_forw_nav_info"));
527 $this->form->addItem($qfeed);
531 $not->setInfo($this->lng->txt(
"cont_notify_on_blocked_users_info"));
532 $qfeed->addSubItem($not);
536 $qfeed->setInfo($this->lng->txt(
"cont_disable_def_feedback_info"));
537 $this->form->addItem($qfeed);
541 $section->setTitle($this->lng->txt(
'obj_features'));
546 $this->lng->loadLanguageModule(
"notes");
548 $pub_nodes->setInfo($this->lng->txt(
"cont_lm_comments_desc"));
549 $this->form->addItem($pub_nodes);
554 $com->setInfo($this->lng->txt(
"enable_hist_user_comments_desc"));
555 $this->form->addItem($com);
558 $this->lng->loadLanguageModule(
'rating');
560 $rate->setInfo($this->lng->txt(
'rating_activate_rating_info'));
561 $this->form->addItem($rate);
562 $ratep =
new ilCheckboxInputGUI($this->lng->txt(
'lm_activate_rating'),
'rating_pages');
563 $this->form->addItem($ratep);
565 $this->form->setTitle(
$lng->txt(
"cont_lm_properties"));
566 $this->form->addCommandButton(
"saveProperties",
$lng->txt(
"save"));
567 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
579 $title = $this->
object->getTitle();
581 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
583 if ($ot->getContentActivated()) {
584 $title = $ot->getDefaultTitle();
590 if (!$this->object->getOfflineStatus()) {
593 $values[
"lm_layout"] = $this->
object->getLayout();
594 $values[
"lm_pg_header"] = $this->
object->getPageHeader();
595 if ($this->object->isActiveNumbering()) {
596 $values[
"cobj_act_number"] =
true;
598 $values[
"toc_mode"] = $this->
object->getTOCMode();
599 if ($this->object->publicNotes()) {
600 $values[
"cobj_pub_notes"] =
true;
602 if ($this->object->cleanFrames()) {
603 $values[
"cobj_clean_frames"] =
true;
605 if ($this->object->isActiveHistoryUserComments()) {
606 $values[
"cobj_user_comments"] =
true;
608 $values[
"layout_per_page"] = $this->
object->getLayoutPerPage();
609 $values[
"rating"] = $this->
object->hasRating();
610 $values[
"rating_pages"] = $this->
object->hasRatingPages();
611 $values[
"disable_def_feedback"] = $this->
object->getDisableDefaultFeedback();
612 $values[
"progr_icons"] = $this->
object->getProgressIcons();
613 $values[
"store_tries"] = $this->
object->getStoreTries();
614 $values[
"restrict_forw_nav"] = $this->
object->getRestrictForwardNavigation();
616 include_once
"./Services/Notification/classes/class.ilNotification.php";
620 $this->object->getId()
623 $this->form->setValuesByArray(
$values);
638 if ($this->form->checkInput()) {
639 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
641 if ($ot->getContentActivated()) {
642 $ot->setDefaultTitle(
$_POST[
'title']);
643 $ot->setDefaultDescription(
$_POST[
'description']);
647 $this->
object->setTitle(
$_POST[
'title']);
648 $this->
object->setDescription(
$_POST[
'description']);
649 $this->
object->setLayout(
$_POST[
"lm_layout"]);
650 $this->
object->setPageHeader(
$_POST[
"lm_pg_header"]);
651 $this->
object->setTOCMode(
$_POST[
"toc_mode"]);
652 $this->
object->setOfflineStatus(!(
$_POST[
'cobj_online']));
653 $this->
object->setActiveNumbering(
$_POST[
"cobj_act_number"]);
654 $this->
object->setCleanFrames(
$_POST[
"cobj_clean_frames"]);
656 $this->
object->setPublicNotes(
$_POST[
"cobj_pub_notes"]);
658 $this->
object->setHistoryUserComments(
$_POST[
"cobj_user_comments"]);
659 $this->
object->setLayoutPerPage(
$_POST[
"layout_per_page"]);
660 $this->
object->setRating(
$_POST[
"rating"]);
661 $this->
object->setRatingPages(
$_POST[
"rating_pages"]);
662 $this->
object->setDisableDefaultFeedback((
int)
$_POST[
"disable_def_feedback"]);
663 $this->
object->setProgressIcons((
int) $_POST[
"progr_icons"]);
666 if (
$_POST[
"restrict_forw_nav"] && !
$_POST[
"store_tries"]) {
667 $_POST[
"store_tries"] = 1;
668 $add_info =
"</br>" .
$lng->txt(
"cont_automatically_set_store_tries");
669 $add_info = str_replace(
"$1",
$lng->txt(
"cont_tries_store"), $add_info);
670 $add_info = str_replace(
"$2",
$lng->txt(
"cont_restrict_forw_nav"), $add_info);
673 $this->
object->setStoreTries((
int) $_POST[
"store_tries"]);
674 $this->
object->setRestrictForwardNavigation((
int) $_POST[
"restrict_forw_nav"]);
675 $this->
object->updateProperties();
676 $this->
object->update();
679 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
681 include_once
"./Services/Notification/classes/class.ilNotification.php";
685 $this->object->getId(),
686 (
bool) $this->form->getInput(
"notification_blocked_users")
690 if ($this->object->getType() ==
'lm') {
692 include_once
'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
694 if ($ecs->handleSettingsUpdate()) {
703 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified") . $add_info,
true);
704 $this->ctrl->redirect($this,
"properties");
706 $lng->loadLanguageModule(
"style");
710 $this->form->setValuesByPost();
711 $this->tpl->setContent($this->form->getHTML());
723 $tpl->setContent($this->form->getHTML());
736 $lng->loadLanguageModule(
"style");
738 $ilTabs->setTabActive(
"settings");
741 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
744 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
745 $def_style =
$ilSetting->get(
"default_content_style_id");
746 $style_id = $this->
object->getStyleSheetId();
748 if ($fixed_style > 0) {
751 $this->lng->txt(
"global_fixed") .
")");
752 $this->form->addItem($st);
760 if ($def_style > 0) {
763 $st_styles[0] = $this->lng->txt(
"default");
772 $this->form->addItem($st);
775 $this->form->addCommandButton(
777 $lng->txt(
"cont_edit_style")
779 $this->form->addCommandButton(
781 $lng->txt(
"cont_delete_style")
788 $style_sel->setOptions($st_styles);
789 $style_sel->setValue($style_id);
790 $this->form->addItem($style_sel);
791 $this->form->addCommandButton(
795 $this->form->addCommandButton(
797 $lng->txt(
"sty_create_ind_style")
801 $this->form->setTitle(
$lng->txt(
"cont_style"));
802 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
812 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
822 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
832 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
842 if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
844 || $this->object->getStyleSheetId() == 0)) {
846 $this->
object->update();
847 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
849 $this->ctrl->redirect($this,
"editStyleProperties");
860 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
865 $menu->setChecked($this->object->isActiveLMMenu());
866 $form->addItem($menu);
870 $toc->setChecked($this->object->isActiveTOC());
871 $form->addItem($toc);
874 $print =
new ilCheckboxInputGUI($this->lng->txt(
"cont_print_view"),
"cobj_act_print");
875 $print->setChecked($this->object->isActivePrintView());
876 $form->addItem($print);
879 $glo =
new ilCheckboxInputGUI($this->lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
880 $glo->setChecked($this->object->isActivePreventGlossaryAppendix());
881 $print->addSubItem($glo);
884 $hhfp =
new ilCheckboxInputGUI($this->lng->txt(
"cont_hide_head_foot_print"),
"hide_head_foot_print");
885 $hhfp->setChecked($this->object->getHideHeaderFooterPrint());
886 $print->addSubItem($hhfp);
889 $no_download_file_available =
890 " " .
$lng->txt(
"cont_no_download_file_available") .
891 " <a href='" .
$ilCtrl->getLinkTargetByClass(
"ilexportgui",
"") .
"'>" .
$lng->txt(
"change") .
"</a>";
892 $types = array(
"xml",
"html",
"scorm");
893 foreach ($types as
$type) {
894 if ($this->object->getPublicExportFile(
$type) !=
"") {
895 if (is_file($this->object->getExportDirectory(
$type) .
"/" .
896 $this->object->getPublicExportFile(
$type))) {
897 $no_download_file_available =
"";
901 $dl =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"cobj_act_downloads");
902 $dl->setInfo($this->lng->txt(
"cont_downloads_desc") . $no_download_file_available);
903 $dl->setChecked($this->object->isActiveDownloads());
907 $pdl =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads_public_desc"),
"cobj_act_downloads_public");
908 $pdl->setChecked($this->object->isActiveDownloadsPublic());
909 $dl->addSubItem($pdl);
911 $form->addCommandButton(
"saveMenuProperties",
$lng->txt(
"save"));
913 $form->setTitle(
$lng->txt(
"cont_lm_menu"));
930 $lng->loadLanguageModule(
"style");
932 $ilTabs->setTabActive(
"settings");
935 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
936 $ilToolbar->addFormButton($this->lng->txt(
"add_menu_entry"),
"addMenuEntry");
937 $ilToolbar->setCloseFormTag(
false);
940 $form->setOpenTag(
false);
941 $form->setCloseTag(
false);
944 $entries = $this->lmme_obj->getMenuEntries();
945 include_once(
"./Modules/LearningModule/classes/class.ilLMMenuItemsTableGUI.php");
947 $table->setOpenFormTag(
false);
957 $this->
object->setActiveLMMenu((
int)
$_POST[
"cobj_act_lm_menu"]);
958 $this->
object->setActiveTOC((
int) $_POST[
"cobj_act_toc"]);
959 $this->
object->setActivePrintView((
int) $_POST[
"cobj_act_print"]);
960 $this->
object->setActivePreventGlossaryAppendix((
int) $_POST[
"cobj_act_print_prev_glo"]);
961 $this->
object->setHideHeaderFooterPrint((
int) $_POST[
"hide_head_foot_print"]);
962 $this->
object->setActiveDownloads((
int) $_POST[
"cobj_act_downloads"]);
963 $this->
object->setActiveDownloadsPublic((
int) $_POST[
"cobj_act_downloads_public"]);
964 $this->
object->updateProperties();
968 $this->lmme_obj->updateActiveStatus(
$_POST[
"menu_entries"]);
970 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
971 $this->ctrl->redirect($this,
"editMenuProperties");
981 $gui_class =
"ilobjlearningmodulegui";
983 $ilCtrl->setParameterByClass($gui_class,
"active_node",
$_GET[
"active_node"]);
985 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
989 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
992 require_once(
"./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
993 $exp =
new ilLMEditorExplorer(
994 $this->ctrl->getLinkTarget($this,
"view"),
999 $exp->setTargetGet(
"obj_id");
1000 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"explorer"));
1002 if (
$_GET[
"lmmovecopy"] ==
"1") {
1007 if (
$_GET[
"lmexpand"] ==
"") {
1008 $mtree =
new ilTree($this->object->getId());
1009 $mtree->setTableNames(
'lm_tree',
'lm_data');
1010 $mtree->setTreeTablePK(
"lm_id");
1011 $expanded = $mtree->readRootId();
1013 $expanded =
$_GET[
"lmexpand"];
1015 if (
$_GET[
"active_node"] !=
"") {
1016 $path = $this->lm_tree->getPathId(
$_GET[
"active_node"]);
1017 $exp->setForceOpenPath(
$path);
1019 $exp->highlightNode(
$_GET[
"active_node"]);
1021 $exp->setExpand($expanded);
1033 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
1035 $this->tpl->setCurrentBlock(
"content");
1036 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_chap_and_pages"));
1037 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
1038 $this->tpl->setVariable(
"EXPLORER",
$output);
1039 $this->ctrl->setParameter($this,
"lmexpand",
$_GET[
"lmexpand"]);
1040 $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this,
"explorer"));
1041 $this->tpl->parseCurrentBlock();
1042 $this->tpl->show(
false);
1051 include_once
"./Services/COPage/classes/class.ilWysiwygUtil.php";
1052 $popup =
new ilWysiwygUtil();
1053 $popup->show(
$_GET[
"ptype"]);
1064 $this->
object->executeDragDrop(
1065 $_POST[
"il_hform_source_id"],
1066 $_POST[
"il_hform_target_id"],
1068 $_POST[
"il_hform_as_subitem"]
1070 $ilCtrl->redirect($this,
"chapters");
1083 $a_new_object->setCleanFrames(
true);
1087 $a_new_object->createLMTree();
1090 $a_new_object->addFirstChapterAndPage();
1093 ilUtil::sendSuccess($this->lng->txt($this->type .
"_added"),
true);
1095 "&baseClass=ilLMEditorGUI");
1106 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1110 $this->ctrl->setParameter($this,
"new_type", $new_type);
1113 $form->setTableWidth(
"600px");
1118 $fi->setSuffixes(array(
"zip"));
1119 $fi->setRequired(
true);
1121 $form->addItem($fi);
1125 $cb->setInfo($this->lng->txt(
""));
1126 $form->addItem($cb);
1128 $form->addCommandButton(
"importFile",
$lng->txt(
"import"));
1129 $form->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
1131 $form->setTitle($this->lng->txt(
"import_" . $new_type));
1175 parent::importFileObject(
null,
false);
1179 $no_manifest =
true;
1182 ilUtil::sendFailure($this->lng->txt(
"obj_import_file_error") .
" <br />" . $e->getMessage());
1183 $form->setValuesByPost();
1188 if (!$no_manifest) {
1194 include_once
"./Modules/LearningModule/classes/class.ilObjLearningModule.php";
1197 $ilErr->raiseError($this->lng->txt(
"no_create_permission"),
$ilErr->MESSAGE);
1201 if (
$form->checkInput()) {
1203 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
1205 $newObj->setType(
$_GET[
"new_type"]);
1206 $newObj->setTitle($_FILES[
"importfile"][
"name"]);
1207 $newObj->setDescription(
"");
1208 $newObj->create(
true);
1209 $newObj->createReference();
1210 $newObj->putInTree(
$_GET[
"ref_id"]);
1211 $newObj->setPermissions(
$_GET[
"ref_id"]);
1214 $newObj->createLMTree();
1217 $mess = $newObj->importFromDirectory($this->tmp_import_dir,
$_POST[
"validate"]);
1220 ilUtil::sendSuccess($this->lng->txt($this->type .
"_added"),
true);
1222 "&baseClass=ilLMEditorGUI");
1224 $link =
'<a href="' .
"ilias.php?ref_id=" . $newObj->getRefId() .
1225 "&baseClass=ilLMEditorGUI" .
'" target="_top">' . $this->lng->txt(
"btn_next") .
'</a>';
1226 $tpl->setContent(
"<br />" . $link .
"<br /><br />" . $mess . $link);
1229 $form->setValuesByPost();
1245 $ilCtrl->setParameter($this,
"backcmd",
"chapters");
1247 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
1249 $form_gui->setFormAction(
$ilCtrl->getFormAction($this));
1250 $form_gui->setTitle($this->object->getTitle());
1252 $form_gui->setTree($this->lm_tree);
1253 $form_gui->setMaxDepth(0);
1254 $form_gui->setCurrentTopNodeId($this->tree->getRootId());
1255 $form_gui->addMultiCommand(
$lng->txt(
"delete"),
"delete");
1256 $form_gui->addMultiCommand(
$lng->txt(
"cut"),
"cutItems");
1257 $form_gui->addMultiCommand(
$lng->txt(
"copy"),
"copyItems");
1258 if ($this->object->getLayoutPerPage()) {
1259 $form_gui->addMultiCommand(
$lng->txt(
"cont_set_layout"),
"setPageLayoutInHierarchy");
1262 $form_gui->addCommand(
$lng->txt(
"cont_save_all_titles"),
"saveAllTitles");
1263 $up_gui =
"ilobjlearningmodulegui";
1265 $ctpl =
new ilTemplate(
"tpl.chap_and_pages.html",
true,
true,
"Modules/LearningModule");
1266 $ctpl->setVariable(
"HIERARCHY_FORM", $form_gui->getHTML());
1267 $ilCtrl->setParameter($this,
"obj_id",
"");
1271 $this->tpl->setContent($ml_head . $ctpl->get());
1288 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
1290 if ($ot->getContentActivated()) {
1291 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode", $a_mode);
1292 $lng->loadLanguageModule(
"meta");
1295 include_once(
"./Services/COPage/classes/class.ilPageMultiLangGUI.php");
1297 $ml_head = $ml_gui->getMultiLangInfo(
$_GET[
"transl"]);
1300 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
1302 $list->setListTitle(
$lng->txt(
"actions"));
1303 $list->setId(
"copage_act");
1305 if (!in_array(
$_GET[
"transl"], array(
"",
"-"))) {
1306 $l = $ot->getMasterLanguage();
1308 $lng->txt(
"cont_edit_language_version") .
": " .
1309 $lng->txt(
"meta_l_" .
$l),
1311 $ilCtrl->getLinkTarget($a_gui_class,
"editMasterLanguage")
1316 foreach ($ot->getLanguages() as $al =>
$lang) {
1317 if (
$_GET[
"transl"] != $al &&
1318 $al != $ot->getMasterLanguage()) {
1319 $ilCtrl->setParameter($a_gui_class,
"totransl", $al);
1321 $lng->txt(
"cont_edit_language_version") .
": " .
1322 $lng->txt(
"meta_l_" . $al),
1324 $ilCtrl->getLinkTarget($a_gui_class,
"switchToLanguage")
1326 $ilCtrl->setParameter($a_gui_class,
"totransl",
$_GET[
"totransl"]);
1332 $ml_head =
'<div class="ilFloatLeft">' . $ml_head .
'</div><div style="margin: 5px 0;" class="small ilRight">' .
$list->getHTML() .
"</div>";
1334 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode",
"");
1354 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1355 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1356 $ilToolbar->addButton(
1357 $lng->txt(
"pg_add"),
1358 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create")
1360 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1362 include_once(
"./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
1364 $tpl->setContent(
$t->getHTML());
1377 include_once(
"./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
1381 $this->object->getId(),
1382 $this->object->getType()
1385 $tpl->setContent($table_gui->getHTML());
1398 $ilToolbar->addButton(
1399 $this->lng->txt(
"cont_fix_tree"),
1400 $this->ctrl->getLinkTarget($this,
"fixTreeConfirm")
1409 if (is_array(
$_POST[
"id"])) {
1411 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1417 $this->ctrl->redirect($this,
"pages");
1428 $ilErr->raiseError($this->lng->txt(
"no_page_in_clipboard"),
$ilErr->MESSAGE);
1438 == $this->object->getID()) {
1440 $new_page = $lm_page->copy();
1441 $id = $new_page->getId();
1447 $copied_nodes = array();
1448 $new_page = $lm_page->copyToOtherContObject($this->
object, $copied_nodes);
1449 $id = $new_page->getId();
1458 != $this->object->getID()) {
1462 $lm_page->setLMId($this->object->getID());
1464 $page = $lm_page->getPageObject();
1466 $page->setParentId($this->object->getID());
1473 $this->ctrl->redirect($this,
"pages");
1483 if (!isset(
$_POST[
"id"])) {
1484 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1491 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_copied"),
true);
1493 $this->ctrl->redirect($this,
"pages");
1503 public function delete($a_parent_subobj_id = 0)
1507 if (!isset(
$_POST[
"id"])) {
1508 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1512 $ilErr->raiseError($this->lng->txt(
"cont_select_item"),
$ilErr->MESSAGE);
1515 if ($a_parent_subobj_id == 0) {
1519 if ($a_parent_subobj_id != 0) {
1520 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd",
$_GET[
"backcmd"]);
1521 $this->ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1522 $form_action = $this->ctrl->getFormActionByClass(
"ilStructureObjectGUI");
1524 $this->ctrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
1525 $form_action = $this->ctrl->getFormAction($this);
1529 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1531 $cgui->setFormAction($form_action);
1532 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1533 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDelete");
1534 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDelete");
1540 " " . $obj->getTitle();
1542 $cgui->addItem(
"id[]",
$id, $caption);
1546 $this->tpl->setContent($cgui->getHTML());
1554 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1569 $tree->setTableNames(
'lm_tree',
'lm_data');
1570 $tree->setTreeTablePK(
"lm_id");
1574 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1581 $node_data =
$tree->getNodeData(
$id);
1582 if (is_object($obj)) {
1583 $obj->setLMId($this->object->getId());
1585 include_once(
"./Services/History/classes/class.ilHistory.php");
1587 $this->object->getId(),
1588 "delete_" . $obj->getType(),
1590 $this->object->getType()
1596 $tree->deleteTree($node_data);
1602 $this->
object->checkTree();
1605 ilUtil::sendSuccess($this->lng->txt(
"info_deleted"),
true);
1607 if ($a_parent_subobj_id == 0) {
1608 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
1624 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1627 for (
$i = 1;
$i < (count($tmpPath) - 1);
$i++) {
1632 $path .= $tmpPath[
$i][
"title"];
1651 $notoperations = array();
1653 $operations = array();
1657 if (!in_array(
$row[
"name"], $notoperations)) {
1658 $operations[] =
$row;
1663 if (count($operations) > 0) {
1664 foreach ($operations as $val) {
1665 $this->tpl->setCurrentBlock(
"operation_btn");
1666 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1667 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
1668 $this->tpl->parseCurrentBlock();
1671 $this->tpl->setCurrentBlock(
"operation");
1673 $this->tpl->parseCurrentBlock();
1682 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
1684 parent::viewObject();
1698 if (!isset(
$_POST[
"id"])) {
1699 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1701 if (count(
$_POST[
"id"]) > 1) {
1702 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
1706 $ilErr->raiseError($this->lng->txt(
"cont_select_item"),
$ilErr->MESSAGE);
1714 if ($a_parent_subobj_id == 0) {
1715 $this->ctrl->redirect($this,
"chapters");
1743 if (!isset(
$_POST[
"id"])) {
1744 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1747 ilUtil::sendInfo($this->lng->txt(
"cont_selected_items_have_been_cut"),
true);
1753 $this->ctrl->redirect($this,
"pages");
1761 if (
$_GET[
"new_type"] ==
"pg") {
1762 $this->ctrl->redirect($this,
"pages");
1764 $this->ctrl->redirect($this,
"chapters");
1776 if ($ot->getContentActivated()) {
1782 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
1784 $cont_exp->buildExportFile($opt);
1796 $changelink =
"<a href='" .
$ilCtrl->getLinkTarget($this,
"editMenuProperties") .
"'>" .
$lng->txt(
"change") .
"</a>";
1797 if (!$this->object->isActiveLMMenu()) {
1798 $add =
"<br />" .
$lng->txt(
"cont_download_no_menu") .
" " . $changelink;
1799 } elseif (!$this->object->isActiveDownloads()) {
1800 $add =
"<br />" .
$lng->txt(
"cont_download_no_download") .
" " . $changelink;
1803 $basetype = explode(
"_",
$a_type);
1804 $basetype = $basetype[0];
1806 if ($this->object->getPublicExportFile($basetype) == $a_file) {
1807 return $lng->txt(
"yes") . $add;
1822 if (!isset($a_files)) {
1825 foreach ($a_files as
$f) {
1826 $file = explode(
":",
$f);
1827 if (is_int(strpos($file[0],
"_"))) {
1828 $file[0] = explode(
"_", $file[0])[0];
1830 $export_dir = $this->
object->getExportDirectory($file[0]);
1832 if ($this->object->getPublicExportFile($file[0]) ==
1834 $this->
object->setPublicExportFile($file[0],
"");
1836 $this->
object->setPublicExportFile($file[0], $file[1]);
1839 $this->
object->update();
1841 $ilCtrl->redirectByClass(
"ilexportgui");
1851 if (!isset(
$_POST[
"file"])) {
1852 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1855 if (count(
$_POST[
"file"]) > 1) {
1856 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
1860 $export_dir = $this->
object->getOfflineDirectory();
1862 $file = basename(
$_POST[
"file"][0]);
1878 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1880 $cgui->setFormAction($this->ctrl->getFormAction($this));
1881 $cgui->setHeaderText($this->lng->txt(
"cont_fix_tree_confirm"));
1882 $cgui->setCancel($this->lng->txt(
"cancel"),
"showMaintenance");
1883 $cgui->setConfirm($this->lng->txt(
"cont_fix_tree"),
"fixTree");
1884 $issues = $this->
object->checkStructure();
1886 if (count($issues) > 0) {
1887 $mess =
"Found Issues: <br>" . implode(
"<br>", $issues);
1889 $this->tpl->setContent($cgui->getHTML() . $mess);
1897 $this->
object->fixTree();
1898 ilUtil::sendSuccess($this->lng->txt(
"cont_tree_fixed"),
true);
1899 $this->ctrl->redirect($this,
"showMaintenance");
1907 $a_export_format =
"",
1908 $a_active =
"content",
1909 $a_use_global_tabs =
false,
1910 $a_as_subtabs =
false,
1913 $a_export_all =
false
1923 $ilHelp->setScreenIdComponent(
"lm");
1925 if ($a_as_subtabs) {
1926 $addcmd =
"addSubTabTarget";
1927 $getcmd =
"getSubTabHTML";
1929 $addcmd =
"addTarget";
1930 $getcmd =
"getHTML";
1933 $active[$a_active] =
true;
1935 if (!$this->object->isActiveLMMenu()) {
1939 if ($a_use_global_tabs) {
1952 $showViewInFrameset =
true;
1954 if ($showViewInFrameset && !$a_offline) {
1957 $buttonTarget =
"_top";
1960 if ($a_export_format ==
"scorm") {
1965 if (!$a_offline && $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
1966 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
1969 $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"layout"),
1975 if ($active[
"content"]) {
1976 $ilHelp->setScreenId(
"content");
1977 $ilHelp->setSubScreenId(
"content");
1979 } elseif ($a_offline) {
1980 $tabs_gui->setForcePresentationOfSingleTab(
true);
1984 if ($this->object->isActiveTOC() && $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
1986 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
1987 $link =
$ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showTableOfContents");
1989 if ($a_export_all) {
1990 $link =
"./table_of_contents_" . $a_lang .
".html";
1992 $link =
"./table_of_contents.html";
2006 if ($this->object->isActivePrintView() && $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
2008 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
2009 $link =
$ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showPrintViewSelection");
2022 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
2023 $is_public = $this->
object->isActiveDownloadsPublic();
2028 if ($this->object->isActiveDownloads() && !$a_offline && $is_public &&
2029 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
2030 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
2031 $link =
$ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"showDownloadList");
2043 if ($a_export_format !=
"scorm" && !$a_offline) {
2045 $ilCtrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
2046 $link = $this->ctrl->getLinkTargetByClass(
2047 array(
"illmpresentationgui",
"ilinfoscreengui"),
2051 $link =
"./info.html";
2064 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2066 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]) &&
2068 include_once
'./Services/Object/classes/class.ilObjectLP.php';
2072 "learning_progress",
2073 $this->ctrl->getLinkTargetByClass(array(
"illmpresentationgui",
"illearningprogressgui"),
"editManual"),
2077 $active[
"learning_progress"]
2081 "learning_progress",
2082 $this->ctrl->getLinkTargetByClass(array(
"illmpresentationgui",
"illearningprogressgui"),
"showtlt"),
2086 $active[
"learning_progress"]
2093 $entries = $this->lmme_obj->getMenuEntries(
true);
2094 if (count($entries) > 0 && $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
2095 foreach ($entries as $entry) {
2097 if ($entry[
"type"] ==
"intern") {
2098 $entry[
"link"] = ILIAS_HTTP_PATH .
"/goto.php?target=" . $entry[
"link"];
2102 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:')) {
2103 $entry[
"link"] =
"http://" . $entry[
"link"];
2106 if (!strstr($entry[
"link"],
'mailto:')) {
2122 if (!$a_offline && $a_cur_page > 0) {
2125 $page_id = $a_cur_page;
2128 ILIAS_HTTP_PATH .
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" .
$_GET[
"ref_id"] .
2129 "&obj_id=" . $page_id .
"&to_page=1",
2133 $active[
"edit_page"]
2139 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
2140 $plugin_html =
false;
2141 foreach ($pl_names as $pl) {
2143 $gui_class = $ui_plugin->getUIClassInstance();
2144 $resp = $gui_class->modifyGUI(
2145 "Modules/LearningModule",
2159 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2161 $cont_exp->buildExportFile();
2162 $this->offlineList();
2170 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
2173 if ($ot->getContentActivated()) {
2177 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2179 $cont_exp->buildExportFile();
2187 require_once(
"./Modules/LearningModule/classes/class.ilContObjectExport.php");
2189 $cont_exp->buildExportFile();
2201 if (!$a_omit_obj_id) {
2204 $lmtree = $this->
object->getTree();
2209 $path = $lmtree->getPathFull($lmtree->getRootId());
2211 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
2217 if (
$row[
"child"] == 1) {
2218 $this->ctrl->setParameter($this,
"obj_id",
"");
2219 $locator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"chapters"));
2222 switch (
$row[
"type"]) {
2224 $this->ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id",
$row[
"child"]);
2225 $locator->addItem(
$title, $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
2229 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$row[
"child"]);
2230 $locator->addItem(
$title, $this->ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
2235 if (!$a_omit_obj_id) {
2236 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
2255 include_once(
"./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
2270 include_once(
"./Modules/LearningModule/classes/class.ilLMBlockedUsersTableGUI.php");
2283 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
2284 if (is_array(
$_POST[
"userquest_id"])) {
2285 foreach (
$_POST[
"userquest_id"] as $uqid) {
2286 $uqid = explode(
":", $uqid);
2289 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
2291 $ilCtrl->redirect($this,
"listBlockedUsers");
2302 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
2303 if (is_array(
$_POST[
"userquest_id"])) {
2304 foreach (
$_POST[
"userquest_id"] as $uqid) {
2305 $uqid = explode(
":", $uqid);
2308 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
2310 $ilCtrl->redirect($this,
"listBlockedUsers");
2320 if (!is_array(
$_POST[
"userquest_id"])) {
2322 $ilCtrl->redirect($this,
"listBlockedUsers");
2326 foreach (
$_POST[
"userquest_id"] as $uqid) {
2327 $uqid = explode(
":", $uqid);
2329 if (!in_array(
$login, $rcps)) {
2333 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
2340 'rcp_to' => implode(
',', $rcps),
2351 $link = chr(13) . chr(10) . chr(13) . chr(10);
2352 $link .= $this->lng->txt(
'cont_blocked_users_mail_link');
2353 $link .= chr(13) . chr(10) . chr(13) . chr(10);
2354 include_once
'./Services/Link/classes/class.ilLink.php';
2356 return rawurlencode(base64_encode($link));
2373 $ilHelp->setScreenIdComponent(
"lm");
2376 parent::setTitleAndDescription();
2377 $this->tpl->setTitle($this->object->getTitle());
2378 $this->tpl->setTitleIcon(
2400 $lng->txt(
"cont_chapters"),
2401 $ilCtrl->getLinkTarget($this,
"chapters")
2407 $lng->txt(
"cont_all_pages"),
2408 $ilCtrl->getLinkTarget($this,
"pages")
2414 $lng->txt(
"cont_short_titles"),
2415 $ilCtrl->getLinkTargetByClass(
"illmeditshorttitlesgui",
"")
2419 if (
$lm_set->get(
"html_export_ids")) {
2423 $lng->txt(
"cont_html_export_ids"),
2424 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
2429 $lng->loadLanguageModule(
"help");
2432 $lng->txt(
"cont_online_help_ids"),
2433 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
2438 $lng->txt(
"help_tooltips"),
2439 $ilCtrl->getLinkTarget($this,
"showTooltipList")
2446 $lng->txt(
"cont_internal_links"),
2447 $ilCtrl->getLinkTarget($this,
"listLinks")
2453 $lng->txt(
"link_check"),
2454 $ilCtrl->getLinkTarget($this,
"linkChecker")
2459 $lng->txt(
"history"),
2460 $this->ctrl->getLinkTarget($this,
"history")
2466 $lng->txt(
"cont_maintenance"),
2467 $ilCtrl->getLinkTarget($this,
"showMaintenance")
2473 $lng->txt(
"cont_subtitle_files"),
2474 $ilCtrl->getLinkTargetByClass(
"ilmobmultisrtuploadgui",
"")
2480 $lng->txt(
"cont_import"),
2481 $ilCtrl->getLinkTargetByClass(
"illmimportgui",
"")
2484 $ilTabs->activateSubTab($a_active);
2485 $ilTabs->activateTab(
"content");
2502 $lng->txt(
"cont_question_stats"),
2503 $ilCtrl->getLinkTarget($this,
"listQuestions")
2509 $lng->txt(
"cont_blocked_users"),
2510 $ilCtrl->getLinkTarget($this,
"listBlockedUsers")
2513 $ilTabs->activateSubTab($a_active);
2528 $lng->txt(
"content"),
2529 $this->ctrl->getLinkTarget($this,
"chapters")
2535 $lng->txt(
"info_short"),
2536 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary')
2542 $lng->txt(
"settings"),
2543 $this->ctrl->getLinkTarget($this,
'properties')
2549 $lng->txt(
"objs_qst"),
2550 $this->ctrl->getLinkTarget($this,
"listQuestions")
2554 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2557 'learning_progress',
2558 $lng->txt(
"learning_progress"),
2559 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
'')
2563 if ($this->object->getType() !=
"lm") {
2567 $lng->txt(
"bib_data"),
2568 $this->ctrl->getLinkTarget($this,
"editBibItem")
2573 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
2575 $mdtab = $mdgui->getTab();
2579 $lng->txt(
"meta_data"),
2584 if ($this->object->getType() ==
"lm") {
2588 $lng->txt(
"export"),
2589 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
2594 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
2597 $lng->txt(
"perm_settings"),
2598 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
2603 $ilTabs->activateTab($a_act);
2607 $ilTabs->addNonTabbedLink(
2609 $lng->txt(
"cont_presentation_view"),
2610 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->object->getRefID(),
2625 array(
"settings",
"cont_style",
"cont_lm_menu",
"public_section",
2626 "cont_glossaries",
"cont_multilinguality",
"obj_multilinguality",
2630 $ilTabs->addSubTabTarget(
2632 $this->ctrl->getLinkTarget($this,
'properties'),
2638 $ilTabs->addSubTabTarget(
2640 $this->ctrl->getLinkTarget($this,
'editStyleProperties'),
2646 $ilTabs->addSubTabTarget(
2648 $this->ctrl->getLinkTarget($this,
'editMenuProperties'),
2654 $ilTabs->addSubTabTarget(
2656 $this->ctrl->getLinkTarget($this,
'editGlossaries'),
2663 $ilTabs->addSubTabTarget(
2665 $this->ctrl->getLinkTarget($this,
'editPublicSection'),
2671 $ilTabs->addSubTabTarget(
2672 "obj_multilinguality",
2673 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
2677 if ($lti_settings->hasSettingsAccess()) {
2678 $ilTabs->addSubTabTarget(
2680 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
2684 $ilTabs->setSubTabActive($a_active);
2695 if (!$ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
"read",
"", $this->object->getRefId())) {
2701 $ilTabs->setTabActive(
"settings");
2703 $this->tpl->addBlockFile(
2706 "tpl.lm_public_selector.html",
2707 "Modules/LearningModule"
2715 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
2716 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2718 $si->setOptions($modes);
2719 $si->setValue($this->object->getPublicAccessMode());
2720 $ilToolbar->addInputItem(
$si,
true);
2721 $ilToolbar->addFormButton($this->lng->txt(
"save"),
"savePublicSectionAccess");
2722 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
"savePublicSectionAccess"));
2724 if ($this->object->getPublicAccessMode() ==
"selected") {
2725 $this->tpl->setCurrentBlock(
"select_pages");
2726 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSectionPages"));
2728 include_once(
"./Modules/LearningModule/classes/class.ilPublicSectionExplorerGUI.php");
2730 $tree->setSelectMode(
"pages",
true);
2731 $tree->setSkipRootNode(
true);
2733 $this->tpl->setVariable(
"EXPLORER",
$tree->getHTML());
2734 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2736 $this->tpl->parseCurrentBlock();
2743 $this->
object->setPublicAccessMode(
$_POST[
"lm_public_mode"]);
2744 $this->
object->updateProperties();
2746 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
2747 $this->ctrl->redirect($this,
"editPublicSection");
2755 $this->
object->setPublicAccessMode(
$_POST[
"lm_public_mode"]);
2756 $this->
object->updateProperties();
2757 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
2758 $this->ctrl->redirect($this,
"editPublicSection");
2767 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
2768 $this->ctrl->redirect($this,
"editPublicSection");
2781 require_once(
"./Services/History/classes/class.ilHistoryTableGUI.php");
2785 $this->object->getId(),
2786 $this->object->getType()
2788 $hist_gui->initTable();
2789 $hist_gui->setCommentVisibility($this->object->isActiveHistoryUserComments());
2791 $this->tpl->setContent($hist_gui->getHTML());
2806 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
2808 $actions->setSelectionHeaderClass(
'small');
2809 $actions->setItemLinkClass(
'xsmall');
2810 $actions->setListTitle($this->lng->txt(
'actions'));
2812 $this->ctrl->setParameterByClass(
'ilLMPageObjectGUI',
'obj_id',
$row[
'page_id']);
2814 $this->lng->txt(
'edit'),
2816 $this->ctrl->getLinkTargetByClass(
'ilLMPageObjectGUI',
'edit')
2818 $this->ctrl->clearParametersByClass(
'ilLMPageObjectGUI');
2834 require_once
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
2839 include_once
"Services/Cron/classes/class.ilCronManager.php";
2841 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2842 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2844 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
2847 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
2850 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
2851 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
2855 $tgui->setLinkChecker($this->link_checker_obj)
2856 ->setRowHandler($this)
2857 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
2859 return $tpl->setContent($tgui->prepareHTML()->getHTML() .
$toolbar->getHTML());
2867 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2870 $link_check_notify->setUserId(
$ilUser->getId());
2871 $link_check_notify->setObjId($this->object->getId());
2873 if (
$_POST[
'link_check_message']) {
2874 ilUtil::sendSuccess($this->lng->txt(
'link_check_message_enabled'));
2875 $link_check_notify->addNotifier();
2877 ilUtil::sendSuccess($this->lng->txt(
'link_check_message_disabled'));
2878 $link_check_notify->deleteNotifier();
2890 $this->link_checker_obj->checkLinks();
2891 ilUtil::sendSuccess($this->lng->txt(
'link_checker_refreshed'));
2902 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
2905 $this->link_checker_obj->setObjId($this->object->getId());
2912 include_once
'./Modules/LearningModule/classes/class.ilLMMenuEditor.php';
2915 $this->lmme_obj->setObjId($this->object->getId());
2932 $ilTabs->setTabActive(
"settings");
2935 $ilToolbar->addButton(
2936 $this->lng->txt(
"lm_menu_select_internal_object"),
2937 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
2941 $this->tpl->setContent(
$form->getHTML());
2954 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2958 $ti =
new ilTextInputGUI($this->lng->txt(
"lm_menu_entry_title"),
"title");
2959 $ti->setMaxLength(255);
2961 $form->addItem($ti);
2964 $ta =
new ilTextInputGUI($this->lng->txt(
"lm_menu_entry_target"),
"target");
2965 $ta->setMaxLength(255);
2967 $form->addItem($ta);
2969 if ($a_mode ==
"edit") {
2971 $this->lmme_obj->readEntry($_REQUEST[
"menu_entry"]);
2972 $ti->setValue($this->lmme_obj->getTitle());
2973 $ta->setValue($this->lmme_obj->getTarget());
2976 if (isset(
$_GET[
"link_ref_id"])) {
2977 $link_ref_id = (int)
$_GET[
"link_ref_id"];
2982 $target_link = $obj_type .
"_" . $link_ref_id;
2984 $ta->setValue($target_link);
2988 $hi->setValue($link_ref_id);
2989 $form->addItem($hi);
2994 if ($a_mode ==
"create") {
2995 $form->addCommandButton(
"saveMenuEntry",
$lng->txt(
"save"));
2996 $form->addCommandButton(
"editMenuProperties",
$lng->txt(
"cancel"));
2997 $form->setTitle(
$lng->txt(
"lm_menu_new_entry"));
2999 $form->addCommandButton(
"updateMenuEntry",
$lng->txt(
"save"));
3000 $form->addCommandButton(
"editMenuProperties",
$lng->txt(
"cancel"));
3001 $form->setTitle(
$lng->txt(
"lm_menu_edit_entry"));
3017 if (empty(
$_POST[
"title"])) {
3019 $ilCtrl->redirect($this,
"addMenuEntry");
3021 if (empty(
$_POST[
"target"])) {
3023 $ilCtrl->redirect($this,
"addMenuEntry");
3027 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3028 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3029 $this->lmme_obj->setLinkRefId(
$_POST[
"link_ref_id"]);
3031 if (
$_POST[
"link_ref_id"]) {
3032 $this->lmme_obj->setLinkType(
"intern");
3035 $this->lmme_obj->create();
3037 ilUtil::sendSuccess($this->lng->txt(
"msg_entry_added"),
true);
3038 $this->ctrl->redirect($this,
"editMenuProperties");
3048 if (empty(
$_GET[
"menu_entry"])) {
3049 $ilErr->raiseError($this->lng->txt(
"no_menu_entry_id"),
$ilErr->MESSAGE);
3053 $this->lmme_obj->delete(
$_GET[
"menu_entry"]);
3055 ilUtil::sendSuccess($this->lng->txt(
"msg_entry_removed"),
true);
3056 $this->ctrl->redirect($this,
"editMenuProperties");
3071 $ilTabs->setTabActive(
"settings");
3075 if (empty(
$_GET[
"menu_entry"])) {
3076 $ilErr->raiseError($this->lng->txt(
"no_menu_entry_id"),
$ilErr->MESSAGE);
3079 $ilCtrl->saveParameter($this, array(
"menu_entry"));
3080 $ilToolbar->addButton(
3081 $this->lng->txt(
"lm_menu_select_internal_object"),
3082 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
3086 $this->tpl->setContent(
$form->getHTML());
3096 if (empty($_REQUEST[
"menu_entry"])) {
3097 $ilErr->raiseError($this->lng->txt(
"no_menu_entry_id"),
$ilErr->MESSAGE);
3101 if (empty(
$_POST[
"title"])) {
3102 $ilErr->raiseError($this->lng->txt(
"please_enter_title"),
$ilErr->MESSAGE);
3104 if (empty(
$_POST[
"target"])) {
3105 $ilErr->raiseError($this->lng->txt(
"please_enter_target"),
$ilErr->MESSAGE);
3109 $this->lmme_obj->readEntry($_REQUEST[
"menu_entry"]);
3110 $this->lmme_obj->setTitle(
$_POST[
"title"]);
3111 $this->lmme_obj->setTarget(
$_POST[
"target"]);
3112 if (
$_POST[
"link_ref_id"]) {
3113 $this->lmme_obj->setLinkType(
"intern");
3115 if (is_int(strpos(
$_POST[
"target"],
"."))) {
3116 $this->lmme_obj->setLinkType(
"extern");
3118 $this->lmme_obj->update();
3120 ilUtil::sendSuccess($this->lng->txt(
"msg_entry_updated"),
true);
3121 $this->ctrl->redirect($this,
"editMenuProperties");
3131 $ilTabs->setTabActive(
"settings");
3134 $ilCtrl->saveParameter($this, array(
"menu_entry"));
3136 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_menu_object_selector.html",
"Modules/LearningModule");
3140 require_once(
"./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
3143 $exp->setExpand(
$_GET[
"lm_menu_expand"] ?
$_GET[
"lm_menu_expand"] : $this->tree->readRootId());
3144 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showEntrySelector'));
3145 $exp->setTargetGet(
"ref_id");
3146 $exp->setRefId($this->cur_ref_id);
3148 $sel_types = array(
'mcst',
'mep',
'cat',
'lm',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
3149 "crs",
"grp",
"book",
"tst",
"file");
3150 $exp->setSelectableTypes($sel_types);
3157 foreach ($exp->format_options as $node) {
3158 if (!$node[
"container"]) {
3159 $pages[] = $node[
"child"];
3164 $this->tpl->setVariable(
"TXT_SET_PUBLIC_MODE", $this->lng->txt(
"set_public_mode"));
3165 $this->tpl->setVariable(
"TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt(
"choose_public_mode"));
3166 $modes = array(
"complete" => $this->lng->txt(
"all_pages"),
"selected" => $this->lng->txt(
"selected_pages_only"));
3167 $select_public_mode =
ilUtil::formSelect($this->object->getPublicAccessMode(),
"lm_public_mode", $modes,
false,
true);
3168 $this->tpl->setVariable(
"SELECT_PUBLIC_MODE", $select_public_mode);
3170 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"choose_public_pages"));
3171 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
3172 $this->tpl->setVariable(
"EXPLORER",
$output);
3173 $this->tpl->setVariable(
"ONCLICK", $js_pages);
3174 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
3175 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
3176 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
3177 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getLinkTarget($this,
"savePublicSection"));
3187 if (!isset(
$_POST[
"id"])) {
3188 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
3190 if (count(
$_POST[
"id"]) > 1) {
3191 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
3193 if (
$_POST[
"id"][0] != $this->object->getHeaderPage()) {
3194 $this->
object->setHeaderPage(
$_POST[
"id"][0]);
3196 $this->
object->setHeaderPage(0);
3198 $this->
object->updateProperties();
3199 $this->ctrl->redirect($this,
"pages");
3209 if (!isset(
$_POST[
"id"])) {
3210 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
3212 if (count(
$_POST[
"id"]) > 1) {
3213 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
3215 if (
$_POST[
"id"][0] != $this->object->getFooterPage()) {
3216 $this->
object->setFooterPage(
$_POST[
"id"][0]);
3218 $this->
object->setFooterPage(0);
3220 $this->
object->updateProperties();
3221 $this->ctrl->redirect($this,
"pages");
3233 ilUtil::sendSuccess($this->lng->txt(
"lm_save_titles"),
true);
3234 $ilCtrl->redirect($this,
"chapters");
3245 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3251 $parent_id = $this->lm_tree->getParentId($node_id);
3254 $parent_id = $node_id;
3258 for (
$i = 1;
$i <= $num;
$i++) {
3260 $chap->setType(
"st");
3261 $chap->setTitle(
$lng->txt(
"cont_new_chap"));
3262 $chap->setLMId($this->object->getId());
3267 $ilCtrl->redirect($this,
"chapters");
3279 include_once(
"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3284 $ilLog->write(
"InsertChapterClip, num: $num, node_id: $node_id, " .
3287 if (!$first_child) {
3288 $parent_id = $this->lm_tree->getParentId($node_id);
3291 $parent_id = $node_id;
3296 $chapters =
$ilUser->getClipboardObjects(
"st",
true);
3297 $copied_nodes = array();
3298 foreach ($chapters as $chap) {
3299 $ilLog->write(
"Call pasteTree, Target LM: " . $this->object->getId() .
", Chapter ID: " . $chap[
"id"]
3300 .
", Parent ID: " . $parent_id .
", Target: " .
$target);
3306 $chap[
"insert_time"],
3315 $ilUser->clipboardDeleteObjectsOfType(
"pg");
3316 $ilUser->clipboardDeleteObjectsOfType(
"st");
3320 $this->
object->checkTree();
3321 $ilCtrl->redirect($this,
"chapters");
3333 $ilAccess =
$DIC->access();
3337 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
3338 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3339 $_GET[
"ref_id"] = $a_target;
3340 $_GET[
"cmd"] =
"resume";
3341 include(
"ilias.php");
3343 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
3344 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
3345 $_GET[
"ref_id"] = $a_target;
3346 $_GET[
"cmd"] =
"infoScreen";
3347 include(
"ilias.php");
3349 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
3351 $lng->txt(
"msg_no_perm_read_item"),
3370 if (!is_array($items)) {
3372 $ilCtrl->redirect($this, $a_return);
3376 foreach ($items as $k => $item) {
3381 foreach ($todel as $k) {
3388 $ilCtrl->redirect($this, $a_return);
3400 if (!is_array($items)) {
3402 $ilCtrl->redirect($this,
"chapters");
3406 foreach ($items as $k => $item) {
3411 foreach ($todel as $k) {
3417 $ilCtrl->redirect($this,
"chapters");
3450 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
3451 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
3452 $lm_tree = $this->
object->getTree();
3453 $childs = $lm_tree->getChilds($lm_tree->readRootId());
3455 foreach ($childs as
$c) {
3461 $ilToolbar->addInputItem(
$si,
true);
3462 $ilToolbar->addFormButton(
$lng->txt(
"help_filter"),
"filterHelpChapters");
3464 include_once(
"./Modules/LearningModule/classes/class.ilHelpMappingTableGUI.php");
3467 include_once(
"./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
3485 $ilCtrl->redirect($this,
"showExportIDsOverview");
3499 if (is_array(
$_POST[
"exportid"])) {
3500 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id) {
3501 if ($exp_id !=
"" && !preg_match(
3502 "/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
3511 $lng->txt(
"cont_exp_ids_not_resp_format3") .
" " .
3512 $lng->txt(
"cont_exp_ids_not_resp_format2"));
3518 if (is_array(
$_POST[
"exportid"])) {
3519 foreach (
$_POST[
"exportid"] as $pg_id => $exp_id) {
3521 $this->object->getId(),
3529 ilUtil::sendSuccess(
$lng->txt(
"cont_saved_export_ids"),
true);
3530 $ilCtrl->redirect($this,
"showExportIdsOverview");
3544 include_once(
"./Services/Help/classes/class.ilHelpMapping.php");
3545 if (is_array(
$_POST[
"screen_ids"])) {
3546 foreach (
$_POST[
"screen_ids"] as $chap => $ids) {
3547 $ids = explode(
"\n", $ids);
3551 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3552 $ilCtrl->redirect($this,
"showExportIdsOverview");
3575 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
3576 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
3577 $ti =
new ilTextInputGUI($this->lng->txt(
"help_tooltip_id"),
"tooltip_id");
3578 $ti->setMaxLength(200);
3580 $ilToolbar->addInputItem($ti,
true);
3581 $ilToolbar->addFormButton(
$lng->txt(
"add"),
"addTooltip");
3582 $ilToolbar->addSeparator();
3584 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
3592 $ilToolbar->addInputItem(
$si,
true);
3593 $ilToolbar->addFormButton(
$lng->txt(
"help_filter"),
"filterTooltips");
3595 include_once(
"./Modules/LearningModule/classes/class.ilHelpTooltipTableGUI.php");
3613 if (trim($tt_id) !=
"") {
3614 if (is_int(strpos($tt_id,
"_"))) {
3615 include_once(
"./Services/Help/classes/class.ilHelp.php");
3617 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3619 $fu = strpos($tt_id,
"_");
3620 $comp = substr($tt_id, 0, $fu);
3626 $ilCtrl->redirect($this,
"showTooltipList");
3641 $ilCtrl->redirect($this,
"showTooltipList");
3656 include_once(
"./Services/Help/classes/class.ilHelp.php");
3658 if (is_array(
$_POST[
"text"])) {
3666 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3668 $ilCtrl->redirect($this,
"showTooltipList");
3679 if (is_array(
$_POST[
"id"])) {
3680 include_once(
"./Services/Help/classes/class.ilHelp.php");
3684 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3686 $ilCtrl->redirect($this,
"showTooltipList");
3706 if ($a_def_option !=
"") {
3710 $layout->addOption(
new ilRadioOption(
"<table><tr><td>" . $im_tag .
"</td><td><b>" .
3711 $lng->txt(
"cont_lm_default_layout") .
3712 "</b>: " .
$lng->txt(
"cont_layout_" . $a_def_option) .
3713 "</td></tr></table>",
""));
3720 $layout->addOption(
new ilRadioOption(
"<table><tr><td style='padding: 0px 5px 5px;'>" .
3721 $im_tag .
"</td><td style='padding:5px;'><b>" .
$lng->txt(
"cont_layout_" .
$l) .
"</b>: " .
3722 $lng->txt(
"cont_layout_" .
$l .
"_desc") .
"</td></tr></table>",
$l));
3734 $ilCtrl->setParameter($this,
"hierarchy",
"1");
3748 if (!is_array(
$_POST[
"id"])) {
3751 if ($a_in_hierarchy) {
3752 $ilCtrl->redirect($this,
"chapters");
3754 $ilCtrl->redirect($this,
"pages");
3760 $tpl->setContent($this->form->getHTML());
3771 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3774 if (is_array(
$_POST[
"id"])) {
3778 $this->form->addItem($hi);
3782 $lng->txt(
"cont_layout"),
3784 $this->object->getLayout()
3786 $this->form->addItem($layout);
3788 $this->form->addCommandButton(
"savePageLayout",
$lng->txt(
"save"));
3789 $this->form->addCommandButton(
"pages",
$lng->txt(
"cancel"));
3791 $this->form->setTitle(
$lng->txt(
"cont_set_layout"));
3792 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
3803 $ilCtrl->setParameter($this,
"hierarchy",
$_GET[
"hierarchy"]);
3812 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3814 if (
$_GET[
"hierarchy"] == 1) {
3815 $ilCtrl->redirect($this,
"chapters");
3817 $ilCtrl->redirect($this,
"pages");
3840 $ilTabs->setTabActive(
"settings");
3843 $ilToolbar->addButton(
3845 $ilCtrl->getLinkTarget($this,
"showLMGlossarySelector")
3848 include_once(
"./Modules/LearningModule/classes/class.ilLMGlossaryTableGUI.php");
3870 $ilTabs->setTabActive(
"settings");
3873 include_once
'Services/Search/classes/class.ilSearchRootSelector.php';
3876 $exp->setExpand(
$_GET[
"search_root_expand"] ?
$_GET[
"search_root_expand"] :
$tree->readRootId());
3877 $exp->setExpandTarget(
$ilCtrl->getLinkTarget($this,
'showLMGlossarySelector'));
3878 $exp->setTargetClass(get_class($this));
3879 $exp->setCmd(
'confirmGlossarySelection');
3880 $exp->setClickableTypes(array(
"glo"));
3881 $exp->addFilter(
"glo");
3885 $tpl->setContent($exp->getOutput());
3897 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
3899 $ilCtrl->setParameter($this,
"glo_ref_id",
$_GET[
"root_id"]);
3900 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
3901 $cgui->setHeaderText(
$lng->txt(
"cont_link_glo_in_lm"));
3902 $cgui->setCancel(
$lng->txt(
"no"),
"selectLMGlossary");
3903 $cgui->setConfirm(
$lng->txt(
"yes"),
"selectLMGlossaryLink");
3904 $tpl->setContent($cgui->getHTML());
3915 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
3917 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
3933 $glos = $this->
object->getAutoGlossaries();
3934 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
3936 if (!in_array($glo_id, $glos)) {
3939 $this->
object->setAutoGlossaries($glos);
3940 $this->
object->update();
3942 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3943 $ilCtrl->redirect($this,
"editGlossaries");
3957 $this->
object->removeAutoGlossary((
int)
$_GET[
"glo_id"]);
3958 $this->
object->update();
3960 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
3961 $ilCtrl->redirect($this,
"editGlossaries");
3974 $ilCtrl->setParameter($this,
"transl",
"");
3975 if (
$_GET[
"lang_switch_mode"] ==
"short_titles") {
3976 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
3978 $ilCtrl->redirect($this,
"chapters");
3991 $ilCtrl->setParameter($this,
"transl",
$_GET[
"totransl"]);
3992 if (
$_GET[
"lang_switch_mode"] ==
"short_titles") {
3993 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
3995 $ilCtrl->redirect($this,
"chapters");
4001 return parent::redrawHeaderActionObject();
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
User interface class for advanced drop-down selection lists.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
Export class for content objects.
static isJobActive($a_job_id)
Check if given job is currently active.
Class ilECSLearningModuleSettings.
static getContentObjectId()
static getContentObjectType()
static setAction($a_action)
static storeContentObject($a_type, $a_id, $a_action="cut")
Base class for ILIAS Exception handling.
Export User Interface Class.
static saveScreenIdsForChapter($a_chap, $a_ids)
Save screen ids for chapter.
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.
static updateTooltip($a_id, $a_text, $a_tt_id)
Update tooltip.
static getTooltipComponents($a_module_id=0)
Get all tooltip components.
static deleteTooltip($a_id)
Delete tooltip.
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24....
static _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.
TableGUI class for glossary tables.
Import related features for learning modules.
Handler class for multi srt upload in learning modules.
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.
static saveExportId($a_lm_id, $a_lmobj_id, $a_exp_id, $a_type="pg")
Save export id.
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static _lookupTitle($a_obj_id)
Lookup title.
static _writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content object@access public
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
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.
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="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
TableGUI class for all pages of a learning module.
const LP_MODE_COLLECTION_TLT
const LP_MODE_COLLECTION_MANUAL
GUI class for LTI provider object settings.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
class for checking external links in page objects.
static _getNotifyStatus($a_usr_id, $a_obj_id)
class ilLinkCheckerTableGUI
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
TableGUI class for (broken) links in learning module.
manifest.xml file not found-exception for import
Upload SRT files to a set of media objects.
This class represents a non editable value in a property form.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
const TYPE_LM_BLOCKED_USERS
Class ilObjContentObjectGUI.
fixTreeConfirm()
confirm screen for tree fixing
addMenuEntry()
display add menu entry form
setPageLayout($a_in_hierarchy=false)
Set layout for multipl pages.
deleteTooltips()
Delete tooltips.
removeLMGlossary()
Remove lm glossary.
deleteMenuEntry()
drop a menu entry
sendMailToBlockedUsers()
Send Mail to blocked users.
properties()
edit properties form
selectLMGlossary()
Select lm glossary.
saveExportIds()
Save export IDs.
filterTooltips()
Filter tooltips.
showExportIDsOverview($a_validation=false)
Show export IDs overview.
savePageLayout()
Save page layout.
deleteStyle()
Delete Style.
static getMultiLangHeader($a_lm_id, $a_gui_class, $a_mode="")
Get multi lang header.
setTabs($a_act="")
output tabs
filterHelpChapters()
Filter help chapters.
unlockQuestion()
Unlock blocked question.
getContextPath($a_endnode_id, $a_startnode_id=1)
get context path in content object tree
addLocations($a_omit_obj_id=false)
display locator
confirmGlossarySelection()
Confirm glossary selection.
importObject()
display dialogue for importing XML-LeaningObjects
cutItems($a_return="chapters")
Copy items to clipboard, then cut them from the current tree.
showMaintenance()
Show maintenance.
showActions($a_actions)
show possible action (form buttons)
selectHeader()
select page as header
savePublicSectionPages()
Saves public lm pages.
importFileObject($parent_id=null, $a_catch_errors=true)
display status information or report errors messages in case of error
initSetPageLayoutForm()
Init set page layout form.
savePublicSectionAccess()
Saves lm access mode.
insertChapter()
Insert (multiple) chapters at node.
executeCommand()
execute command
setilLMMenu( $a_offline=false, $a_export_format="", $a_active="content", $a_use_global_tabs=false, $a_as_subtabs=false, $a_cur_page=0, $a_lang="", $a_export_all=false)
get lm menu html
saveAllTitles()
Save all titles of chapters/pages.
formatInvalidLinkArray(array $row)
editStyleProperties()
Edit style properties.
copyItems()
Copy items to clipboard.
saveMenuProperties()
save properties
initPropertiesForm()
Init properties form.
proceedDragDrop()
proceed drag and drop operations on pages/chapters
publishExportFile($a_files)
download export file
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
Constructor.
confirmedDelete($a_parent_subobj_id=0)
delete page object or structure objects
exportSCORM()
create scorm package
pasteChapter($a_parent_subobj_id=0)
paste chapter
exportHTML()
create html package
saveHelpMapping()
Save help mapping.
cutChapter()
Cut chapter(s)
saveTooltips()
Save tooltips.
exportObject()
export object
getPropertiesFormValues()
Get values for properties form.
editMasterLanguage()
Edit master language.
static _goto($a_target)
redirect script
popup()
popup window for wysiwyg editor
saveMenuEntry()
save new menu entry
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
showTooltipList()
Show export IDs overview.
initMenuForm()
Init menu form.
listLinks()
List all broken links.
listQuestions()
List questions.
selectFooter()
select page as footer
createStyle()
Create Style.
setContentSubTabs($a_active)
Set pages tabs.
initMenuEntryForm($a_mode="edit")
Init menu entry form.
initStylePropertiesForm()
Init style properties form.
setSubTabs($a_active)
Set sub tabs.
setPageLayoutInHierarchy()
Set layout for multipl pages.
saveProperties()
save properties
switchToLanguage()
Switch to language.
createPDF()
export content object
listBlockedUsers()
List blocked users.
updateMenuEntry()
update a menu entry
insertChapterClip()
Insert Chapter from clipboard.
activatePages()
activates or deactivates pages
moveChapter($a_parent_subobj_id=0)
move a single chapter (selection)
downloadPDFFile()
download export file
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
view()
view content object
explorer()
output explorer tree
static getLayoutOption($a_txt, $a_var, $a_def_option="")
Get layout option.
selectLMGlossaryLink()
Select a glossary and link all its terms.
cancelDelete()
cancel delete
showLMGlossarySelector()
Select LM Glossary.
copyChapter($a_parent_subobj_id=0)
copy a single chapter (selection)
initImportForm($a_new_type)
Init import form.
editMenuEntry()
edit menu entry form
getBlockedUsersMailSignature()
Get mail signature for blocked users.
editGlossaries()
Edit automatically linked glossaries.
saveStyleSettings()
Save style settings.
setQuestionsSubTabs($a_active)
Set pages tabs.
export()
export content object
addTabs($a_act="")
Adds tabs.
resetNumberOfTries()
Reset number of tries.
editMenuProperties()
Edit menu properies.
Class ilObjContentObject.
static getAvailableLayouts()
get all available lm layouts
static isOnlineHelpModule($a_id, $a_as_obj_id=false)
Is module an online module.
Class ilObjLearningModule.
Class ilObjStyleSheetGUI.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupLogin($a_user_id)
lookup login
GUI class for the workflow of copying objects.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
viewObject()
list childs of current object
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
addHeaderAction()
Add header action menu.
createObject()
create new object form
setTabs()
set admin tabs @access public
static getInstance($a_obj_id)
GUI class for object translation handling.
static getInstance($a_obj_id)
Get instance.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
update()
update object in db
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
getRefId()
get reference id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
Page multilinguality GUI class.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static _writeActive($a_id, $a_parent_type, $a_active, $a_reset_scheduled_activation=true, $a_lang="-")
write activation status
static resetTries($a_q_id, $a_user_id)
Reset tries.
static unlock($a_q_id, $a_user_id)
Reset tries.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
tree explorer lm public area
This class represents an option in a radio group.
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
Class ilStructureObjectGUI.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
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 getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
if(!array_key_exists('StateId', $_REQUEST)) $id
interface ilLinkCheckerGUIRowHandling
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
if(empty($password)) $table
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list