41 protected \ILIAS\LearningModule\InternalGUIService
$gui;
42 protected \ILIAS\LearningModule\InternalDomainService
$domain;
53 protected \ILIAS\DI\UIServices
$ui;
92 bool $a_call_by_reference =
true,
93 bool $a_prepare_output =
false
97 $this->
lng = $DIC->language();
98 $this->
access = $DIC->access();
99 $this->
tabs = $DIC->tabs();
101 $this->
user = $DIC->user();
102 $this->tpl =
$DIC[
"tpl"];
103 $this->
toolbar = $DIC->toolbar();
104 $this->rbacsystem =
$DIC->rbac()->system();
105 $this->tree =
$DIC->repositoryTree();
106 $this->
help = $DIC[
"ilHelp"];
107 $this->
locator = $DIC[
"ilLocator"];
108 $this->db =
$DIC->database();
109 $this->log =
$DIC[
"ilLog"];
110 $this->
ui = $DIC->ui();
112 $ilCtrl =
$DIC->ctrl();
113 $this->
ctrl = $ilCtrl;
114 $this->component_repository =
$DIC[
"component.repository"];
119 $this->edit_request =
$DIC
127 $this->to_props =
$req->getToProps();
128 $this->requested_obj_id =
$req->getObjId();
129 $this->requested_ref_id =
$req->getRefId();
130 $this->requested_root_id =
$req->getRootId();
131 $this->requested_glo_id =
$req->getGlossaryId();
132 $this->requested_glo_ref_id =
$req->getGlossaryRefId();
133 $this->requested_menu_entry =
$req->getMenuEntry();
134 $this->requested_lm_menu_expand =
$req->getLMMenuExpand();
135 $this->requested_search_root_expand =
$req->getSearchRootExpand();
136 $this->requested_new_type =
$req->getNewType();
137 $this->requested_baseClass =
$req->getBaseClass();
138 $this->requested_transl =
$req->getTranslation();
139 $this->requested_backcmd =
$req->getBackCmd();
140 $this->requested_hierarchy =
$req->getHierarchy();
141 $this->lang_switch_mode =
$req->getLangSwitchMode();
142 $this->requested_active_node =
$req->getActiveNode();
143 $this->requested_lmexpand =
$req->getLMExpand();
144 $this->requested_link_ref_id =
$req->getLinkRefId();
145 $this->requested_totransl =
$req->getToTranslation();
146 $this->requested_lmmovecopy =
$req->getLMMoveCopy();
147 $this->content_style_service =
$DIC
150 $id = (isset($this->
object))
153 $this->reading_time_gui = new \ILIAS\LearningModule\ReadingTime\SettingsGUI(
$id);
154 $this->domain =
$DIC->learningModule()->internal()->domain();
155 $this->gui =
$DIC->learningModule()->internal()->gui();
161 $baseclass = strtolower($this->requested_baseClass);
162 $next_class = strtolower($this->
ctrl->getNextClass());
165 if (!in_array($baseclass, [
"illmpresentationgui",
"illmeditorgui"])) {
168 if (in_array($next_class, [
"ilcommonactiondispatchergui"])) {
189 if ($this->
ctrl->getRedirectSource() ==
"ilinternallinkgui") {
195 if ($this->
ctrl->getCmdClass() ==
"ilinternallinkgui") {
196 $this->
ctrl->setReturn($this,
"explorer");
200 $next_class = $this->
ctrl->getNextClass($this);
203 if ($this->to_props) {
204 $cmd = $this->
ctrl->getCmd(
"properties");
206 $cmd = $this->
ctrl->getCmd(
"chapters");
209 switch ($next_class) {
210 case 'illtiproviderobjectsettinggui':
213 $ilTabs->setTabActive(
"settings");
217 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->
rbac()->review()->getLocalRoles($this->lm->getRefId()));
218 $lti_gui->offerLTIRolesForSelection(
true);
219 $this->
ctrl->forwardCommand($lti_gui);
224 case "illearningprogressgui":
227 $this->
setTabs(
"learning_progress");
230 $this->
ctrl->forwardCommand($new_gui);
234 case 'ilobjectmetadatagui':
235 if (!$ilAccess->checkAccess(
'write',
'', $this->lm->getRefId())) {
244 $md_gui->addMDObserver($this->lm,
'MDUpdateListener',
'Educational');
245 $md_gui->addMDObserver($this->lm,
'MDUpdateListener',
'General');
246 $this->
ctrl->forwardCommand($md_gui);
249 case "ilobjectcontentstylesettingsgui":
257 $settings_gui = $this->content_style_service
259 ->objectSettingsGUIForRefId(
263 $this->
ctrl->forwardCommand($settings_gui);
267 case "illmpageobjectgui":
269 $ilTabs->setBackTarget(
271 $ilCtrl->getLinkTarget($this,
"chapters")
273 $this->
ctrl->saveParameter($this, array(
"obj_id"));
275 $this->
ctrl->setReturn($this,
"chapters");
278 if ($this->requested_obj_id > 0) {
281 $pg_gui->setLMPageObject($obj);
283 $this->
ctrl->forwardCommand($pg_gui);
286 case "ilstructureobjectgui":
287 $ilTabs->setBackTarget(
289 $ilCtrl->getLinkTarget($this,
"chapters")
292 $this->
ctrl->saveParameter($this, array(
"obj_id"));
294 $this->
ctrl->setReturn($this,
"chapters");
296 if ($this->requested_obj_id > 0) {
299 $st_gui->setStructureObject($obj);
301 $this->
ctrl->forwardCommand($st_gui);
302 if ($cmd ==
"save" || $cmd ==
"cancel") {
303 if ($this->requested_obj_id == 0) {
304 $this->
ctrl->redirect($this,
"chapters");
312 case 'ilpermissiongui':
313 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
321 $this->
ctrl->forwardCommand($perm_gui);
325 case 'ilinfoscreengui':
326 if (!$this->
object->isInfoEnabled()) {
333 $info->enablePrivateNotes();
334 $info->enableLearningProgress();
336 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
337 $info->enableNewsEditing();
338 $info->setBlockProperty(
"news",
"settings",
true);
342 $info->addMetaDataSections(
355 case "showExportOptionsXML":
356 case "showExportOptionsHTML":
362 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"transl",
"");
363 $this->
ctrl->setParameterByClass(ilLMEditorGUI::class,
"transl",
"");
365 $this->
ctrl->forwardCommand($exp_gui);
372 case strtolower(TranslationGUI::class):
390 $transgui->forceContentTranslation();
391 $this->
ctrl->forwardCommand($transgui);
395 case "ilcommonactiondispatchergui":
398 $this->
ctrl->forwardCommand($gui);
401 case 'ilobjectcopygui':
405 $this->
ctrl->forwardCommand($cp);
408 case "ilmobmultisrtuploadgui":
414 $this->
ctrl->forwardCommand($gui);
417 case "illmimportgui":
423 $this->
ctrl->forwardCommand($gui);
426 case "illmeditshorttitlesgui":
435 $this->edit_request->getTranslation()
437 $this->
ctrl->forwardCommand($gui);
440 case strtolower(EditSubObjectsGUI::class):
444 if ($this->edit_request->getSubType() ===
"pg") {
450 $gui = $this->gui->editing()->editSubObjectsGUI(
451 $this->edit_request->getSubType(),
453 $this->lng->txt(
"cont_chapters")
455 $this->
ctrl->forwardCommand($gui);
458 case strtolower(ilMediaObjectOverviewGUI::class):
459 if (!$ilAccess->checkAccess(
'write',
'', $this->lm->
getRefId())) {
468 $page_retrieval =
new PageRetrieval($this->lm->getId(), $this->ctrl);
470 $this->
ctrl->forwardCommand($gui);
476 if ($cmd ==
"create" &&
477 !in_array($new_type, array(
"lm"))) {
480 $this->
ctrl->redirectByClass(ilLMPageObjectGUI::class, $this->
ctrl->getCmd());
484 $this->
ctrl->redirectByClass(ilStructureObjectGUI::class, $this->
ctrl->getCmd());
490 $new_type ===
"lm") {
508 $this->
lng->loadLanguageModule(
'exp');
509 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
511 if ($ot->getContentTranslationActivated()) {
512 $this->
lng->loadLanguageModule(
"meta");
513 $langs = $ot->getLanguages();
514 foreach ($langs as $l => $ldata) {
515 $items[
"html_" . $l] = $this->
lng->txt(
"meta_l_" . $l);
517 $items[
"html_all"] = $this->
lng->txt(
"cont_all_languages");
519 if (!$ot->getContentTranslationActivated()) {
520 $items[
"exportHTML"] =
"HTML";
522 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"language"), $items)
523 ->withRequired(
true);
524 $section = $this->
ui->factory()->input()->field()->section(
526 $this->
lng->txt(
"export_options")
528 return $this->
ui->factory()->input()->container()->form()->standard(
529 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportHTML"),
531 )->withSubmitLabel($this->
lng->txt(
"export"));
536 $this->
lng->loadLanguageModule(
'exp');
537 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
539 if ($ot->getContentTranslationActivated()) {
540 $items[
"xml_master"] = $this->
lng->txt(
"cont_master_language_only");
541 $items[
"xml_masternomedia"] = $this->
lng->txt(
"cont_master_language_only_no_media");
542 $this->
lng->loadLanguageModule(
"meta");
543 $langs = $ot->getLanguages();
545 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"export_type"), $items)
546 ->withRequired(
true);
547 $section = $this->
ui->factory()->input()->field()->section(
549 $this->
lng->txt(
"export_options")
551 return $this->
ui->factory()->input()->container()->form()->standard(
552 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportXML"),
554 )->withSubmitLabel($this->
lng->txt(
"export"));
562 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($this->buildExportOptionsFormXML()));
567 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
568 if ($ot->getContentTranslationActivated()) {
572 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($this->buildExportOptionsFormHTML()));
574 if (!$ot->getContentTranslationActivated()) {
583 if (!is_null(
$form->getData())) {
584 $format = explode(
"_",
$form->getData()[0][0]);
586 if (is_null(
$form->getData())) {
590 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
595 $cont_exp->buildExportFile($opt);
601 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
604 if ($ot->getContentTranslationActivated() and !is_null(
$form->getData())) {
605 $format = explode(
"_",
$form->getData()[0][0]);
608 if ($ot->getContentTranslationActivated() and is_null(
$form->getData())) {
612 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
616 $cont_exp->buildExportFile();
637 $ecs->addSettingsToForm($this->
form,
'lm');
639 $this->tpl->setContent($this->
form->getHTML());
657 $ti->setRequired(
true);
658 $this->
form->addItem($ti);
662 $this->
form->addItem($ta);
666 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
667 $this->
form->addItem($section);
671 $this->
form->addItem($online);
675 $section->setTitle($this->
lng->txt(
'cont_presentation'));
676 $this->
form->addItem($section);
679 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->addTileImage();
683 $option = array(
"st_title" => $this->
lng->txt(
"cont_st_title"),
684 "pg_title" => $this->lng->txt(
"cont_pg_title"),
685 "none" => $this->lng->txt(
"cont_none"));
686 $page_header->setOptions($option);
687 $this->
form->addItem($page_header);
691 $this->
form->addItem($chap_num);
695 $option = array(
"chapters" => $this->
lng->txt(
"cont_chapters_only"),
696 "pages" => $this->lng->txt(
"cont_chapters_and_pages"));
697 $toc_mode->setOptions($option);
698 $this->
form->addItem($toc_mode);
702 $progr_icons->setInfo($this->
lng->txt(
"cont_progress_icons_info"));
703 $this->
form->addItem($progr_icons);
705 $this->reading_time_gui->addSettingToForm($this->
form);
709 $section->setTitle($this->
lng->txt(
'cont_self_assessment'));
710 $this->
form->addItem($section);
714 $radg->setValue(
"0");
716 $radg->addOption($op1);
718 $radg->addOption($op2);
719 $this->
form->addItem($radg);
723 $qfeed->setInfo($this->
lng->txt(
"cont_restrict_forw_nav_info"));
724 $this->
form->addItem($qfeed);
728 $not->setInfo($this->
lng->txt(
"cont_notify_on_blocked_users_info"));
729 $qfeed->addSubItem($not);
733 $qfeed->setInfo($this->
lng->txt(
"cont_disable_def_feedback_info"));
734 $this->
form->addItem($qfeed);
738 $section->setTitle($this->
lng->txt(
'obj_features'));
739 $this->
form->addItem($section);
743 $this->
lng->loadLanguageModule(
"notes");
745 $pub_nodes->setInfo($this->
lng->txt(
"cont_lm_comments_desc"));
746 $this->
form->addItem($pub_nodes);
750 $this->
lng->loadLanguageModule(
'rating');
752 $rate->setInfo($this->
lng->txt(
'rating_activate_rating_info'));
753 $this->
form->addItem($rate);
755 $this->
form->addItem($ratep);
757 $this->
form->setTitle(
$lng->
txt(
"cont_lm_properties"));
758 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
759 $this->
form->setFormAction($ilCtrl->getFormAction($this));
779 $title = $this->lm->getTitle();
780 $description = $this->lm->getLongDescription();
781 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
782 if ($ot->getContentTranslationActivated()) {
783 $title = $ot->getDefaultTitle();
784 $description = $ot->getDefaultDescription();
787 $values[
"title"] = $title;
788 $values[
"description"] = $description;
789 if (!$this->lm->getOfflineStatus()) {
790 $values[
"cobj_online"] =
true;
793 $values[
"lm_pg_header"] = $this->lm->getPageHeader();
794 if ($this->lm->isActiveNumbering()) {
795 $values[
"cobj_act_number"] =
true;
797 $values[
"toc_mode"] = $this->lm->getTOCMode();
798 if ($this->lm->publicNotes()) {
799 $values[
"cobj_pub_notes"] =
true;
801 if ($this->lm->cleanFrames()) {
802 $values[
"cobj_clean_frames"] =
true;
805 $values[
"rating"] = $this->lm->hasRating();
806 $values[
"rating_pages"] = $this->lm->hasRatingPages();
807 $values[
"disable_def_feedback"] = $this->lm->getDisableDefaultFeedback();
808 $values[
"progr_icons"] = $this->lm->getProgressIcons();
809 $values[
"store_tries"] = (string) (
int) $this->lm->getStoreTries();
810 $values[
"restrict_forw_nav"] = $this->lm->getRestrictForwardNavigation();
818 $values[
"cont_show_info_tab"] = $this->
object->isInfoEnabled();
819 $this->
form->setValuesByArray($values,
true);
838 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
839 if ($ot->getContentTranslationActivated()) {
840 $this->lm->getObjectProperties()->storePropertyTranslations(
850 $this->lm->setOfflineStatus(!(
$form->
getInput(
'cobj_online')));
851 $this->lm->setActiveNumbering((
bool)
$form->
getInput(
"cobj_act_number"));
852 $this->lm->setCleanFrames((
bool)
$form->
getInput(
"cobj_clean_frames"));
854 $this->lm->setPublicNotes(
$form->
getInput(
"cobj_pub_notes"));
857 $this->lm->setRatingPages((
bool)
$form->
getInput(
"rating_pages"));
858 $this->lm->setDisableDefaultFeedback((
int)
$form->
getInput(
"disable_def_feedback"));
859 $this->lm->setProgressIcons((
int)
$form->
getInput(
"progr_icons"));
860 $this->reading_time_gui->saveSettingFromForm($this->
form);
866 $add_info =
"</br>" .
$lng->
txt(
"cont_automatically_set_store_tries");
867 $add_info = str_replace(
"$1",
$lng->
txt(
"cont_tries_store"), $add_info);
868 $add_info = str_replace(
"$2",
$lng->
txt(
"cont_restrict_forw_nav"), $add_info);
871 $this->lm->setStoreTries((
int) $store_tries);
872 $this->lm->setRestrictForwardNavigation((
int)
$form->
getInput(
"restrict_forw_nav"));
873 $this->lm->updateProperties();
877 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->saveTileImage();
883 (
bool) $this->form->getInput(
"notification_blocked_users")
898 if ($ecs->handleSettingsUpdate(
$form)) {
904 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified") . $add_info,
true);
905 $this->
ctrl->redirect($this,
"properties");
911 $this->
form->setValuesByPost();
912 $this->tpl->setContent($this->
form->getHTML());
925 $menu->setChecked($this->lm->isActiveLMMenu());
937 $print->setChecked($this->lm->isActivePrintView());
941 $glo =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
942 $glo->setChecked($this->lm->isActivePreventGlossaryAppendix());
943 $print->addSubItem($glo);
946 $hhfp =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_hide_head_foot_print"),
"hide_head_foot_print");
947 $hhfp->setChecked($this->lm->getHideHeaderFooterPrint());
948 $print->addSubItem($hhfp);
968 $ilTabs->setTabActive(
"settings");
971 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
972 $ilToolbar->addFormButton($this->
lng->txt(
"add_menu_entry"),
"addMenuEntry");
973 $ilToolbar->setCloseFormTag(
false);
980 $entries = $this->lmme_obj->getMenuEntries();
982 $table->setOpenFormTag(
false);
991 $this->lm->setActiveLMMenu((
int)
$form->
getInput(
"cobj_act_lm_menu"));
993 $this->lm->setActivePrintView((
int)
$form->
getInput(
"cobj_act_print"));
994 $this->lm->setActivePreventGlossaryAppendix((
int)
$form->
getInput(
"cobj_act_print_prev_glo"));
995 $this->lm->setHideHeaderFooterPrint((
int)
$form->
getInput(
"hide_head_foot_print"));
996 $this->lm->updateProperties();
1000 $this->lmme_obj->updateActiveStatus($this->edit_request->getMenuEntries());
1002 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1003 $this->
ctrl->redirect($this,
"editMenuProperties");
1011 $this->lm->executeDragDrop(
1012 $req->getHFormPar(
"source_id"),
1013 $req->getHFormPar(
"target_id"),
1014 $req->getHFormPar(
"fc"),
1015 $req->getHFormPar(
"as_subitem")
1017 $ilCtrl->redirect($this,
"chapters");
1022 $new_object->setCleanFrames(
true);
1026 $new_object->createLMTree();
1029 $new_object->addFirstChapterAndPage();
1032 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt($this->type .
"_added"),
true);
1033 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"ref_id", $new_object->
getRefId());
1034 $this->
ctrl->redirectByClass([ilLMEditorGUI::class, ilObjLearningModuleGUI::class],
"");
1040 public function delete(
int $a_parent_subobj_id = 0):
void
1042 $ids = $this->edit_request->getIds();
1044 if (count($ids) == 0) {
1045 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1050 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"),
true);
1054 if ($a_parent_subobj_id == 0) {
1058 if ($a_parent_subobj_id != 0) {
1059 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd", $this->requested_backcmd);
1060 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1063 $this->
ctrl->setParameter($this,
"backcmd", $this->requested_backcmd);
1070 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
1071 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelDelete");
1072 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"confirmedDelete");
1074 foreach ($ids as
$id) {
1077 $caption = $obj->getTitle();
1079 $cgui->addItem(
"id[]",
$id, $caption);
1083 $this->tpl->setContent($cgui->getHTML());
1088 $this->
ctrl->redirect($this, $this->requested_backcmd);
1102 $ids = $this->edit_request->getIds();
1105 if (count($ids) == 0) {
1106 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1107 $this->
ctrl->redirect($this,
"cancelDelete");
1111 foreach ($ids as
$id) {
1115 if (is_object($obj)) {
1116 $obj->setLMId($this->lm->getId());
1126 $this->lm->checkTree();
1129 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
1131 if ($a_parent_subobj_id == 0) {
1132 $this->
ctrl->redirect($this, $this->requested_backcmd);
1142 $this->gui->ctrl()->setParameterByClass(EditSubObjectsGUI::class,
"sub_type",
"st");
1143 $this->gui->ctrl()->redirectByClass(EditSubObjectsGUI::class);
1148 object $a_gui_class,
1154 $ilCtrl =
$DIC->ctrl();
1173 $ot = (
new TranslationsRepository(
$ilDB))->getFor($a_lm_id);
1174 if ($ot->getContentTranslationActivated()) {
1175 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode", $a_mode);
1187 $l = $ot->getBaseLanguage();
1189 $lng->
txt(
"cont_edit_language_version") .
": " .
1191 $ilCtrl->getLinkTarget($a_gui_class,
"editMasterLanguage")
1196 foreach ($ot->getLanguages() as $al => $lang) {
1198 $al != $ot->getBaseLanguage()) {
1199 $ilCtrl->setParameter($a_gui_class,
"totransl", $al);
1201 $lng->
txt(
"cont_edit_language_version") .
": " .
1203 $ilCtrl->getLinkTarget($a_gui_class,
"switchToLanguage")
1213 $ml_head =
'<div class="ilFloatLeft">' . $ml_head .
'</div><div style="margin: 5px 0;" class="small ilRight">' .
$ui_renderer->render($dd) .
"</div>";
1215 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode",
"");
1224 $ilToolbar = $this->toolbar;
1225 $ilCtrl = $this->ctrl;
1229 $this->setContentSubTabs(
"pages");
1231 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1232 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1233 $ilToolbar->addButton(
1234 $lng->txt(
"pg_add"),
1235 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create")
1237 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1240 $tpl->setContent($t->getHTML());
1251 $this->setContentSubTabs(
"internal_links");
1257 $this->lm->getType()
1260 $tpl->setContent($table_gui->getHTML());
1268 $ilToolbar = $this->toolbar;
1271 $this->setContentSubTabs(
"maintenance");
1273 $ilToolbar->addButton(
1274 $this->
lng->txt(
"cont_fix_tree"),
1275 $this->ctrl->getLinkTarget($this,
"fixTreeConfirm")
1284 $ids = $this->edit_request->getIds();
1285 foreach ($ids as
$id) {
1290 $this->
ctrl->redirect($this,
"pages");
1296 public function pastePage(): void
1299 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_page_in_clipboard"),
true);
1300 $this->
ctrl->redirect($this,
"pages");
1310 == $this->lm->getId()) {
1312 $new_page = $lm_page->copy($this->lm);
1313 $id = $new_page->getId();
1320 $copied_nodes = array();
1321 $new_page = $lm_page->copyToOtherContObject($this->lm, $copied_nodes);
1322 $id = $new_page->getId();
1331 != $this->lm->getId()) {
1336 $lm_page->setLMId($this->lm->getId());
1338 $page = $lm_page->getPageObject();
1340 $page->setParentId($this->lm->getId());
1347 $this->
ctrl->redirect($this,
"pages");
1352 $ids = $this->edit_request->getIds();
1353 if (count($ids) == 0) {
1354 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1355 $this->
ctrl->redirect($this,
"pages");
1361 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_copied"),
true);
1363 $this->
ctrl->redirect($this,
"pages");
1368 int $a_startnode_id = 1
1372 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1375 for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1380 $path .= $tmpPath[$i][
"title"];
1389 foreach ($a_actions as $name =>
$lng) {
1390 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1393 $notoperations = array();
1395 $operations = array();
1398 foreach (
$d as $row) {
1399 if (!in_array($row[
"name"], $notoperations)) {
1400 $operations[] = $row;
1405 if (count($operations) > 0) {
1406 foreach ($operations as $val) {
1407 $this->tpl->setCurrentBlock(
"operation_btn");
1408 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1409 $this->tpl->setVariable(
"BTN_VALUE", $this->
lng->txt($val[
"lng"]));
1410 $this->tpl->parseCurrentBlock();
1413 $this->tpl->setCurrentBlock(
"operation");
1415 $this->tpl->parseCurrentBlock();
1421 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
1422 $this->prepareOutput();
1423 parent::viewObject();
1425 $this->viewObject();
1435 $ids = $this->edit_request->getIds();
1436 if (count($ids) == 0) {
1437 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1438 if ($a_parent_subobj_id == 0) {
1439 $this->
ctrl->redirect($this,
"chapters");
1443 if (count($ids) > 1) {
1444 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"));
1445 if ($a_parent_subobj_id == 0) {
1446 $this->
ctrl->redirect($this,
"chapters");
1452 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"));
1453 if ($a_parent_subobj_id == 0) {
1454 $this->
ctrl->redirect($this,
"chapters");
1461 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_chap_select_target_now"),
true);
1463 if ($a_parent_subobj_id == 0) {
1464 $this->
ctrl->redirect($this,
"chapters");
1475 $this->insertChapterClip();
1480 $ids = $this->edit_request->getIds();
1481 if (count($ids) == 0) {
1482 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1483 $this->
ctrl->redirect($this,
"pages");
1486 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_cut"),
true);
1491 $this->
ctrl->redirect($this,
"pages");
1496 if ($this->requested_new_type ==
"pg") {
1497 $this->
ctrl->redirect($this,
"pages");
1499 $this->
ctrl->redirect($this,
"chapters");
1505 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
1507 if ($ot->getContentTranslationActivated()) {
1508 $format = explode(
"_", $this->edit_request->getFormat());
1514 $cont_exp->buildExportFile($opt);
1520 $this->setContentSubTabs(
"maintenance");
1524 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1525 $cgui->setHeaderText($this->
lng->txt(
"cont_fix_tree_confirm"));
1526 $cgui->setCancel($this->
lng->txt(
"cancel"),
"showMaintenance");
1527 $cgui->setConfirm($this->
lng->txt(
"cont_fix_tree"),
"fixTree");
1528 $issues = $this->lm->checkStructure();
1530 if (count($issues) > 0) {
1531 $mess =
"Found Issues: <br>" . implode(
"<br>", $issues);
1533 $this->tpl->setContent($cgui->getHTML() . $mess);
1538 $this->lm->fixTree();
1539 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cont_tree_fixed"),
true);
1540 $this->
ctrl->redirect($this,
"showMaintenance");
1545 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
1547 if ($ot->getContentTranslationActivated()) {
1548 $format = explode(
"_", $this->edit_request->getFormat());
1552 $cont_exp->buildExportFile();
1560 bool $a_omit_obj_id =
false
1565 if (!$a_omit_obj_id) {
1566 $obj_id = $this->requested_obj_id;
1568 $lmtree = $this->lm->getTree();
1569 if (($obj_id != 0) && $lmtree->isInTree($obj_id)) {
1570 $path = $lmtree->getPathFull($obj_id);
1572 $path = $lmtree->getPathFull($lmtree->getRootId());
1574 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
1579 foreach (
$path as $key => $row) {
1580 if ($row[
"child"] == 1) {
1581 $this->
ctrl->setParameter($this,
"obj_id",
null);
1582 $locator->addItem($this->lm->getTitle(), $this->ctrl->getLinkTarget($this,
"chapters"));
1584 $title = $row[
"title"];
1585 switch ($row[
"type"]) {
1587 $this->
ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id", $row[
"child"]);
1588 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
1592 $this->
ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id", $row[
"child"]);
1593 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
1598 if (!$a_omit_obj_id) {
1599 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1612 $this->setTabs(
"questions");
1613 $this->setQuestionsSubTabs(
"question_stats");
1616 $tpl->setContent($table->getHTML());
1623 $this->setTabs(
"questions");
1624 $this->setQuestionsSubTabs(
"question_usage");
1626 $table_builder =
new QuestionUsageTableBuilder(
1628 'listQuestionUsages',
1631 $table = $table_builder->getTable();
1632 $tpl->setContent($table->render());
1640 $this->setTabs(
"questions");
1641 $this->setQuestionsSubTabs(
"blocked_users");
1644 $tpl->setContent($table->getHTML());
1650 $ilCtrl = $this->ctrl;
1652 $user_q_ids = $this->edit_request->getUserQuestionIds();
1653 if (count($user_q_ids) > 0) {
1654 foreach ($user_q_ids as $uqid) {
1655 $uqid = explode(
":", $uqid);
1658 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
1660 $ilCtrl->redirect($this,
"listBlockedUsers");
1666 $ilCtrl = $this->ctrl;
1668 $user_q_ids = $this->edit_request->getUserQuestionIds();
1669 if (count($user_q_ids) > 0) {
1670 foreach ($user_q_ids as $uqid) {
1671 $uqid = explode(
":", $uqid);
1674 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
1676 $ilCtrl->redirect($this,
"listBlockedUsers");
1681 $ilCtrl = $this->ctrl;
1683 $user_q_ids = $this->edit_request->getUserQuestionIds();
1684 if (count($user_q_ids) == 0) {
1685 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 1);
1686 $ilCtrl->redirect($this,
"listBlockedUsers");
1690 foreach ($user_q_ids as $uqid) {
1691 $uqid = explode(
":", $uqid);
1693 if (!in_array($login, $rcps)) {
1703 'rcp_to' => implode(
',', $rcps),
1704 'sig' => $this->getBlockedUsersMailSignature()
1711 $link = chr(13) . chr(10) . chr(13) . chr(10);
1712 $link .= $this->
lng->txt(
'cont_blocked_users_mail_link');
1713 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1714 $link .= ilLink::_getLink($this->lm->getRefId());
1715 return rawurlencode(base64_encode($link));
1723 protected function setTabs(
string $a_act =
""): void
1725 parent::setTitleAndDescription();
1726 $ilHelp = $this->help;
1727 $ilHelp->setScreenIdComponent(
"lm");
1728 $this->addTabs($a_act);
1733 $ilTabs = $this->tabs;
1735 $ilCtrl = $this->ctrl;
1740 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1743 $lng->txt(
"objs_st"),
1744 $this->ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1751 $lng->txt(
"cont_all_pages"),
1752 $ilCtrl->getLinkTarget($this,
"pages")
1758 $lng->txt(
"cont_short_titles"),
1759 $ilCtrl->getLinkTargetByClass(
"illmeditshorttitlesgui",
"")
1763 if (
$lm_set->get(
"html_export_ids")) {
1767 $lng->txt(
"cont_html_export_ids"),
1768 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1773 $lng->loadLanguageModule(
"help");
1776 $lng->txt(
"cont_online_help_ids"),
1777 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1782 $lng->txt(
"help_tooltips"),
1783 $ilCtrl->getLinkTarget($this,
"showTooltipList")
1790 $lng->txt(
"cont_internal_links"),
1791 $ilCtrl->getLinkTarget($this,
"listLinks")
1797 $lng->txt(
"cont_maintenance"),
1798 $ilCtrl->getLinkTarget($this,
"showMaintenance")
1804 $lng->txt(
"cont_import"),
1805 $ilCtrl->getLinkTargetByClass(
"illmimportgui",
"")
1808 $ilTabs->activateSubTab($a_active);
1809 $ilTabs->activateTab(
"content");
1814 $ilTabs = $this->tabs;
1816 $ilCtrl = $this->ctrl;
1821 $lng->txt(
"cont_mob_usages"),
1822 $this->ctrl->getLinkTargetByClass(ilMediaObjectOverviewGUI::class,
"show")
1828 $lng->txt(
"cont_subtitle_files"),
1829 $ilCtrl->getLinkTargetByClass(
"ilmobmultisrtuploadgui",
"")
1832 $ilTabs->activateSubTab($a_active);
1837 $ilTabs = $this->tabs;
1839 $ilCtrl = $this->ctrl;
1844 $lng->txt(
"cont_question_usage"),
1845 $ilCtrl->getLinkTarget($this,
"listQuestionUsages")
1851 $lng->txt(
"cont_question_stats"),
1852 $ilCtrl->getLinkTarget($this,
"listQuestions")
1858 $lng->txt(
"cont_blocked_users"),
1859 $ilCtrl->getLinkTarget($this,
"listBlockedUsers")
1862 $ilTabs->activateSubTab($a_active);
1867 $rbacsystem = $this->rbacsystem;
1868 $ilTabs = $this->tabs;
1872 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1875 $lng->txt(
"content"),
1876 $this->ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1880 $this->
lng->loadLanguageModule(
'mob');
1883 $lng->txt(
"mob_media"),
1884 $this->ctrl->getLinkTargetByClass(ilMediaObjectOverviewGUI::class,
"show")
1890 $lng->txt(
"objs_qst"),
1891 $this->ctrl->getLinkTarget($this,
"listQuestionUsages")
1895 if ($this->
object->isInfoEnabled()) {
1898 $lng->txt(
"info_short"),
1899 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary')
1906 $lng->txt(
"settings"),
1907 $this->ctrl->getLinkTarget($this,
'properties')
1913 'learning_progress',
1914 $lng->txt(
"learning_progress"),
1915 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
'')
1921 $mdtab = $mdgui->getTab();
1925 $lng->txt(
"meta_data"),
1933 $lng->txt(
"export"),
1934 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1938 if ($rbacsystem->
checkAccess(
'edit_permission', $this->lm->getRefId())) {
1941 $lng->txt(
"perm_settings"),
1942 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
1947 $ilTabs->activateTab($a_act);
1951 $ilTabs->addNonTabbedLink(
1953 $lng->txt(
"cont_presentation_view"),
1954 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->lm->getRefId()
1960 $ilTabs = $this->tabs;
1965 array(
"settings",
"cont_style",
"cont_lm_menu",
"public_section",
1966 "cont_glossaries",
"cont_multilinguality",
"obj_multilinguality",
1970 $ilTabs->addSubTabTarget(
1972 $this->
ctrl->getLinkTarget($this,
'properties'),
1978 $ilTabs->addSubTabTarget(
1980 $this->
ctrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
""),
1982 "ilObjectContentStyleSettingsGUI"
1986 $ilTabs->addSubTabTarget(
1988 $this->
ctrl->getLinkTarget($this,
'editMenuProperties'),
1994 $ilTabs->addSubTabTarget(
1996 $this->
ctrl->getLinkTarget($this,
'editGlossaries'),
2001 $ilTabs->addSubTabTarget(
2002 "obj_multilinguality",
2003 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"")
2007 if ($lti_settings->hasSettingsAccess()) {
2008 $ilTabs->addSubTabTarget(
2010 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
2014 $ilTabs->setSubTabActive($a_active);
2021 $this->lmme_obj->setObjId($this->lm->getId());
2029 $ilTabs = $this->tabs;
2030 $ilToolbar = $this->toolbar;
2031 $ilCtrl = $this->ctrl;
2035 $ilTabs->setTabActive(
"settings");
2036 $this->setSubTabs(
"cont_lm_menu");
2038 $ilToolbar->addButton(
2039 $this->
lng->txt(
"lm_menu_select_internal_object"),
2040 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
2043 if (is_null($form)) {
2044 $form = $this->initMenuEntryForm(
"create");
2046 $this->tpl->setContent($form->
getHTML());
2052 $ilCtrl = $this->ctrl;
2058 $ti->setMaxLength(255);
2060 $ti->setRequired(
true);
2065 $ta->setMaxLength(255);
2067 $ta->setRequired(
true);
2070 if ($a_mode ==
"edit") {
2071 $this->__initLMMenuEditor();
2072 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2073 $ti->setValue($this->lmme_obj->getTitle());
2074 $ta->setValue($this->lmme_obj->getTarget());
2077 if ($this->requested_link_ref_id > 0) {
2078 $link_ref_id = $this->requested_link_ref_id;
2083 $target_link = $obj_type .
"_" . $link_ref_id;
2084 $ti->setValue($title);
2085 $ta->setValue($target_link);
2089 $hi->setValue($link_ref_id);
2095 if ($a_mode ==
"create") {
2112 $form = $this->initMenuEntryForm(
"create");
2114 $this->__initLMMenuEditor();
2115 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2116 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2117 $this->lmme_obj->setLinkRefId((
int) $form->
getInput(
"link_ref_id"));
2119 if ($form->
getInput(
"link_ref_id")) {
2120 $this->lmme_obj->setLinkType(
"intern");
2123 $this->lmme_obj->create();
2125 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_added"),
true);
2126 $this->
ctrl->redirect($this,
"editMenuProperties");
2129 $this->addMenuEntry($form);
2135 if (empty($this->requested_menu_entry)) {
2136 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2137 $this->
ctrl->redirect($this,
"editMenuProperties");
2140 $this->__initLMMenuEditor();
2141 $this->lmme_obj->delete($this->requested_menu_entry);
2143 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_removed"),
true);
2144 $this->
ctrl->redirect($this,
"editMenuProperties");
2149 $ilToolbar = $this->toolbar;
2150 $ilCtrl = $this->ctrl;
2151 $ilTabs = $this->tabs;
2155 $ilTabs->setTabActive(
"settings");
2156 $this->setSubTabs(
"cont_lm_menu");
2159 if (empty($this->requested_menu_entry)) {
2160 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2161 $this->
ctrl->redirect($this,
"editMenuProperties");
2164 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2165 $ilToolbar->addButton(
2166 $this->
lng->txt(
"lm_menu_select_internal_object"),
2167 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
2170 if (is_null($form)) {
2171 $form = $this->initMenuEntryForm(
"edit");
2173 $this->tpl->setContent($form->
getHTML());
2178 $form = $this->initMenuEntryForm(
"edit");
2180 if ($this->edit_request->getMenuEntry() ==
"") {
2181 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2182 $this->
ctrl->redirect($this,
"editMenuProperties");
2185 $this->__initLMMenuEditor();
2186 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2187 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2188 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2189 if ($form->
getInput(
"link_ref_id")) {
2190 $this->lmme_obj->setLinkType(
"intern");
2192 if (is_int(strpos($form->
getInput(
"target"),
"."))) {
2193 $this->lmme_obj->setLinkType(
"extern");
2195 $this->lmme_obj->update();
2196 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_updated"),
true);
2197 $this->
ctrl->redirect($this,
"editMenuProperties");
2200 $this->editMenuEntry($form);
2206 $ilTabs = $this->tabs;
2207 $ilCtrl = $this->ctrl;
2211 $ilTabs->setTabActive(
"settings");
2212 $this->setSubTabs(
"cont_lm_menu");
2214 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2216 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"lm_menu_select_object_to_add"));
2220 "showEntrySelector",
2226 $exp->setClickableTypes(array(
'mcst',
'mep',
'cat',
'lm',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
"crs",
"grp",
"book",
"tst",
"file"));
2227 if (!$exp->handleCommand()) {
2228 $this->tpl->setContent($exp->getHTML());
2237 $ids = $this->edit_request->getIds();
2238 if (count($ids) == 0) {
2239 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2240 $this->
ctrl->redirect($this,
"pages");
2242 if (count($ids) > 1) {
2243 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2244 $this->
ctrl->redirect($this,
"pages");
2246 if ($ids[0] != $this->lm->getHeaderPage()) {
2247 $this->lm->setHeaderPage($ids[0]);
2249 $this->lm->setHeaderPage(0);
2251 $this->lm->updateProperties();
2252 $this->
ctrl->redirect($this,
"pages");
2260 $ids = $this->edit_request->getIds();
2261 if (count($ids) == 0) {
2262 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2263 $this->
ctrl->redirect($this,
"pages");
2265 if (count($ids) > 1) {
2266 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2267 $this->
ctrl->redirect($this,
"pages");
2269 if ($ids[0] != $this->lm->getFooterPage()) {
2270 $this->lm->setFooterPage($ids[0]);
2272 $this->lm->setFooterPage(0);
2274 $this->lm->updateProperties();
2275 $this->
ctrl->redirect($this,
"pages");
2283 $ilCtrl = $this->ctrl;
2287 $this->edit_request->getTitles(),
2288 $this->requested_transl
2291 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"lm_save_titles"),
true);
2292 $ilCtrl->redirect($this,
"chapters");
2295 public static function _goto(
string $a_target): void
2298 $main_tpl =
$DIC->ui()->mainTemplate();
2300 $ilAccess =
$DIC->access();
2303 $ctrl =
$DIC->ctrl();
2305 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2306 $ctrl->setParameterByClass(
"ilLMPresentationGUI",
"ref_id", $a_target);
2308 $ctrl->redirectByClass(
"ilLMPresentationGUI",
"");
2310 $ctrl->redirectByClass(
"ilLMPresentationGUI",
"resume");
2312 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2313 $ctrl->setParameterByClass(
"ilLMPresentationGUI",
"ref_id", $a_target);
2314 $ctrl->redirectByClass(
"ilLMPresentationGUI",
"infoScreen");
2316 $main_tpl->setOnScreenMessage(
'failure', sprintf(
2317 $lng->txt(
"msg_no_perm_read_item"),
2329 $ilCtrl = $this->ctrl;
2332 if (count($ids) == 0) {
2333 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2334 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2338 foreach ($ids as $k => $item) {
2343 foreach ($todel as $k) {
2348 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"cont_selected_items_have_been_cut"),
true);
2350 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2358 $ilCtrl = $this->ctrl;
2361 if (count($ids) == 0) {
2362 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2363 $ilCtrl->redirect($this,
"chapters");
2367 foreach ($ids as $k => $item) {
2372 foreach ($todel as $k) {
2377 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"cont_selected_items_have_been_copied"),
true);
2378 $ilCtrl->redirect($this,
"chapters");
2386 $this->cutItems(
"chapters");
2396 $ilToolbar = $this->toolbar;
2398 $ilCtrl = $this->ctrl;
2401 $this->setContentSubTabs(
"export_ids");
2405 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2406 $lm_tree = $this->lm->getTree();
2409 foreach ($childs as
$c) {
2415 $ilToolbar->addInputItem($si,
true);
2416 $ilToolbar->addFormButton(
$lng->txt(
"help_filter"),
"filterHelpChapters");
2423 $tpl->setContent($tbl->getHTML());
2428 $ilCtrl = $this->ctrl;
2430 $ilCtrl->redirect($this,
"showExportIDsOverview");
2435 $ilCtrl = $this->ctrl;
2440 foreach ($this->edit_request->getExportIds() as $exp_id) {
2441 if ($exp_id !=
"" && !preg_match(
2442 "/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
2449 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"cont_exp_ids_not_resp_format1") .
": a-z, A-Z, 0-9, '_'. " .
2450 $lng->txt(
"cont_exp_ids_not_resp_format3") .
" " .
2451 $lng->txt(
"cont_exp_ids_not_resp_format2"));
2452 $this->showExportIDsOverview(
true);
2457 foreach ($this->edit_request->getExportIds() as $pg_id => $exp_id) {
2466 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"cont_saved_export_ids"),
true);
2467 $ilCtrl->redirect($this,
"showExportIdsOverview");
2473 $ilCtrl = $this->ctrl;
2474 $help_map = $this->
help->internal()->domain()->map();
2476 foreach ($this->edit_request->getScreenIds() as $chap => $ids) {
2477 $ids = explode(
"\n", $ids);
2478 $help_map->saveScreenIdsForChapter($chap, $ids);
2480 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2481 $ilCtrl->redirect($this,
"showExportIdsOverview");
2491 $ilToolbar = $this->toolbar;
2492 $ilCtrl = $this->ctrl;
2496 $this->setContentSubTabs(
"help_tooltips");
2498 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2500 $ti->setMaxLength(200);
2502 $ilToolbar->addInputItem($ti,
true);
2503 $ilToolbar->addFormButton(
$lng->txt(
"add"),
"addTooltip");
2504 $ilToolbar->addSeparator();
2506 $options = $this->
help->internal()->domain()->tooltips()->getTooltipComponents();
2513 $ilToolbar->addInputItem($si,
true);
2514 $ilToolbar->addFormButton(
$lng->txt(
"help_filter"),
"filterTooltips");
2518 $tpl->setContent($tbl->getHTML());
2524 $ilCtrl = $this->ctrl;
2526 $tt_id = $this->edit_request->getTooltipId();
2527 if (trim($tt_id) !=
"") {
2528 if (is_int(strpos($tt_id,
"_"))) {
2529 $this->
help->internal()->domain()->tooltips()->addTooltip(trim($tt_id),
"");
2530 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2532 $fu = strpos($tt_id,
"_");
2533 $comp = substr($tt_id, 0, $fu);
2536 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"cont_help_no_valid_tooltip_id"),
true);
2539 $ilCtrl->redirect($this,
"showTooltipList");
2544 $ilCtrl = $this->ctrl;
2548 $this->edit_request->getTooltipComponent()
2550 $ilCtrl->redirect($this,
"showTooltipList");
2555 $ilCtrl = $this->ctrl;
2558 $tooltip_ids = $this->edit_request->getTooltipIds();
2559 foreach ($this->edit_request->getTooltipTexts() as
$id =>
$text) {
2560 $this->
help->internal()->domain()->tooltips()->updateTooltip(
2563 $tooltip_ids[(
int)
$id]
2566 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2567 $ilCtrl->redirect($this,
"showTooltipList");
2573 $ilCtrl = $this->ctrl;
2575 $ids = $this->edit_request->getIds();
2576 if (count($ids) > 0) {
2577 foreach ($ids as
$id) {
2578 $this->
help->internal()->domain()->tooltips()->deleteTooltip($id);
2580 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2582 $ilCtrl->redirect($this,
"showTooltipList");
2592 string $a_def_option =
""
2602 if ($a_def_option !=
"") {
2606 $layout->addOption(
new ilRadioOption(
"<table><tr><td>" . $im_tag .
"</td><td><strong>" .
2607 $lng->txt(
"cont_lm_default_layout") .
2608 "</strong>: " .
$lng->txt(
"cont_layout_" . $a_def_option) .
2609 "</td></tr></table>",
""));
2616 $layout->addOption(
new ilRadioOption(
"<table><tr><td style='padding: 0px 5px 5px;'>" .
2617 $im_tag .
"</td><td style='padding:5px;'><strong>" .
$lng->txt(
"cont_layout_" . $l) .
"</strong>: " .
2618 $lng->txt(
"cont_layout_" . $l .
"_desc") .
"</td></tr></table>", $l));
2629 $ilCtrl = $this->ctrl;
2630 $ilCtrl->setParameter($this,
"hierarchy",
"1");
2631 $this->setPageLayout(
true);
2639 bool $a_in_hierarchy =
false
2642 $ilCtrl = $this->ctrl;
2645 $ids = $this->edit_request->getIds();
2646 if (count($ids) == 0) {
2647 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2649 if ($a_in_hierarchy) {
2650 $ilCtrl->redirect($this,
"chapters");
2652 $ilCtrl->redirect($this,
"pages");
2656 $this->initSetPageLayoutForm();
2658 $tpl->setContent($this->
form->getHTML());
2664 $ilCtrl = $this->ctrl;
2668 $ids = $this->edit_request->getIds();
2669 foreach ($ids as
$id) {
2672 $this->
form->addItem($hi);
2674 $layout = self::getLayoutOption(
2675 $lng->txt(
"cont_layout"),
2677 $this->lm->getLayout()
2679 $this->
form->addItem($layout);
2681 $this->
form->addCommandButton(
"savePageLayout",
$lng->txt(
"save"));
2682 $this->
form->addCommandButton(
"pages",
$lng->txt(
"cancel"));
2684 $this->
form->setTitle(
$lng->txt(
"cont_set_layout"));
2685 $this->
form->setFormAction($ilCtrl->getFormAction($this));
2691 $ilCtrl = $this->ctrl;
2693 $ilCtrl->setParameter($this,
"hierarchy", $this->requested_hierarchy);
2695 $ids = $this->edit_request->getIds();
2696 foreach ($ids as
$id) {
2699 $this->edit_request->getLayout(),
2703 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2705 if ($this->requested_hierarchy) {
2706 $ilCtrl->redirect($this,
"chapters");
2708 $ilCtrl->redirect($this,
"pages");
2722 $ilToolbar = $this->toolbar;
2724 $ilCtrl = $this->ctrl;
2725 $ilTabs = $this->tabs;
2728 $ilTabs->setTabActive(
"settings");
2729 $this->setSubTabs(
"cont_glossaries");
2731 $ilToolbar->addButton(
2733 $ilCtrl->getLinkTarget($this,
"showLMGlossarySelector")
2738 $tpl->setContent($tab->getHTML());
2744 $ilCtrl = $this->ctrl;
2745 $tree = $this->tree;
2746 $ilTabs = $this->tabs;
2749 $ilTabs->setTabActive(
"settings");
2750 $this->setSubTabs(
"cont_glossaries");
2753 $exp->setExpand($this->requested_search_root_expand ?: $tree->readRootId());
2754 $exp->setPathOpen($this->
object->getRefId());
2755 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'showLMGlossarySelector'));
2756 $exp->setTargetClass(get_class($this));
2757 $exp->setCmd(
'confirmGlossarySelection');
2758 $exp->setClickableTypes(array(
"glo"));
2759 $exp->addFilter(
"glo");
2763 $tpl->setContent($exp->getOutput());
2768 $ilCtrl = $this->ctrl;
2773 $ilCtrl->setParameter($this,
"glo_ref_id", $this->requested_root_id);
2774 $cgui->setFormAction($ilCtrl->getFormAction($this));
2775 $cgui->setHeaderText(
$lng->txt(
"cont_link_glo_in_lm"));
2776 $cgui->setCancel(
$lng->txt(
"no"),
"selectLMGlossary");
2777 $cgui->setConfirm(
$lng->txt(
"yes"),
"selectLMGlossaryLink");
2778 $tpl->setContent($cgui->getHTML());
2783 $glo_ref_id = $this->requested_glo_ref_id;
2784 $this->lm->autoLinkGlossaryTerms($glo_ref_id);
2785 $this->selectLMGlossary();
2790 $ilCtrl = $this->ctrl;
2793 $glos = $this->lm->getAutoGlossaries();
2794 $glo_ref_id = $this->requested_glo_ref_id;
2796 if (!in_array($glo_id, $glos)) {
2799 $this->lm->setAutoGlossaries($glos);
2800 $this->lm->update();
2802 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2803 $ilCtrl->redirect($this,
"editGlossaries");
2808 $ilCtrl = $this->ctrl;
2811 $this->lm->removeAutoGlossary($this->requested_glo_id);
2812 $this->lm->update();
2814 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2815 $ilCtrl->redirect($this,
"editGlossaries");
2820 $ilCtrl = $this->ctrl;
2822 $ilCtrl->setParameter($this,
"transl",
"-");
2823 if ($this->lang_switch_mode ==
"short_titles") {
2824 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2826 $ilCtrl->redirect($this,
"chapters");
2831 $ilCtrl = $this->ctrl;
2833 $ilCtrl->setParameter($this,
"transl", $this->requested_totransl);
2834 if ($this->lang_switch_mode ==
"short_titles") {
2835 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2837 $ilCtrl->redirect($this,
"chapters");
2843 parent::redrawHeaderActionObject();
2851 $this->
ctrl->redirectByClass(array(
'illearningprogressgui'),
'');
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
GUI class for object translation handling.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static storeContentObject(string $a_type, int $a_id, string $a_action="cut")
static getContentObjectId()
static getContentObjectType()
static setAction(string $a_action)
Export User Interface Class.
const CMD_LIST_EXPORT_FILES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Import related features for learning modules.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
static writeLayout(int $a_obj_id, string $a_layout, ?ilObjLearningModule $a_lm=null)
Write layout setting.
static clipboardCut(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static saveExportId(int $a_lm_id, int $a_lmobj_id, string $a_exp_id, string $a_type="pg")
static saveTitles(ilObjLearningModule $a_lm, array $a_titles, string $a_lang="-")
Save titles for lm objects.
static _lookupContObjID(int $a_id)
get learning module id for lm object
static clipboardCopy(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static _lookupType(int $a_obj_id, int $a_lm_id=0)
User Interface for Learning Module Page Objects Editing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getPresentationTitle(int $a_pg_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for LTI provider object settings.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
const TYPE_LM_BLOCKED_USERS
Class ilObjContentObjectGUI.
string $requested_backcmd
copyItems(array $ids)
Copy items to clipboard.
static getMultiLangHeader(int $a_lm_id, object $a_gui_class, string $a_mode="")
string $requested_totransl
addTabs(string $a_act="")
setSubTabs(string $a_active)
int $requested_link_ref_id
properties()
edit properties form
ilObjLearningModule $lm_obj
afterSave(ilObject $new_object)
Post (successful) object creation hook.
learningProgress()
Learning progress.
setMediaSubTabs(string $a_active)
static _goto(string $a_target)
confirmGlossarySelection()
showMaintenance()
Show maintenance.
ILIAS Style Content Service $content_style_service
selectHeader()
select page as header
buildExportOptionsFormXML()
setTabs(string $a_act="")
ilComponentRepository $component_repository
initMenuEntryForm(string $a_mode="edit")
editMenuEntry(?ilPropertyFormGUI $form=null)
ILIAS LearningModule InternalDomainService $domain
EditingGUIRequest $edit_request
getContextPath(int $a_endnode_id, int $a_startnode_id=1)
setPageLayout(bool $a_in_hierarchy=false)
Set layout for multiple pages.
saveAllTitles()
Save all titles of chapters/pages.
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=false)
initPropertiesForm()
Init properties form.
showActions(array $a_actions)
confirmedDelete(int $a_parent_subobj_id=0)
delete page object or structure objects
int $requested_search_root_expand
addMenuEntry(?ilPropertyFormGUI $form=null)
display add menu entry form
static getLayoutOption(string $a_txt, string $a_var, string $a_def_option="")
int $requested_menu_entry
cutChapter()
Cut chapter(s)
bool $requested_hierarchy
getPropertiesFormValues()
Get values for properties form.
moveChapter(int $a_parent_subobj_id=0)
move a single chapter (selection)
listLinks()
List all broken links.
selectFooter()
select page as footer
ILIAS LearningModule ReadingTime SettingsGUI $reading_time_gui
showExportIDsOverview(bool $a_validation=false)
int $requested_glo_ref_id
buildExportOptionsFormHTML()
setPageLayoutInHierarchy()
Set layout for multiple pages.
saveProperties()
save properties
addLocations(bool $a_omit_obj_id=false)
display locator
activatePages()
activates or deactivates pages
string $requested_lang_switch_mode
setQuestionsSubTabs(string $a_active)
setContentSubTabs(string $a_active)
string $requested_baseClass
int $requested_active_node
bool $requested_lmmovecopy
string $requested_new_type
ILIAS LearningModule InternalGUIService $gui
getBlockedUsersMailSignature()
editGlossaries()
Edit automatically linked glossaries.
int $requested_lm_menu_expand
static getAvailableLayouts()
get all available lm layouts
static isOnlineHelpModule(int $a_id, bool $a_as_obj_id=false)
Is module an online module.
static _lookupSetting(string $a_set)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupLogin(int $a_user_id)
GUI class for the workflow of copying objects.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
ilGlobalTemplateInterface $tpl
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ilObjectService $object_service
addHeaderAction()
Add header action menu.
prepareOutput(bool $show_sub_objects=true)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const INFO_TAB_VISIBILITY
Class ilObject Basic functions for all objects.
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
Page multilinguality GUI class.
static _writeActive(int $a_id, string $a_parent_type, bool $a_active)
write activation status
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static unlock(int $a_q_id, int $a_user_id)
Unlock question for user.
static resetTries(int $a_q_id, int $a_user_id)
Reset tries for user and question.
This class represents an option in a radio group.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
Explorer for selecting repository items.
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
@ilCtrl_Calls ilStructureObjectGUI: ilConditionHandlerGUI, ilObjectMetaDataGUI @ilCtrl_Calls ilStruct...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
isInTree(?int $a_node_id)
get all information of a node.
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
deleteTree(array $a_node)
delete node and the whole subtree under this node
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static redirect(string $a_script)
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setContent(string $a_html)
Sets content for standard template.
Readable part of repository interface to ilComponentDataDB.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form(?array $class_path, string $cmd, string $submit_caption="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
catch(\Exception $e) $req
if(!file_exists('../ilias.ini.php'))