38 protected \ILIAS\LearningModule\InternalGUIService
$gui;
39 protected \ILIAS\LearningModule\InternalDomainService
$domain;
50 protected \ILIAS\DI\UIServices
$ui;
89 bool $a_call_by_reference =
true,
90 bool $a_prepare_output =
false 94 $this->
lng = $DIC->language();
95 $this->
access = $DIC->access();
96 $this->
tabs = $DIC->tabs();
98 $this->
user = $DIC->user();
99 $this->tpl = $DIC[
"tpl"];
100 $this->
toolbar = $DIC->toolbar();
101 $this->rbacsystem = $DIC->rbac()->system();
102 $this->tree = $DIC->repositoryTree();
103 $this->
help = $DIC[
"ilHelp"];
104 $this->
locator = $DIC[
"ilLocator"];
105 $this->db = $DIC->database();
106 $this->log = $DIC[
"ilLog"];
107 $this->
ui = $DIC->ui();
108 $lng = $DIC->language();
109 $ilCtrl = $DIC->ctrl();
110 $this->
ctrl = $ilCtrl;
111 $this->component_repository = $DIC[
"component.repository"];
116 $this->edit_request = $DIC
124 $this->to_props =
$req->getToProps();
125 $this->requested_obj_id =
$req->getObjId();
126 $this->requested_ref_id =
$req->getRefId();
127 $this->requested_root_id =
$req->getRootId();
128 $this->requested_glo_id =
$req->getGlossaryId();
129 $this->requested_glo_ref_id =
$req->getGlossaryRefId();
130 $this->requested_menu_entry =
$req->getMenuEntry();
131 $this->requested_lm_menu_expand =
$req->getLMMenuExpand();
132 $this->requested_search_root_expand =
$req->getSearchRootExpand();
133 $this->requested_new_type =
$req->getNewType();
134 $this->requested_baseClass =
$req->getBaseClass();
135 $this->requested_transl =
$req->getTranslation();
136 $this->requested_backcmd =
$req->getBackCmd();
137 $this->requested_hierarchy =
$req->getHierarchy();
138 $this->lang_switch_mode =
$req->getLangSwitchMode();
139 $this->requested_active_node =
$req->getActiveNode();
140 $this->requested_lmexpand =
$req->getLMExpand();
141 $this->requested_link_ref_id =
$req->getLinkRefId();
142 $this->requested_totransl =
$req->getToTranslation();
143 $this->requested_lmmovecopy =
$req->getLMMoveCopy();
144 $this->content_style_service = $DIC
147 $id = (isset($this->
object))
150 $this->reading_time_gui = new \ILIAS\LearningModule\ReadingTime\SettingsGUI(
$id);
151 $this->domain = $DIC->learningModule()->internal()->domain();
152 $this->gui = $DIC->learningModule()->internal()->gui();
158 $baseclass = strtolower($this->requested_baseClass);
159 $next_class = strtolower($this->
ctrl->getNextClass());
162 if (!in_array($baseclass, [
"illmpresentationgui",
"illmeditorgui"])) {
165 if (in_array($next_class, [
"ilcommonactiondispatchergui"])) {
186 if ($this->
ctrl->getRedirectSource() ==
"ilinternallinkgui") {
192 if ($this->
ctrl->getCmdClass() ==
"ilinternallinkgui") {
193 $this->
ctrl->setReturn($this,
"explorer");
197 $next_class = $this->
ctrl->getNextClass($this);
200 if ($this->to_props) {
201 $cmd = $this->
ctrl->getCmd(
"properties");
203 $cmd = $this->
ctrl->getCmd(
"chapters");
206 switch ($next_class) {
207 case 'illtiproviderobjectsettinggui':
210 $ilTabs->setTabActive(
"settings");
215 $lti_gui->offerLTIRolesForSelection(
true);
216 $this->
ctrl->forwardCommand($lti_gui);
221 case "illearningprogressgui":
224 $this->
setTabs(
"learning_progress");
227 $this->
ctrl->forwardCommand($new_gui);
231 case 'ilobjectmetadatagui':
232 if (!$ilAccess->checkAccess(
'write',
'', $this->lm->getRefId())) {
241 $md_gui->addMDObserver($this->lm,
'MDUpdateListener',
'Educational');
242 $md_gui->addMDObserver($this->lm,
'MDUpdateListener',
'General');
243 $this->
ctrl->forwardCommand($md_gui);
246 case "ilobjectcontentstylesettingsgui":
254 $settings_gui = $this->content_style_service
256 ->objectSettingsGUIForRefId(
260 $this->
ctrl->forwardCommand($settings_gui);
264 case "illmpageobjectgui":
266 $ilTabs->setBackTarget(
268 $ilCtrl->getLinkTarget($this,
"chapters")
270 $this->
ctrl->saveParameter($this, array(
"obj_id"));
272 $this->
ctrl->setReturn($this,
"chapters");
275 if ($this->requested_obj_id > 0) {
278 $pg_gui->setLMPageObject($obj);
280 $this->
ctrl->forwardCommand($pg_gui);
283 case "ilstructureobjectgui":
284 $ilTabs->setBackTarget(
286 $ilCtrl->getLinkTarget($this,
"chapters")
289 $this->
ctrl->saveParameter($this, array(
"obj_id"));
291 $this->
ctrl->setReturn($this,
"chapters");
293 if ($this->requested_obj_id > 0) {
296 $st_gui->setStructureObject($obj);
298 $this->
ctrl->forwardCommand($st_gui);
299 if ($cmd ==
"save" || $cmd ==
"cancel") {
300 if ($this->requested_obj_id == 0) {
301 $this->
ctrl->redirect($this,
"chapters");
310 case 'ilpermissiongui':
311 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
319 $this->
ctrl->forwardCommand($perm_gui);
323 case 'ilinfoscreengui':
324 if (!$this->
object->isInfoEnabled()) {
331 $info->enablePrivateNotes();
332 $info->enableLearningProgress();
334 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
335 $info->enableNewsEditing();
336 $info->setBlockProperty(
"news",
"settings",
true);
340 $info->addMetaDataSections(
353 case "showExportOptionsXML":
354 case "showExportOptionsHTML":
360 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"transl",
"");
361 $this->
ctrl->setParameterByClass(ilLMEditorGUI::class,
"transl",
"");
363 $this->
ctrl->forwardCommand($exp_gui);
370 case strtolower(TranslationGUI::class):
388 $transgui->forceContentTranslation();
389 $this->
ctrl->forwardCommand($transgui);
393 case "ilcommonactiondispatchergui":
396 $this->
ctrl->forwardCommand($gui);
399 case 'ilobjectcopygui':
403 $this->
ctrl->forwardCommand($cp);
406 case "ilmobmultisrtuploadgui":
412 $this->
ctrl->forwardCommand($gui);
415 case "illmimportgui":
421 $this->
ctrl->forwardCommand($gui);
424 case "illmeditshorttitlesgui":
433 $this->edit_request->getTranslation()
435 $this->
ctrl->forwardCommand($gui);
438 case strtolower(EditSubObjectsGUI::class):
442 if ($this->edit_request->getSubType() ===
"pg") {
448 $gui = $this->gui->editing()->editSubObjectsGUI(
449 $this->edit_request->getSubType(),
451 $this->
lng->txt(
"cont_chapters")
453 $this->
ctrl->forwardCommand($gui);
459 if ($cmd ==
"create" &&
460 !in_array($new_type, array(
"lm"))) {
463 $this->
ctrl->redirectByClass(ilLMPageObjectGUI::class, $this->
ctrl->getCmd());
467 $this->
ctrl->redirectByClass(ilStructureObjectGUI::class, $this->
ctrl->getCmd());
473 $new_type ===
"lm") {
491 $this->
lng->loadLanguageModule(
'exp');
492 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
494 if ($ot->getContentTranslationActivated()) {
495 $this->
lng->loadLanguageModule(
"meta");
496 $langs = $ot->getLanguages();
497 foreach ($langs as $l => $ldata) {
498 $items[
"html_" . $l] = $this->
lng->txt(
"meta_l_" . $l);
500 $items[
"html_all"] = $this->
lng->txt(
"cont_all_languages");
502 if (!$ot->getContentTranslationActivated()) {
503 $items[
"exportHTML"] =
"HTML";
505 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"language"), $items)
506 ->withRequired(
true);
507 $section = $this->
ui->factory()->input()->field()->section(
509 $this->
lng->txt(
"export_options")
511 return $this->
ui->factory()->input()->container()->form()->standard(
512 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportHTML"),
514 )->withSubmitLabel($this->
lng->txt(
"export"));
519 $this->
lng->loadLanguageModule(
'exp');
520 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
522 if ($ot->getContentTranslationActivated()) {
523 $items[
"xml_master"] = $this->
lng->txt(
"cont_master_language_only");
524 $items[
"xml_masternomedia"] = $this->
lng->txt(
"cont_master_language_only_no_media");
525 $this->
lng->loadLanguageModule(
"meta");
526 $langs = $ot->getLanguages();
528 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"export_type"), $items)
529 ->withRequired(
true);
530 $section = $this->
ui->factory()->input()->field()->section(
532 $this->
lng->txt(
"export_options")
534 return $this->
ui->factory()->input()->container()->form()->standard(
535 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportXML"),
537 )->withSubmitLabel($this->
lng->txt(
"export"));
550 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
551 if ($ot->getContentTranslationActivated()) {
557 if (!$ot->getContentTranslationActivated()) {
566 if (!is_null($form->getData())) {
567 $format = explode(
"_", $form->getData()[0][0]);
569 if (is_null($form->getData())) {
573 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
578 $cont_exp->buildExportFile($opt);
584 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
587 if ($ot->getContentTranslationActivated() and !is_null($form->getData())) {
588 $format = explode(
"_", $form->getData()[0][0]);
591 if ($ot->getContentTranslationActivated() and is_null($form->getData())) {
595 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
599 $cont_exp->buildExportFile();
620 $ecs->addSettingsToForm($this->
form,
'lm');
622 $this->tpl->setContent($this->
form->getHTML());
640 $ti->setRequired(
true);
641 $this->
form->addItem($ti);
645 $this->
form->addItem($ta);
649 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
650 $this->
form->addItem($section);
654 $this->
form->addItem($online);
658 $section->setTitle($this->
lng->txt(
'cont_presentation'));
659 $this->
form->addItem($section);
662 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->addTileImage();
666 $option = array(
"st_title" => $this->
lng->txt(
"cont_st_title"),
667 "pg_title" => $this->
lng->txt(
"cont_pg_title"),
668 "none" => $this->
lng->txt(
"cont_none"));
670 $this->
form->addItem($page_header);
674 $this->
form->addItem($chap_num);
678 $option = array(
"chapters" => $this->
lng->txt(
"cont_chapters_only"),
679 "pages" => $this->
lng->txt(
"cont_chapters_and_pages"));
681 $this->
form->addItem($toc_mode);
685 $progr_icons->setInfo($this->
lng->txt(
"cont_progress_icons_info"));
686 $this->
form->addItem($progr_icons);
688 $this->reading_time_gui->addSettingToForm($this->
form);
692 $section->setTitle($this->
lng->txt(
'cont_self_assessment'));
693 $this->
form->addItem($section);
699 $radg->addOption($op1);
701 $radg->addOption($op2);
702 $this->
form->addItem($radg);
706 $qfeed->setInfo($this->
lng->txt(
"cont_restrict_forw_nav_info"));
707 $this->
form->addItem($qfeed);
711 $not->setInfo($this->
lng->txt(
"cont_notify_on_blocked_users_info"));
712 $qfeed->addSubItem($not);
716 $qfeed->setInfo($this->
lng->txt(
"cont_disable_def_feedback_info"));
717 $this->
form->addItem($qfeed);
721 $section->setTitle($this->
lng->txt(
'obj_features'));
722 $this->
form->addItem($section);
726 $this->
lng->loadLanguageModule(
"notes");
728 $pub_nodes->setInfo($this->
lng->txt(
"cont_lm_comments_desc"));
729 $this->
form->addItem($pub_nodes);
733 $this->
lng->loadLanguageModule(
'rating');
735 $rate->setInfo($this->
lng->txt(
'rating_activate_rating_info'));
736 $this->
form->addItem($rate);
738 $this->
form->addItem($ratep);
740 $this->
form->setTitle(
$lng->
txt(
"cont_lm_properties"));
741 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
742 $this->
form->setFormAction($ilCtrl->getFormAction($this));
762 $title = $this->lm->getTitle();
763 $description = $this->lm->getLongDescription();
764 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
765 if ($ot->getContentTranslationActivated()) {
766 $title = $ot->getDefaultTitle();
767 $description = $ot->getDefaultDescription();
770 $values[
"title"] = $title;
771 $values[
"description"] = $description;
772 if (!$this->lm->getOfflineStatus()) {
773 $values[
"cobj_online"] =
true;
776 $values[
"lm_pg_header"] = $this->lm->getPageHeader();
777 if ($this->lm->isActiveNumbering()) {
778 $values[
"cobj_act_number"] =
true;
780 $values[
"toc_mode"] = $this->lm->getTOCMode();
781 if ($this->lm->publicNotes()) {
782 $values[
"cobj_pub_notes"] =
true;
784 if ($this->lm->cleanFrames()) {
785 $values[
"cobj_clean_frames"] =
true;
788 $values[
"rating"] = $this->lm->hasRating();
789 $values[
"rating_pages"] = $this->lm->hasRatingPages();
790 $values[
"disable_def_feedback"] = $this->lm->getDisableDefaultFeedback();
791 $values[
"progr_icons"] = $this->lm->getProgressIcons();
792 $values[
"store_tries"] = (string) (
int) $this->lm->getStoreTries();
793 $values[
"restrict_forw_nav"] = $this->lm->getRestrictForwardNavigation();
801 $values[
"cont_show_info_tab"] = $this->
object->isInfoEnabled();
802 $this->
form->setValuesByArray($values,
true);
821 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
822 if ($ot->getContentTranslationActivated()) {
823 $this->lm->getObjectProperties()->storePropertyTranslations(
824 $ot->withDefaultTitle($form->
getInput(
'title'))
825 ->withDefaultDescription($form->
getInput(
'description'))
830 $this->lm->setDescription($form->
getInput(
'description'));
831 $this->lm->setPageHeader($form->
getInput(
"lm_pg_header"));
832 $this->lm->setTOCMode($form->
getInput(
"toc_mode"));
833 $this->lm->setOfflineStatus(!($form->
getInput(
'cobj_online')));
834 $this->lm->setActiveNumbering((
bool) $form->
getInput(
"cobj_act_number"));
835 $this->lm->setCleanFrames((
bool) $form->
getInput(
"cobj_clean_frames"));
837 $this->lm->setPublicNotes($form->
getInput(
"cobj_pub_notes"));
839 $this->lm->setRating((
bool) $form->
getInput(
"rating"));
840 $this->lm->setRatingPages((
bool) $form->
getInput(
"rating_pages"));
841 $this->lm->setDisableDefaultFeedback((
int) $form->
getInput(
"disable_def_feedback"));
842 $this->lm->setProgressIcons((
int) $form->
getInput(
"progr_icons"));
843 $this->reading_time_gui->saveSettingFromForm($this->
form);
846 $store_tries = $form->
getInput(
"store_tries");
847 if ($form->
getInput(
"restrict_forw_nav") && !$form->
getInput(
"store_tries")) {
849 $add_info =
"</br>" .
$lng->
txt(
"cont_automatically_set_store_tries");
850 $add_info = str_replace(
"$1",
$lng->
txt(
"cont_tries_store"), $add_info);
851 $add_info = str_replace(
"$2",
$lng->
txt(
"cont_restrict_forw_nav"), $add_info);
854 $this->lm->setStoreTries((
int) $store_tries);
855 $this->lm->setRestrictForwardNavigation((
int) $form->
getInput(
"restrict_forw_nav"));
856 $this->lm->updateProperties();
860 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->saveTileImage();
866 (bool) $this->
form->getInput(
"notification_blocked_users")
881 if ($ecs->handleSettingsUpdate($form)) {
887 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified") . $add_info,
true);
888 $this->
ctrl->redirect($this,
"properties");
894 $this->
form->setValuesByPost();
895 $this->tpl->setContent($this->
form->getHTML());
908 $menu->setChecked($this->lm->isActiveLMMenu());
920 $print->setChecked($this->lm->isActivePrintView());
924 $glo =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
925 $glo->setChecked($this->lm->isActivePreventGlossaryAppendix());
926 $print->addSubItem($glo);
929 $hhfp =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_hide_head_foot_print"),
"hide_head_foot_print");
930 $hhfp->setChecked($this->lm->getHideHeaderFooterPrint());
931 $print->addSubItem($hhfp);
951 $ilTabs->setTabActive(
"settings");
954 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
955 $ilToolbar->addFormButton($this->
lng->txt(
"add_menu_entry"),
"addMenuEntry");
956 $ilToolbar->setCloseFormTag(
false);
963 $entries = $this->lmme_obj->getMenuEntries();
965 $table->setOpenFormTag(
false);
974 $this->lm->setActiveLMMenu((
int) $form->
getInput(
"cobj_act_lm_menu"));
976 $this->lm->setActivePrintView((
int) $form->
getInput(
"cobj_act_print"));
977 $this->lm->setActivePreventGlossaryAppendix((
int) $form->
getInput(
"cobj_act_print_prev_glo"));
978 $this->lm->setHideHeaderFooterPrint((
int) $form->
getInput(
"hide_head_foot_print"));
979 $this->lm->updateProperties();
983 $this->lmme_obj->updateActiveStatus($this->edit_request->getMenuEntries());
985 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
986 $this->
ctrl->redirect($this,
"editMenuProperties");
994 $this->lm->executeDragDrop(
995 $req->getHFormPar(
"source_id"),
996 $req->getHFormPar(
"target_id"),
997 $req->getHFormPar(
"fc"),
998 $req->getHFormPar(
"as_subitem")
1000 $ilCtrl->redirect($this,
"chapters");
1005 $new_object->setCleanFrames(
true);
1009 $new_object->createLMTree();
1012 $new_object->addFirstChapterAndPage();
1015 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt($this->type .
"_added"),
true);
1016 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"ref_id", $new_object->
getRefId());
1017 $this->
ctrl->redirectByClass([ilLMEditorGUI::class, ilObjLearningModuleGUI::class],
"");
1023 public function delete(
int $a_parent_subobj_id = 0):
void 1025 $ids = $this->edit_request->getIds();
1027 if (count($ids) == 0) {
1028 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1033 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"),
true);
1037 if ($a_parent_subobj_id == 0) {
1041 if ($a_parent_subobj_id != 0) {
1042 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd", $this->requested_backcmd);
1043 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1046 $this->
ctrl->setParameter($this,
"backcmd", $this->requested_backcmd);
1053 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
1054 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelDelete");
1055 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"confirmedDelete");
1057 foreach ($ids as
$id) {
1060 $caption = $obj->getTitle();
1062 $cgui->addItem(
"id[]", $id, $caption);
1066 $this->tpl->setContent($cgui->getHTML());
1071 $this->
ctrl->redirect($this, $this->requested_backcmd);
1085 $ids = $this->edit_request->getIds();
1088 if (count($ids) == 0) {
1089 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1090 $this->
ctrl->redirect($this,
"cancelDelete");
1094 foreach ($ids as
$id) {
1098 if (is_object($obj)) {
1099 $obj->setLMId($this->lm->getId());
1103 "delete_" . $obj->getType(),
1105 $this->lm->getType()
1117 $this->lm->checkTree();
1120 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
1122 if ($a_parent_subobj_id == 0) {
1123 $this->
ctrl->redirect($this, $this->requested_backcmd);
1133 $this->gui->ctrl()->setParameterByClass(EditSubObjectsGUI::class,
"sub_type",
"st");
1134 $this->gui->ctrl()->redirectByClass(EditSubObjectsGUI::class);
1139 object $a_gui_class,
1144 $lng = $DIC->language();
1145 $ilCtrl = $DIC->ctrl();
1146 $ilDB = $DIC->database();
1148 $edit_request = $DIC
1164 $ot = (
new TranslationsRepository(
$ilDB))->getFor($a_lm_id);
1165 if ($ot->getContentTranslationActivated()) {
1166 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode", $a_mode);
1171 $ml_head = $ml_gui->getMultiLangInfo($requested_transl);
1177 if (!in_array($requested_transl, array(
"",
"-"))) {
1178 $l = $ot->getBaseLanguage();
1180 $lng->
txt(
"cont_edit_language_version") .
": " .
1182 $ilCtrl->getLinkTarget($a_gui_class,
"editMasterLanguage")
1187 foreach ($ot->getLanguages() as $al =>
$lang) {
1188 if ($requested_transl != $al &&
1189 $al != $ot->getBaseLanguage()) {
1190 $ilCtrl->setParameter($a_gui_class,
"totransl", $al);
1192 $lng->
txt(
"cont_edit_language_version") .
": " .
1194 $ilCtrl->getLinkTarget($a_gui_class,
"switchToLanguage")
1196 $ilCtrl->setParameter($a_gui_class,
"totransl", $requested_totransl);
1204 $ml_head =
'<div class="ilFloatLeft">' . $ml_head .
'</div><div style="margin: 5px 0;" class="small ilRight">' .
$ui_renderer->render($dd) .
"</div>";
1206 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode",
"");
1222 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1223 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1224 $ilToolbar->addButton(
1226 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create")
1228 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1248 $this->lm->getType()
1264 $ilToolbar->addButton(
1265 $this->
lng->txt(
"cont_fix_tree"),
1266 $this->
ctrl->getLinkTarget($this,
"fixTreeConfirm")
1275 $ids = $this->edit_request->getIds();
1276 foreach ($ids as
$id) {
1281 $this->
ctrl->redirect($this,
"pages");
1287 public function pastePage():
void 1290 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_page_in_clipboard"),
true);
1291 $this->
ctrl->redirect($this,
"pages");
1301 == $this->lm->getId()) {
1303 $new_page = $lm_page->copy($this->lm);
1304 $id = $new_page->getId();
1311 $copied_nodes = array();
1312 $new_page = $lm_page->copyToOtherContObject($this->lm, $copied_nodes);
1313 $id = $new_page->getId();
1322 != $this->lm->getId()) {
1327 $lm_page->setLMId($this->lm->getId());
1329 $page = $lm_page->getPageObject();
1331 $page->setParentId($this->lm->getId());
1338 $this->
ctrl->redirect($this,
"pages");
1343 $ids = $this->edit_request->getIds();
1344 if (count($ids) == 0) {
1345 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1346 $this->
ctrl->redirect($this,
"pages");
1352 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_copied"),
true);
1354 $this->
ctrl->redirect($this,
"pages");
1359 int $a_startnode_id = 1
1363 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1366 for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1371 $path .= $tmpPath[$i][
"title"];
1380 foreach ($a_actions as $name =>
$lng) {
1381 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1384 $notoperations = array();
1386 $operations = array();
1389 foreach (
$d as $row) {
1390 if (!in_array($row[
"name"], $notoperations)) {
1391 $operations[] = $row;
1396 if (count($operations) > 0) {
1397 foreach ($operations as $val) {
1398 $this->tpl->setCurrentBlock(
"operation_btn");
1399 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1400 $this->tpl->setVariable(
"BTN_VALUE", $this->
lng->txt($val[
"lng"]));
1401 $this->tpl->parseCurrentBlock();
1404 $this->tpl->setCurrentBlock(
"operation");
1406 $this->tpl->parseCurrentBlock();
1412 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
1414 parent::viewObject();
1426 $ids = $this->edit_request->getIds();
1427 if (count($ids) == 0) {
1428 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1429 if ($a_parent_subobj_id == 0) {
1430 $this->
ctrl->redirect($this,
"chapters");
1434 if (count($ids) > 1) {
1435 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"));
1436 if ($a_parent_subobj_id == 0) {
1437 $this->
ctrl->redirect($this,
"chapters");
1443 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"));
1444 if ($a_parent_subobj_id == 0) {
1445 $this->
ctrl->redirect($this,
"chapters");
1452 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_chap_select_target_now"),
true);
1454 if ($a_parent_subobj_id == 0) {
1455 $this->
ctrl->redirect($this,
"chapters");
1466 $this->insertChapterClip();
1471 $ids = $this->edit_request->getIds();
1472 if (count($ids) == 0) {
1473 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1474 $this->
ctrl->redirect($this,
"pages");
1477 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_cut"),
true);
1482 $this->
ctrl->redirect($this,
"pages");
1487 if ($this->requested_new_type ==
"pg") {
1488 $this->
ctrl->redirect($this,
"pages");
1490 $this->
ctrl->redirect($this,
"chapters");
1496 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
1498 if ($ot->getContentTranslationActivated()) {
1499 $format = explode(
"_", $this->edit_request->getFormat());
1505 $cont_exp->buildExportFile($opt);
1515 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1516 $cgui->setHeaderText($this->
lng->txt(
"cont_fix_tree_confirm"));
1517 $cgui->setCancel($this->
lng->txt(
"cancel"),
"showMaintenance");
1518 $cgui->setConfirm($this->
lng->txt(
"cont_fix_tree"),
"fixTree");
1519 $issues = $this->lm->checkStructure();
1521 if (count($issues) > 0) {
1522 $mess =
"Found Issues: <br>" . implode(
"<br>", $issues);
1524 $this->tpl->setContent($cgui->getHTML() . $mess);
1529 $this->lm->fixTree();
1530 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cont_tree_fixed"),
true);
1531 $this->
ctrl->redirect($this,
"showMaintenance");
1536 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
1538 if ($ot->getContentTranslationActivated()) {
1539 $format = explode(
"_", $this->edit_request->getFormat());
1543 $cont_exp->buildExportFile();
1551 bool $a_omit_obj_id =
false 1556 if (!$a_omit_obj_id) {
1559 $lmtree = $this->lm->getTree();
1563 $path = $lmtree->getPathFull($lmtree->getRootId());
1565 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
1570 foreach (
$path as $key => $row) {
1571 if ($row[
"child"] == 1) {
1572 $this->
ctrl->setParameter($this,
"obj_id",
null);
1573 $locator->addItem($this->lm->getTitle(), $this->
ctrl->getLinkTarget($this,
"chapters"));
1575 $title = $row[
"title"];
1576 switch ($row[
"type"]) {
1578 $this->
ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id", $row[
"child"]);
1579 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
1583 $this->
ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id", $row[
"child"]);
1584 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
1589 if (!$a_omit_obj_id) {
1590 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1626 $user_q_ids = $this->edit_request->getUserQuestionIds();
1627 if (count($user_q_ids) > 0) {
1628 foreach ($user_q_ids as $uqid) {
1629 $uqid = explode(
":", $uqid);
1632 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1634 $ilCtrl->redirect($this,
"listBlockedUsers");
1642 $user_q_ids = $this->edit_request->getUserQuestionIds();
1643 if (count($user_q_ids) > 0) {
1644 foreach ($user_q_ids as $uqid) {
1645 $uqid = explode(
":", $uqid);
1648 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1650 $ilCtrl->redirect($this,
"listBlockedUsers");
1657 $user_q_ids = $this->edit_request->getUserQuestionIds();
1658 if (count($user_q_ids) == 0) {
1659 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 1);
1660 $ilCtrl->
redirect($this,
"listBlockedUsers");
1664 foreach ($user_q_ids as $uqid) {
1665 $uqid = explode(
":", $uqid);
1667 if (!in_array($login, $rcps)) {
1677 'rcp_to' => implode(
',', $rcps),
1685 $link = chr(13) . chr(10) . chr(13) . chr(10);
1686 $link .= $this->
lng->txt(
'cont_blocked_users_mail_link');
1687 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1688 $link .= ilLink::_getLink($this->lm->getRefId());
1689 return rawurlencode(base64_encode($link));
1697 protected function setTabs(
string $a_act =
""): void
1699 parent::setTitleAndDescription();
1714 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1718 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1726 $ilCtrl->getLinkTarget($this,
"pages")
1732 $lng->
txt(
"cont_short_titles"),
1733 $ilCtrl->getLinkTargetByClass(
"illmeditshorttitlesgui",
"")
1737 if (
$lm_set->get(
"html_export_ids")) {
1741 $lng->
txt(
"cont_html_export_ids"),
1742 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1750 $lng->
txt(
"cont_online_help_ids"),
1751 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1757 $ilCtrl->getLinkTarget($this,
"showTooltipList")
1764 $lng->
txt(
"cont_internal_links"),
1765 $ilCtrl->getLinkTarget($this,
"listLinks")
1771 $lng->
txt(
"cont_maintenance"),
1772 $ilCtrl->getLinkTarget($this,
"showMaintenance")
1778 $lng->
txt(
"cont_subtitle_files"),
1779 $ilCtrl->getLinkTargetByClass(
"ilmobmultisrtuploadgui",
"")
1786 $ilCtrl->getLinkTargetByClass(
"illmimportgui",
"")
1789 $ilTabs->activateSubTab($a_active);
1790 $ilTabs->activateTab(
"content");
1802 $lng->
txt(
"cont_question_stats"),
1803 $ilCtrl->getLinkTarget($this,
"listQuestions")
1809 $lng->
txt(
"cont_blocked_users"),
1810 $ilCtrl->getLinkTarget($this,
"listBlockedUsers")
1813 $ilTabs->activateSubTab($a_active);
1823 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1827 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1831 if ($this->
object->isInfoEnabled()) {
1835 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary')
1843 $this->
ctrl->getLinkTarget($this,
'properties')
1850 $this->
ctrl->getLinkTarget($this,
"listQuestions")
1856 'learning_progress',
1857 $lng->
txt(
"learning_progress"),
1858 $this->
ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
'')
1864 $mdtab = $mdgui->getTab();
1877 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1881 if ($rbacsystem->
checkAccess(
'edit_permission', $this->lm->getRefId())) {
1885 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
1890 $ilTabs->activateTab($a_act);
1894 $ilTabs->addNonTabbedLink(
1896 $lng->
txt(
"cont_presentation_view"),
1897 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->lm->getRefId()
1908 array(
"settings",
"cont_style",
"cont_lm_menu",
"public_section",
1909 "cont_glossaries",
"cont_multilinguality",
"obj_multilinguality",
1913 $ilTabs->addSubTabTarget(
1915 $this->
ctrl->getLinkTarget($this,
'properties'),
1921 $ilTabs->addSubTabTarget(
1923 $this->
ctrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
""),
1925 "ilObjectContentStyleSettingsGUI" 1929 $ilTabs->addSubTabTarget(
1931 $this->
ctrl->getLinkTarget($this,
'editMenuProperties'),
1937 $ilTabs->addSubTabTarget(
1939 $this->
ctrl->getLinkTarget($this,
'editGlossaries'),
1944 $ilTabs->addSubTabTarget(
1945 "obj_multilinguality",
1946 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"")
1950 if ($lti_settings->hasSettingsAccess()) {
1951 $ilTabs->addSubTabTarget(
1953 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1957 $ilTabs->setSubTabActive($a_active);
1964 $this->lmme_obj->setObjId($this->lm->getId());
1978 $ilTabs->setTabActive(
"settings");
1981 $ilToolbar->addButton(
1982 $this->
lng->txt(
"lm_menu_select_internal_object"),
1983 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
1986 if (is_null($form)) {
1989 $this->tpl->setContent($form->
getHTML());
2001 $ti->setMaxLength(255);
2003 $ti->setRequired(
true);
2008 $ta->setMaxLength(255);
2010 $ta->setRequired(
true);
2013 if ($a_mode ==
"edit") {
2015 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2016 $ti->setValue($this->lmme_obj->getTitle());
2017 $ta->setValue($this->lmme_obj->getTarget());
2020 if ($this->requested_link_ref_id > 0) {
2026 $target_link = $obj_type .
"_" . $link_ref_id;
2027 $ti->setValue($title);
2028 $ta->setValue($target_link);
2032 $hi->setValue($link_ref_id);
2038 if ($a_mode ==
"create") {
2058 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2059 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2060 $this->lmme_obj->setLinkRefId((
int) $form->
getInput(
"link_ref_id"));
2062 if ($form->
getInput(
"link_ref_id")) {
2063 $this->lmme_obj->setLinkType(
"intern");
2066 $this->lmme_obj->create();
2068 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_added"),
true);
2069 $this->
ctrl->redirect($this,
"editMenuProperties");
2078 if (empty($this->requested_menu_entry)) {
2079 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2080 $this->
ctrl->redirect($this,
"editMenuProperties");
2084 $this->lmme_obj->delete($this->requested_menu_entry);
2086 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_removed"),
true);
2087 $this->
ctrl->redirect($this,
"editMenuProperties");
2098 $ilTabs->setTabActive(
"settings");
2102 if (empty($this->requested_menu_entry)) {
2103 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2104 $this->
ctrl->redirect($this,
"editMenuProperties");
2107 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2108 $ilToolbar->addButton(
2109 $this->
lng->txt(
"lm_menu_select_internal_object"),
2110 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
2113 if (is_null($form)) {
2116 $this->tpl->setContent($form->
getHTML());
2123 if ($this->edit_request->getMenuEntry() ==
"") {
2124 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2125 $this->
ctrl->redirect($this,
"editMenuProperties");
2129 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2130 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2131 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2132 if ($form->
getInput(
"link_ref_id")) {
2133 $this->lmme_obj->setLinkType(
"intern");
2135 if (is_int(strpos($form->
getInput(
"target"),
"."))) {
2136 $this->lmme_obj->setLinkType(
"extern");
2138 $this->lmme_obj->update();
2139 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_updated"),
true);
2140 $this->
ctrl->redirect($this,
"editMenuProperties");
2154 $ilTabs->setTabActive(
"settings");
2157 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2159 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"lm_menu_select_object_to_add"));
2163 "showEntrySelector",
2169 $exp->setClickableTypes(array(
'mcst',
'mep',
'cat',
'lm',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
"crs",
"grp",
"book",
"tst",
"file"));
2170 if (!$exp->handleCommand()) {
2171 $this->tpl->setContent($exp->getHTML());
2180 $ids = $this->edit_request->getIds();
2181 if (count($ids) == 0) {
2182 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2183 $this->
ctrl->redirect($this,
"pages");
2185 if (count($ids) > 1) {
2186 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2187 $this->
ctrl->redirect($this,
"pages");
2189 if ($ids[0] != $this->lm->getHeaderPage()) {
2190 $this->lm->setHeaderPage($ids[0]);
2192 $this->lm->setHeaderPage(0);
2194 $this->lm->updateProperties();
2195 $this->
ctrl->redirect($this,
"pages");
2203 $ids = $this->edit_request->getIds();
2204 if (count($ids) == 0) {
2205 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2206 $this->
ctrl->redirect($this,
"pages");
2208 if (count($ids) > 1) {
2209 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2210 $this->
ctrl->redirect($this,
"pages");
2212 if ($ids[0] != $this->lm->getFooterPage()) {
2213 $this->lm->setFooterPage($ids[0]);
2215 $this->lm->setFooterPage(0);
2217 $this->lm->updateProperties();
2218 $this->
ctrl->redirect($this,
"pages");
2230 $this->edit_request->getTitles(),
2234 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"lm_save_titles"),
true);
2235 $ilCtrl->redirect($this,
"chapters");
2238 public static function _goto(
string $a_target): void
2241 $main_tpl = $DIC->ui()->mainTemplate();
2243 $ilAccess = $DIC->access();
2245 $lng = $DIC->language();
2246 $ctrl = $DIC->ctrl();
2248 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2255 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2259 $main_tpl->setOnScreenMessage(
'failure', sprintf(
2260 $lng->
txt(
"msg_no_perm_read_item"),
2275 if (count($ids) == 0) {
2276 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2277 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2281 foreach ($ids as $k => $item) {
2286 foreach ($todel as $k) {
2291 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"cont_selected_items_have_been_cut"),
true);
2293 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2304 if (count($ids) == 0) {
2305 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2306 $ilCtrl->redirect($this,
"chapters");
2310 foreach ($ids as $k => $item) {
2315 foreach ($todel as $k) {
2320 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"cont_selected_items_have_been_copied"),
true);
2321 $ilCtrl->redirect($this,
"chapters");
2348 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2349 $lm_tree = $this->lm->getTree();
2351 $options = array(
"" =>
$lng->
txt(
"all"));
2352 foreach ($childs as
$c) {
2353 $options[$c[
"child"]] = $c[
"title"];
2358 $ilToolbar->addInputItem($si,
true);
2359 $ilToolbar->addFormButton(
$lng->
txt(
"help_filter"),
"filterHelpChapters");
2373 $ilCtrl->redirect($this,
"showExportIDsOverview");
2383 foreach ($this->edit_request->getExportIds() as $exp_id) {
2384 if ($exp_id !=
"" && !preg_match(
2385 "/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
2392 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"cont_exp_ids_not_resp_format1") .
": a-z, A-Z, 0-9, '_'. " .
2393 $lng->
txt(
"cont_exp_ids_not_resp_format3") .
" " .
2394 $lng->
txt(
"cont_exp_ids_not_resp_format2"));
2400 foreach ($this->edit_request->getExportIds() as $pg_id => $exp_id) {
2409 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"cont_saved_export_ids"),
true);
2410 $ilCtrl->redirect($this,
"showExportIdsOverview");
2417 $help_map = $this->
help->internal()->domain()->map();
2419 foreach ($this->edit_request->getScreenIds() as $chap => $ids) {
2420 $ids = explode(
"\n", $ids);
2421 $help_map->saveScreenIdsForChapter($chap, $ids);
2423 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2424 $ilCtrl->redirect($this,
"showExportIdsOverview");
2441 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2443 $ti->setMaxLength(200);
2445 $ilToolbar->addInputItem($ti,
true);
2446 $ilToolbar->addFormButton(
$lng->
txt(
"add"),
"addTooltip");
2447 $ilToolbar->addSeparator();
2449 $options = $this->
help->internal()->domain()->tooltips()->getTooltipComponents();
2456 $ilToolbar->addInputItem($si,
true);
2457 $ilToolbar->addFormButton(
$lng->
txt(
"help_filter"),
"filterTooltips");
2469 $tt_id = $this->edit_request->getTooltipId();
2470 if (trim($tt_id) !=
"") {
2471 if (is_int(strpos($tt_id,
"_"))) {
2472 $this->
help->internal()->domain()->tooltips()->addTooltip(trim($tt_id),
"");
2473 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2475 $fu = strpos($tt_id,
"_");
2476 $comp = substr($tt_id, 0, $fu);
2479 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"cont_help_no_valid_tooltip_id"),
true);
2482 $ilCtrl->redirect($this,
"showTooltipList");
2491 $this->edit_request->getTooltipComponent()
2493 $ilCtrl->redirect($this,
"showTooltipList");
2501 $tooltip_ids = $this->edit_request->getTooltipIds();
2502 foreach ($this->edit_request->getTooltipTexts() as
$id => $text) {
2503 $this->
help->internal()->domain()->tooltips()->updateTooltip(
2506 $tooltip_ids[(
int) $id]
2509 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2510 $ilCtrl->redirect($this,
"showTooltipList");
2518 $ids = $this->edit_request->getIds();
2519 if (count($ids) > 0) {
2520 foreach ($ids as
$id) {
2521 $this->
help->internal()->domain()->tooltips()->deleteTooltip($id);
2523 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2525 $ilCtrl->redirect($this,
"showTooltipList");
2535 string $a_def_option =
"" 2541 $lng = $DIC->language();
2545 if ($a_def_option !=
"") {
2549 $layout->addOption(
new ilRadioOption(
"<table><tr><td>" . $im_tag .
"</td><td><strong>" .
2550 $lng->
txt(
"cont_lm_default_layout") .
2551 "</strong>: " .
$lng->
txt(
"cont_layout_" . $a_def_option) .
2552 "</td></tr></table>",
""));
2559 $layout->addOption(
new ilRadioOption(
"<table><tr><td style='padding: 0px 5px 5px;'>" .
2560 $im_tag .
"</td><td style='padding:5px;'><strong>" .
$lng->
txt(
"cont_layout_" . $l) .
"</strong>: " .
2561 $lng->
txt(
"cont_layout_" . $l .
"_desc") .
"</td></tr></table>", $l));
2582 bool $a_in_hierarchy =
false 2588 $ids = $this->edit_request->getIds();
2589 if (count($ids) == 0) {
2590 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2592 if ($a_in_hierarchy) {
2593 $ilCtrl->redirect($this,
"chapters");
2595 $ilCtrl->redirect($this,
"pages");
2611 $ids = $this->edit_request->getIds();
2612 foreach ($ids as
$id) {
2615 $this->
form->addItem($hi);
2617 $layout = self::getLayoutOption(
2620 $this->lm->getLayout()
2622 $this->
form->addItem($layout);
2624 $this->
form->addCommandButton(
"savePageLayout",
$lng->
txt(
"save"));
2625 $this->
form->addCommandButton(
"pages",
$lng->
txt(
"cancel"));
2627 $this->
form->setTitle(
$lng->
txt(
"cont_set_layout"));
2628 $this->
form->setFormAction($ilCtrl->getFormAction($this));
2636 $ilCtrl->
setParameter($this,
"hierarchy", $this->requested_hierarchy);
2638 $ids = $this->edit_request->getIds();
2639 foreach ($ids as
$id) {
2642 $this->edit_request->getLayout(),
2646 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2648 if ($this->requested_hierarchy) {
2649 $ilCtrl->redirect($this,
"chapters");
2651 $ilCtrl->redirect($this,
"pages");
2671 $ilTabs->setTabActive(
"settings");
2674 $ilToolbar->addButton(
2676 $ilCtrl->getLinkTarget($this,
"showLMGlossarySelector")
2692 $ilTabs->setTabActive(
"settings");
2697 $exp->setPathOpen($this->
object->getRefId());
2698 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'showLMGlossarySelector'));
2699 $exp->setTargetClass(get_class($this));
2700 $exp->setCmd(
'confirmGlossarySelection');
2701 $exp->setClickableTypes(array(
"glo"));
2702 $exp->addFilter(
"glo");
2716 $ilCtrl->setParameter($this,
"glo_ref_id", $this->requested_root_id);
2717 $cgui->setFormAction($ilCtrl->getFormAction($this));
2718 $cgui->setHeaderText(
$lng->
txt(
"cont_link_glo_in_lm"));
2719 $cgui->setCancel(
$lng->
txt(
"no"),
"selectLMGlossary");
2720 $cgui->setConfirm(
$lng->
txt(
"yes"),
"selectLMGlossaryLink");
2727 $this->lm->autoLinkGlossaryTerms($glo_ref_id);
2736 $glos = $this->lm->getAutoGlossaries();
2739 if (!in_array($glo_id, $glos)) {
2742 $this->lm->setAutoGlossaries($glos);
2743 $this->lm->update();
2745 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2746 $ilCtrl->redirect($this,
"editGlossaries");
2754 $this->lm->removeAutoGlossary($this->requested_glo_id);
2755 $this->lm->update();
2757 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2758 $ilCtrl->redirect($this,
"editGlossaries");
2766 if ($this->lang_switch_mode ==
"short_titles") {
2767 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2769 $ilCtrl->redirect($this,
"chapters");
2776 $ilCtrl->
setParameter($this,
"transl", $this->requested_totransl);
2777 if ($this->lang_switch_mode ==
"short_titles") {
2778 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2780 $ilCtrl->redirect($this,
"chapters");
2786 parent::redrawHeaderActionObject();
2794 $this->
ctrl->redirectByClass(array(
'illearningprogressgui'),
'');
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
showExportIDsOverview(bool $a_validation=false)
static get(string $a_var)
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static setAction(string $a_action)
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.
setQuestionsSubTabs(string $a_active)
Readable part of repository interface to ilComponentDataDB.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLayoutOption(string $a_txt, string $a_var, string $a_def_option="")
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Import related features for learning modules.
setPageLayoutInHierarchy()
Set layout for multiple pages.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
moveChapter(int $a_parent_subobj_id=0)
move a single chapter (selection)
static _createEntry(int $a_obj_id, string $a_action, array $a_info_params=[], string $a_obj_type="", string $a_user_comment="", bool $a_update_last=false)
Creates a new history entry for an object.
string $requested_new_type
static storeContentObject(string $a_type, int $a_id, string $a_action="cut")
GUI class for the workflow of copying objects.
const TYPE_LM_BLOCKED_USERS
static saveTitles(ilObjLearningModule $a_lm, array $a_titles, string $a_lang="-")
Save titles for lm objects.
int $requested_link_ref_id
int $requested_search_root_expand
copyItems(array $ids)
Copy items to clipboard.
setPageLayout(bool $a_in_hierarchy=false)
Set layout for multiple pages.
prepareOutput(bool $show_sub_objects=true)
showMaintenance()
Show maintenance.
EditingGUIRequest $edit_request
Interface Observer Contains several chained tasks and infos about them.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
string $requested_totransl
GUI class for object translation handling.
listLinks()
List all broken links.
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
activatePages()
activates or deactivates pages
int $requested_menu_entry
isInTree(?int $a_node_id)
get all information of a node.
static getAvailableLayouts()
get all available lm layouts
addLocations(bool $a_omit_obj_id=false)
display locator
ilStructureObjectGUI: ilConditionHandlerGUI, ilObjectMetaDataGUI ilStructureObjectGUI: ILIAS ...
ilComponentRepository $component_repository
setContent(string $a_html)
Sets content for standard template.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
deleteTree(array $a_node)
delete node and the whole subtree under this node
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
static clipboardCut(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
afterSave(ilObject $new_object)
string $requested_baseClass
getContextPath(int $a_endnode_id, int $a_startnode_id=1)
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
saveAllTitles()
Save all titles of chapters/pages.
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
getPropertiesFormValues()
Get values for properties form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
catch(\Exception $e) $req
static _lookupTitle(int $a_obj_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 ...
ilObjLearningModule $lm_obj
static _goto(string $a_target)
selectFooter()
select page as footer
saveProperties()
save properties
static http()
Fetches the global http state from ILIAS.
static _lookupSetting(string $a_set)
ILIAS LearningModule ReadingTime SettingsGUI $reading_time_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
string $requested_backcmd
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
GUI class for LTI provider object settings.
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static writeLayout(int $a_obj_id, string $a_layout, ?ilObjLearningModule $a_lm=null)
Write layout setting.
properties()
edit properties form
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
selectHeader()
select page as header
setScreenIdComponent(string $a_comp)
Class ilObjectGUI Basic methods of all Output classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 _lookupObjectId(int $ref_id)
Page multilinguality GUI class.
ilObjectService $object_service
int $requested_lm_menu_expand
addMenuEntry(?ilPropertyFormGUI $form=null)
display add menu entry form
showActions(array $a_actions)
int $requested_glo_ref_id
setTabs(string $a_act="")
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
setCustomRolesForSelection(array $a_roles)
Set custom roles for mapping to LTI roles.
static getContentObjectType()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS LearningModule InternalDomainService $domain
static _writeActive(int $a_id, string $a_parent_type, bool $a_active)
write activation status
static getMultiLangHeader(int $a_lm_id, object $a_gui_class, string $a_mode="")
static redirect(string $a_script)
ILIAS Style Content Service $content_style_service
User Interface for Learning Module Page Objects Editing.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
setContentSubTabs(string $a_active)
static unlock(int $a_q_id, int $a_user_id)
Unlock question for user.
form( $class_path, string $cmd, string $submit_caption="")
setSubTabs(string $a_active)
static saveExportId(int $a_lm_id, int $a_lmobj_id, string $a_exp_id, string $a_type="pg")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getContentObjectId()
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...
string $requested_lang_switch_mode
initMenuEntryForm(string $a_mode="edit")
confirmGlossarySelection()
__construct(Container $dic, ilPlugin $plugin)
const LP_CONTEXT_REPOSITORY
learningProgress()
Learning progress.
This class represents a text area property in a property form.
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=false)
static _lookupType(int $a_obj_id, int $a_lm_id=0)
getBlockedUsersMailSignature()
initPropertiesForm()
Init properties form.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
Class ilObjContentObjectGUI.
bool $requested_lmmovecopy
static _lookupContObjID(int $a_id)
get learning module id for lm object
const INFO_TAB_VISIBILITY
bool $requested_hierarchy
buildExportOptionsFormHTML()
ILIAS LearningModule InternalGUIService $gui
int $requested_active_node
const CMD_LIST_EXPORT_FILES
editGlossaries()
Edit automatically linked glossaries.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
static _lookupType(int $id, bool $reference=false)
cutChapter()
Cut chapter(s)
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static set(string $a_var, $a_val)
Set a value.
confirmedDelete(int $a_parent_subobj_id=0)
delete page object or structure objects
addTabs(string $a_act="")
editMenuEntry(?ilPropertyFormGUI $form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
static isOnlineHelpModule(int $a_id, bool $a_as_obj_id=false)
Is module an online module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static clipboardCopy(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static _lookupLogin(int $a_user_id)
buildExportOptionsFormXML()