36 protected \ILIAS\LearningModule\InternalGUIService
$gui;
37 protected \ILIAS\LearningModule\InternalDomainService
$domain;
48 protected \ILIAS\DI\UIServices
$ui;
87 bool $a_call_by_reference =
true,
88 bool $a_prepare_output =
false 92 $this->
lng = $DIC->language();
93 $this->
access = $DIC->access();
94 $this->
tabs = $DIC->tabs();
96 $this->
user = $DIC->user();
97 $this->tpl = $DIC[
"tpl"];
98 $this->
toolbar = $DIC->toolbar();
99 $this->rbacsystem = $DIC->rbac()->system();
100 $this->tree = $DIC->repositoryTree();
101 $this->
help = $DIC[
"ilHelp"];
102 $this->
locator = $DIC[
"ilLocator"];
103 $this->db = $DIC->database();
104 $this->log = $DIC[
"ilLog"];
105 $this->
ui = $DIC->ui();
106 $lng = $DIC->language();
107 $ilCtrl = $DIC->ctrl();
108 $this->
ctrl = $ilCtrl;
109 $this->component_repository = $DIC[
"component.repository"];
114 $this->edit_request = $DIC
122 $this->to_props =
$req->getToProps();
123 $this->requested_obj_id =
$req->getObjId();
124 $this->requested_ref_id =
$req->getRefId();
125 $this->requested_root_id =
$req->getRootId();
126 $this->requested_glo_id =
$req->getGlossaryId();
127 $this->requested_glo_ref_id =
$req->getGlossaryRefId();
128 $this->requested_menu_entry =
$req->getMenuEntry();
129 $this->requested_lm_menu_expand =
$req->getLMMenuExpand();
130 $this->requested_search_root_expand =
$req->getSearchRootExpand();
131 $this->requested_new_type =
$req->getNewType();
132 $this->requested_baseClass =
$req->getBaseClass();
133 $this->requested_transl =
$req->getTranslation();
134 $this->requested_backcmd =
$req->getBackCmd();
135 $this->requested_hierarchy =
$req->getHierarchy();
136 $this->lang_switch_mode =
$req->getLangSwitchMode();
137 $this->requested_active_node =
$req->getActiveNode();
138 $this->requested_lmexpand =
$req->getLMExpand();
139 $this->requested_link_ref_id =
$req->getLinkRefId();
140 $this->requested_totransl =
$req->getToTranslation();
141 $this->requested_lmmovecopy =
$req->getLMMoveCopy();
142 $this->content_style_service = $DIC
145 $id = (isset($this->
object))
148 $this->reading_time_gui = new \ILIAS\LearningModule\ReadingTime\SettingsGUI(
$id);
149 $this->domain = $DIC->learningModule()->internal()->domain();
150 $this->gui = $DIC->learningModule()->internal()->gui();
156 $baseclass = strtolower($this->requested_baseClass);
157 $next_class = strtolower($this->
ctrl->getNextClass());
160 if (!in_array($baseclass, [
"illmpresentationgui",
"illmeditorgui"])) {
163 if (in_array($next_class, [
"ilcommonactiondispatchergui"])) {
184 if ($this->
ctrl->getRedirectSource() ==
"ilinternallinkgui") {
190 if ($this->
ctrl->getCmdClass() ==
"ilinternallinkgui") {
191 $this->
ctrl->setReturn($this,
"explorer");
195 $next_class = $this->
ctrl->getNextClass($this);
198 if ($this->to_props) {
199 $cmd = $this->
ctrl->getCmd(
"properties");
201 $cmd = $this->
ctrl->getCmd(
"chapters");
204 switch ($next_class) {
205 case 'illtiproviderobjectsettinggui':
208 $ilTabs->setTabActive(
"settings");
213 $lti_gui->offerLTIRolesForSelection(
true);
214 $this->
ctrl->forwardCommand($lti_gui);
219 case "illearningprogressgui":
222 $this->
setTabs(
"learning_progress");
225 $this->
ctrl->forwardCommand($new_gui);
229 case 'ilobjectmetadatagui':
230 if (!$ilAccess->checkAccess(
'write',
'', $this->lm->getRefId())) {
239 $md_gui->addMDObserver($this->lm,
'MDUpdateListener',
'Educational');
240 $md_gui->addMDObserver($this->lm,
'MDUpdateListener',
'General');
241 $this->
ctrl->forwardCommand($md_gui);
244 case "ilobjectcontentstylesettingsgui":
252 $settings_gui = $this->content_style_service
254 ->objectSettingsGUIForRefId(
258 $this->
ctrl->forwardCommand($settings_gui);
262 case "illmpageobjectgui":
264 $ilTabs->setBackTarget(
266 $ilCtrl->getLinkTarget($this,
"chapters")
268 $this->
ctrl->saveParameter($this, array(
"obj_id"));
270 $this->
ctrl->setReturn($this,
"chapters");
273 if ($this->requested_obj_id > 0) {
276 $pg_gui->setLMPageObject($obj);
278 $this->
ctrl->forwardCommand($pg_gui);
281 case "ilstructureobjectgui":
282 $ilTabs->setBackTarget(
284 $ilCtrl->getLinkTarget($this,
"chapters")
287 $this->
ctrl->saveParameter($this, array(
"obj_id"));
289 $this->
ctrl->setReturn($this,
"chapters");
291 if ($this->requested_obj_id > 0) {
294 $st_gui->setStructureObject($obj);
296 $this->
ctrl->forwardCommand($st_gui);
297 if ($cmd ==
"save" || $cmd ==
"cancel") {
298 if ($this->requested_obj_id == 0) {
299 $this->
ctrl->redirect($this,
"chapters");
307 case 'ilpermissiongui':
308 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
316 $this->
ctrl->forwardCommand($perm_gui);
320 case 'ilinfoscreengui':
321 if (!$this->
object->isInfoEnabled()) {
328 $info->enablePrivateNotes();
329 $info->enableLearningProgress();
331 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
332 $info->enableNewsEditing();
333 $info->setBlockProperty(
"news",
"settings",
true);
337 $info->addMetaDataSections(
343 $this->
ctrl->forwardCommand($info);
350 case "showExportOptionsXML":
351 case "showExportOptionsHTML":
357 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"transl",
"");
358 $this->
ctrl->setParameterByClass(ilLMEditorGUI::class,
"transl",
"");
360 $this->
ctrl->forwardCommand($exp_gui);
367 case 'ilobjecttranslationgui':
373 $transgui->setTitleDescrOnlyMode(
false);
374 $this->
ctrl->forwardCommand($transgui);
378 case "ilcommonactiondispatchergui":
381 $this->
ctrl->forwardCommand($gui);
384 case 'ilobjectcopygui':
388 $this->
ctrl->forwardCommand($cp);
391 case "ilmobmultisrtuploadgui":
397 $this->
ctrl->forwardCommand($gui);
400 case "illmimportgui":
406 $this->
ctrl->forwardCommand($gui);
409 case "illmeditshorttitlesgui":
418 $this->edit_request->getTranslation()
420 $this->
ctrl->forwardCommand($gui);
423 case strtolower(EditSubObjectsGUI::class):
427 if ($this->edit_request->getSubType() ===
"pg") {
433 $gui = $this->gui->editing()->editSubObjectsGUI(
434 $this->edit_request->getSubType(),
436 $this->
lng->txt(
"cont_chapters")
438 $this->
ctrl->forwardCommand($gui);
444 if ($cmd ==
"create" &&
445 !in_array($new_type, array(
"lm"))) {
448 $this->
ctrl->redirectByClass(ilLMPageObjectGUI::class, $this->
ctrl->getCmd());
452 $this->
ctrl->redirectByClass(ilStructureObjectGUI::class, $this->
ctrl->getCmd());
458 $new_type ===
"lm") {
476 $this->
lng->loadLanguageModule(
'exp');
479 if ($ot->getContentActivated()) {
480 $this->
lng->loadLanguageModule(
"meta");
481 $langs = $ot->getLanguages();
482 foreach ($langs as $l => $ldata) {
483 $items[
"html_" . $l] = $this->
lng->txt(
"meta_l_" . $l);
485 $items[
"html_all"] = $this->
lng->txt(
"cont_all_languages");
487 if (!$ot->getContentActivated()) {
488 $items[
"exportHTML"] =
"HTML";
490 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"language"), $items)
491 ->withRequired(
true);
492 $section = $this->
ui->factory()->input()->field()->section(
494 $this->
lng->txt(
"export_options")
496 return $this->
ui->factory()->input()->container()->form()->standard(
497 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportHTML"),
499 )->withSubmitLabel($this->
lng->txt(
"export"));
504 $this->
lng->loadLanguageModule(
'exp');
507 if ($ot->getContentActivated()) {
508 $items[
"xml_master"] = $this->
lng->txt(
"cont_master_language_only");
509 $items[
"xml_masternomedia"] = $this->
lng->txt(
"cont_master_language_only_no_media");
510 $this->
lng->loadLanguageModule(
"meta");
511 $langs = $ot->getLanguages();
513 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"export_type"), $items)
514 ->withRequired(
true);
515 $section = $this->
ui->factory()->input()->field()->section(
517 $this->
lng->txt(
"export_options")
519 return $this->
ui->factory()->input()->container()->form()->standard(
520 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportXML"),
522 )->withSubmitLabel($this->
lng->txt(
"export"));
536 if ($ot->getContentActivated()) {
542 if (!$ot->getContentActivated()) {
551 if (!is_null($form->getData())) {
552 $format = explode(
"_", $form->getData()[0][0]);
554 if (is_null($form->getData())) {
558 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
563 $cont_exp->buildExportFile($opt);
572 if ($ot->getContentActivated() and !is_null($form->getData())) {
573 $format = explode(
"_", $form->getData()[0][0]);
576 if ($ot->getContentActivated() and is_null($form->getData())) {
580 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
584 $cont_exp->buildExportFile();
605 $ecs->addSettingsToForm($this->
form,
'lm');
607 $this->tpl->setContent($this->
form->getHTML());
625 $ti->setRequired(
true);
626 $this->
form->addItem($ti);
630 $this->
form->addItem($ta);
634 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
635 $this->
form->addItem($section);
639 $this->
form->addItem($online);
643 $section->setTitle($this->
lng->txt(
'cont_presentation'));
644 $this->
form->addItem($section);
647 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->addTileImage();
651 $option = array(
"st_title" => $this->
lng->txt(
"cont_st_title"),
652 "pg_title" => $this->
lng->txt(
"cont_pg_title"),
653 "none" => $this->
lng->txt(
"cont_none"));
655 $this->
form->addItem($page_header);
659 $this->
form->addItem($chap_num);
663 $option = array(
"chapters" => $this->
lng->txt(
"cont_chapters_only"),
664 "pages" => $this->
lng->txt(
"cont_chapters_and_pages"));
666 $this->
form->addItem($toc_mode);
670 $progr_icons->setInfo($this->
lng->txt(
"cont_progress_icons_info"));
671 $this->
form->addItem($progr_icons);
673 $this->reading_time_gui->addSettingToForm($this->
form);
677 $section->setTitle($this->
lng->txt(
'cont_self_assessment'));
678 $this->
form->addItem($section);
684 $radg->addOption($op1);
686 $radg->addOption($op2);
687 $this->
form->addItem($radg);
691 $qfeed->setInfo($this->
lng->txt(
"cont_restrict_forw_nav_info"));
692 $this->
form->addItem($qfeed);
696 $not->setInfo($this->
lng->txt(
"cont_notify_on_blocked_users_info"));
697 $qfeed->addSubItem($not);
701 $qfeed->setInfo($this->
lng->txt(
"cont_disable_def_feedback_info"));
702 $this->
form->addItem($qfeed);
706 $section->setTitle($this->
lng->txt(
'obj_features'));
707 $this->
form->addItem($section);
711 $this->
lng->loadLanguageModule(
"notes");
713 $pub_nodes->setInfo($this->
lng->txt(
"cont_lm_comments_desc"));
714 $this->
form->addItem($pub_nodes);
718 $this->
lng->loadLanguageModule(
'rating');
720 $rate->setInfo($this->
lng->txt(
'rating_activate_rating_info'));
721 $this->
form->addItem($rate);
723 $this->
form->addItem($ratep);
725 $this->
form->setTitle(
$lng->
txt(
"cont_lm_properties"));
726 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
727 $this->
form->setFormAction($ilCtrl->getFormAction($this));
747 $title = $this->lm->getTitle();
748 $description = $this->lm->getLongDescription();
750 if ($ot->getContentActivated()) {
751 $title = $ot->getDefaultTitle();
752 $description = $ot->getDefaultDescription();
755 $values[
"title"] = $title;
756 $values[
"description"] = $description;
757 if (!$this->lm->getOfflineStatus()) {
758 $values[
"cobj_online"] =
true;
761 $values[
"lm_pg_header"] = $this->lm->getPageHeader();
762 if ($this->lm->isActiveNumbering()) {
763 $values[
"cobj_act_number"] =
true;
765 $values[
"toc_mode"] = $this->lm->getTOCMode();
766 if ($this->lm->publicNotes()) {
767 $values[
"cobj_pub_notes"] =
true;
769 if ($this->lm->cleanFrames()) {
770 $values[
"cobj_clean_frames"] =
true;
773 $values[
"rating"] = $this->lm->hasRating();
774 $values[
"rating_pages"] = $this->lm->hasRatingPages();
775 $values[
"disable_def_feedback"] = $this->lm->getDisableDefaultFeedback();
776 $values[
"progr_icons"] = $this->lm->getProgressIcons();
777 $values[
"store_tries"] = (string) (
int) $this->lm->getStoreTries();
778 $values[
"restrict_forw_nav"] = $this->lm->getRestrictForwardNavigation();
786 $values[
"cont_show_info_tab"] = $this->
object->isInfoEnabled();
787 $this->
form->setValuesByArray($values,
true);
807 if ($ot->getContentActivated()) {
808 $ot->setDefaultTitle($form->
getInput(
'title'));
809 $ot->setDefaultDescription($form->
getInput(
'description'));
813 $this->lm->setTitle($form->
getInput(
'title'));
814 $this->lm->setDescription($form->
getInput(
'description'));
815 $this->lm->setPageHeader($form->
getInput(
"lm_pg_header"));
816 $this->lm->setTOCMode($form->
getInput(
"toc_mode"));
817 $this->lm->setOfflineStatus(!($form->
getInput(
'cobj_online')));
818 $this->lm->setActiveNumbering((
bool) $form->
getInput(
"cobj_act_number"));
819 $this->lm->setCleanFrames((
bool) $form->
getInput(
"cobj_clean_frames"));
821 $this->lm->setPublicNotes($form->
getInput(
"cobj_pub_notes"));
823 $this->lm->setRating((
bool) $form->
getInput(
"rating"));
824 $this->lm->setRatingPages((
bool) $form->
getInput(
"rating_pages"));
825 $this->lm->setDisableDefaultFeedback((
int) $form->
getInput(
"disable_def_feedback"));
826 $this->lm->setProgressIcons((
int) $form->
getInput(
"progr_icons"));
827 $this->reading_time_gui->saveSettingFromForm($this->
form);
830 $store_tries = $form->
getInput(
"store_tries");
831 if ($form->
getInput(
"restrict_forw_nav") && !$form->
getInput(
"store_tries")) {
833 $add_info =
"</br>" .
$lng->
txt(
"cont_automatically_set_store_tries");
834 $add_info = str_replace(
"$1",
$lng->
txt(
"cont_tries_store"), $add_info);
835 $add_info = str_replace(
"$2",
$lng->
txt(
"cont_restrict_forw_nav"), $add_info);
838 $this->lm->setStoreTries((
int) $store_tries);
839 $this->lm->setRestrictForwardNavigation((
int) $form->
getInput(
"restrict_forw_nav"));
840 $this->lm->updateProperties();
844 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->saveTileImage();
850 (bool) $this->
form->getInput(
"notification_blocked_users")
865 if ($ecs->handleSettingsUpdate($form)) {
871 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified") . $add_info,
true);
872 $this->
ctrl->redirect($this,
"properties");
878 $this->
form->setValuesByPost();
879 $this->tpl->setContent($this->
form->getHTML());
892 $menu->setChecked($this->lm->isActiveLMMenu());
904 $print->setChecked($this->lm->isActivePrintView());
908 $glo =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
909 $glo->setChecked($this->lm->isActivePreventGlossaryAppendix());
910 $print->addSubItem($glo);
913 $hhfp =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_hide_head_foot_print"),
"hide_head_foot_print");
914 $hhfp->setChecked($this->lm->getHideHeaderFooterPrint());
915 $print->addSubItem($hhfp);
935 $ilTabs->setTabActive(
"settings");
938 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
939 $ilToolbar->addFormButton($this->
lng->txt(
"add_menu_entry"),
"addMenuEntry");
940 $ilToolbar->setCloseFormTag(
false);
947 $entries = $this->lmme_obj->getMenuEntries();
949 $table->setOpenFormTag(
false);
958 $this->lm->setActiveLMMenu((
int) $form->
getInput(
"cobj_act_lm_menu"));
960 $this->lm->setActivePrintView((
int) $form->
getInput(
"cobj_act_print"));
961 $this->lm->setActivePreventGlossaryAppendix((
int) $form->
getInput(
"cobj_act_print_prev_glo"));
962 $this->lm->setHideHeaderFooterPrint((
int) $form->
getInput(
"hide_head_foot_print"));
963 $this->lm->updateProperties();
967 $this->lmme_obj->updateActiveStatus($this->edit_request->getMenuEntries());
969 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
970 $this->
ctrl->redirect($this,
"editMenuProperties");
978 $this->lm->executeDragDrop(
979 $req->getHFormPar(
"source_id"),
980 $req->getHFormPar(
"target_id"),
981 $req->getHFormPar(
"fc"),
982 $req->getHFormPar(
"as_subitem")
984 $ilCtrl->redirect($this,
"chapters");
989 $new_object->setCleanFrames(
true);
993 $new_object->createLMTree();
996 $new_object->addFirstChapterAndPage();
999 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt($this->type .
"_added"),
true);
1000 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"ref_id", $new_object->
getRefId());
1001 $this->
ctrl->redirectByClass([ilLMEditorGUI::class, ilObjLearningModuleGUI::class],
"");
1007 public function delete(
int $a_parent_subobj_id = 0):
void 1009 $ids = $this->edit_request->getIds();
1011 if (count($ids) == 0) {
1012 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1017 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"),
true);
1021 if ($a_parent_subobj_id == 0) {
1025 if ($a_parent_subobj_id != 0) {
1026 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd", $this->requested_backcmd);
1027 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1030 $this->
ctrl->setParameter($this,
"backcmd", $this->requested_backcmd);
1037 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
1038 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelDelete");
1039 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"confirmedDelete");
1041 foreach ($ids as
$id) {
1044 $caption = $obj->getTitle();
1046 $cgui->addItem(
"id[]", $id, $caption);
1050 $this->tpl->setContent($cgui->getHTML());
1055 $this->
ctrl->redirect($this, $this->requested_backcmd);
1069 $ids = $this->edit_request->getIds();
1072 if (count($ids) == 0) {
1073 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1074 $this->
ctrl->redirect($this,
"cancelDelete");
1078 foreach ($ids as
$id) {
1082 if (is_object($obj)) {
1083 $obj->setLMId($this->lm->getId());
1087 "delete_" . $obj->getType(),
1089 $this->lm->getType()
1101 $this->lm->checkTree();
1104 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
1106 if ($a_parent_subobj_id == 0) {
1107 $this->
ctrl->redirect($this, $this->requested_backcmd);
1117 $this->gui->ctrl()->setParameterByClass(EditSubObjectsGUI::class,
"sub_type",
"st");
1118 $this->gui->ctrl()->redirectByClass(EditSubObjectsGUI::class);
1123 object $a_gui_class,
1128 $lng = $DIC->language();
1129 $ilCtrl = $DIC->ctrl();
1131 $edit_request = $DIC
1148 if ($ot->getContentActivated()) {
1149 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode", $a_mode);
1154 $ml_head = $ml_gui->getMultiLangInfo($requested_transl);
1160 if (!in_array($requested_transl, array(
"",
"-"))) {
1161 $l = $ot->getMasterLanguage();
1163 $lng->
txt(
"cont_edit_language_version") .
": " .
1165 $ilCtrl->getLinkTarget($a_gui_class,
"editMasterLanguage")
1170 foreach ($ot->getLanguages() as $al => $lang) {
1171 if ($requested_transl != $al &&
1172 $al != $ot->getMasterLanguage()) {
1173 $ilCtrl->setParameter($a_gui_class,
"totransl", $al);
1175 $lng->
txt(
"cont_edit_language_version") .
": " .
1177 $ilCtrl->getLinkTarget($a_gui_class,
"switchToLanguage")
1179 $ilCtrl->setParameter($a_gui_class,
"totransl", $requested_totransl);
1187 $ml_head =
'<div class="ilFloatLeft">' . $ml_head .
'</div><div style="margin: 5px 0;" class="small ilRight">' .
$ui_renderer->render($dd) .
"</div>";
1189 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode",
"");
1205 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1206 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1207 $ilToolbar->addButton(
1209 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create")
1211 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1231 $this->lm->getType()
1247 $ilToolbar->addButton(
1248 $this->
lng->txt(
"cont_fix_tree"),
1249 $this->
ctrl->getLinkTarget($this,
"fixTreeConfirm")
1258 $ids = $this->edit_request->getIds();
1259 foreach ($ids as
$id) {
1264 $this->
ctrl->redirect($this,
"pages");
1270 public function pastePage():
void 1273 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_page_in_clipboard"),
true);
1274 $this->
ctrl->redirect($this,
"pages");
1284 == $this->lm->getId()) {
1286 $new_page = $lm_page->copy($this->lm);
1287 $id = $new_page->getId();
1294 $copied_nodes = array();
1295 $new_page = $lm_page->copyToOtherContObject($this->lm, $copied_nodes);
1296 $id = $new_page->getId();
1305 != $this->lm->getId()) {
1310 $lm_page->setLMId($this->lm->getId());
1312 $page = $lm_page->getPageObject();
1314 $page->setParentId($this->lm->getId());
1321 $this->
ctrl->redirect($this,
"pages");
1326 $ids = $this->edit_request->getIds();
1327 if (count($ids) == 0) {
1328 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1329 $this->
ctrl->redirect($this,
"pages");
1335 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_copied"),
true);
1337 $this->
ctrl->redirect($this,
"pages");
1342 int $a_startnode_id = 1
1346 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1349 for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1354 $path .= $tmpPath[$i][
"title"];
1363 foreach ($a_actions as $name =>
$lng) {
1364 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1367 $notoperations = array();
1369 $operations = array();
1372 foreach (
$d as $row) {
1373 if (!in_array($row[
"name"], $notoperations)) {
1374 $operations[] = $row;
1379 if (count($operations) > 0) {
1380 foreach ($operations as $val) {
1381 $this->tpl->setCurrentBlock(
"operation_btn");
1382 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1383 $this->tpl->setVariable(
"BTN_VALUE", $this->
lng->txt($val[
"lng"]));
1384 $this->tpl->parseCurrentBlock();
1387 $this->tpl->setCurrentBlock(
"operation");
1389 $this->tpl->parseCurrentBlock();
1395 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
1397 parent::viewObject();
1409 $ids = $this->edit_request->getIds();
1410 if (count($ids) == 0) {
1411 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1412 if ($a_parent_subobj_id == 0) {
1413 $this->
ctrl->redirect($this,
"chapters");
1417 if (count($ids) > 1) {
1418 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"));
1419 if ($a_parent_subobj_id == 0) {
1420 $this->
ctrl->redirect($this,
"chapters");
1426 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"));
1427 if ($a_parent_subobj_id == 0) {
1428 $this->
ctrl->redirect($this,
"chapters");
1435 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_chap_select_target_now"),
true);
1437 if ($a_parent_subobj_id == 0) {
1438 $this->
ctrl->redirect($this,
"chapters");
1449 $this->insertChapterClip();
1454 $ids = $this->edit_request->getIds();
1455 if (count($ids) == 0) {
1456 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1457 $this->
ctrl->redirect($this,
"pages");
1460 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_cut"),
true);
1465 $this->
ctrl->redirect($this,
"pages");
1470 if ($this->requested_new_type ==
"pg") {
1471 $this->
ctrl->redirect($this,
"pages");
1473 $this->
ctrl->redirect($this,
"chapters");
1481 if ($ot->getContentActivated()) {
1482 $format = explode(
"_", $this->edit_request->getFormat());
1488 $cont_exp->buildExportFile($opt);
1498 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1499 $cgui->setHeaderText($this->
lng->txt(
"cont_fix_tree_confirm"));
1500 $cgui->setCancel($this->
lng->txt(
"cancel"),
"showMaintenance");
1501 $cgui->setConfirm($this->
lng->txt(
"cont_fix_tree"),
"fixTree");
1502 $issues = $this->lm->checkStructure();
1504 if (count($issues) > 0) {
1505 $mess =
"Found Issues: <br>" . implode(
"<br>", $issues);
1507 $this->tpl->setContent($cgui->getHTML() . $mess);
1512 $this->lm->fixTree();
1513 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cont_tree_fixed"),
true);
1514 $this->
ctrl->redirect($this,
"showMaintenance");
1521 if ($ot->getContentActivated()) {
1522 $format = explode(
"_", $this->edit_request->getFormat());
1526 $cont_exp->buildExportFile();
1534 bool $a_omit_obj_id =
false 1539 if (!$a_omit_obj_id) {
1542 $lmtree = $this->lm->getTree();
1546 $path = $lmtree->getPathFull($lmtree->getRootId());
1548 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
1553 foreach (
$path as $key => $row) {
1554 if ($row[
"child"] == 1) {
1555 $this->
ctrl->setParameter($this,
"obj_id", null);
1556 $locator->addItem($this->lm->getTitle(), $this->
ctrl->getLinkTarget($this,
"chapters"));
1558 $title = $row[
"title"];
1559 switch ($row[
"type"]) {
1561 $this->
ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id", $row[
"child"]);
1562 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
1566 $this->
ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id", $row[
"child"]);
1567 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
1572 if (!$a_omit_obj_id) {
1573 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1609 $user_q_ids = $this->edit_request->getUserQuestionIds();
1610 if (count($user_q_ids) > 0) {
1611 foreach ($user_q_ids as $uqid) {
1612 $uqid = explode(
":", $uqid);
1615 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1617 $ilCtrl->redirect($this,
"listBlockedUsers");
1625 $user_q_ids = $this->edit_request->getUserQuestionIds();
1626 if (count($user_q_ids) > 0) {
1627 foreach ($user_q_ids as $uqid) {
1628 $uqid = explode(
":", $uqid);
1631 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1633 $ilCtrl->redirect($this,
"listBlockedUsers");
1640 $user_q_ids = $this->edit_request->getUserQuestionIds();
1641 if (count($user_q_ids) == 0) {
1642 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 1);
1643 $ilCtrl->
redirect($this,
"listBlockedUsers");
1647 foreach ($user_q_ids as $uqid) {
1648 $uqid = explode(
":", $uqid);
1650 if (!in_array($login, $rcps)) {
1660 'rcp_to' => implode(
',', $rcps),
1668 $link = chr(13) . chr(10) . chr(13) . chr(10);
1669 $link .= $this->
lng->txt(
'cont_blocked_users_mail_link');
1670 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1671 $link .= ilLink::_getLink($this->lm->getRefId());
1672 return rawurlencode(base64_encode($link));
1680 protected function setTabs(
string $a_act =
""): void
1682 parent::setTitleAndDescription();
1697 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1701 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1709 $ilCtrl->getLinkTarget($this,
"pages")
1715 $lng->
txt(
"cont_short_titles"),
1716 $ilCtrl->getLinkTargetByClass(
"illmeditshorttitlesgui",
"")
1720 if (
$lm_set->get(
"html_export_ids")) {
1724 $lng->
txt(
"cont_html_export_ids"),
1725 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1733 $lng->
txt(
"cont_online_help_ids"),
1734 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1740 $ilCtrl->getLinkTarget($this,
"showTooltipList")
1747 $lng->
txt(
"cont_internal_links"),
1748 $ilCtrl->getLinkTarget($this,
"listLinks")
1754 $lng->
txt(
"cont_maintenance"),
1755 $ilCtrl->getLinkTarget($this,
"showMaintenance")
1761 $lng->
txt(
"cont_subtitle_files"),
1762 $ilCtrl->getLinkTargetByClass(
"ilmobmultisrtuploadgui",
"")
1769 $ilCtrl->getLinkTargetByClass(
"illmimportgui",
"")
1772 $ilTabs->activateSubTab($a_active);
1773 $ilTabs->activateTab(
"content");
1785 $lng->
txt(
"cont_question_stats"),
1786 $ilCtrl->getLinkTarget($this,
"listQuestions")
1792 $lng->
txt(
"cont_blocked_users"),
1793 $ilCtrl->getLinkTarget($this,
"listBlockedUsers")
1796 $ilTabs->activateSubTab($a_active);
1806 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1810 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1814 if ($this->
object->isInfoEnabled()) {
1818 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary')
1826 $this->
ctrl->getLinkTarget($this,
'properties')
1833 $this->
ctrl->getLinkTarget($this,
"listQuestions")
1839 'learning_progress',
1840 $lng->
txt(
"learning_progress"),
1841 $this->
ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
'')
1847 $mdtab = $mdgui->getTab();
1860 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1864 if ($rbacsystem->
checkAccess(
'edit_permission', $this->lm->getRefId())) {
1868 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
1873 $ilTabs->activateTab($a_act);
1877 $ilTabs->addNonTabbedLink(
1879 $lng->
txt(
"cont_presentation_view"),
1880 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->lm->getRefId()
1891 array(
"settings",
"cont_style",
"cont_lm_menu",
"public_section",
1892 "cont_glossaries",
"cont_multilinguality",
"obj_multilinguality",
1896 $ilTabs->addSubTabTarget(
1898 $this->
ctrl->getLinkTarget($this,
'properties'),
1904 $ilTabs->addSubTabTarget(
1906 $this->
ctrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
""),
1908 "ilObjectContentStyleSettingsGUI" 1912 $ilTabs->addSubTabTarget(
1914 $this->
ctrl->getLinkTarget($this,
'editMenuProperties'),
1920 $ilTabs->addSubTabTarget(
1922 $this->
ctrl->getLinkTarget($this,
'editGlossaries'),
1927 $ilTabs->addSubTabTarget(
1928 "obj_multilinguality",
1929 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
1933 if ($lti_settings->hasSettingsAccess()) {
1934 $ilTabs->addSubTabTarget(
1936 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1940 $ilTabs->setSubTabActive($a_active);
1947 $this->lmme_obj->setObjId($this->lm->getId());
1961 $ilTabs->setTabActive(
"settings");
1964 $ilToolbar->addButton(
1965 $this->
lng->txt(
"lm_menu_select_internal_object"),
1966 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
1969 if (is_null($form)) {
1972 $this->tpl->setContent($form->
getHTML());
1984 $ti->setMaxLength(255);
1986 $ti->setRequired(
true);
1991 $ta->setMaxLength(255);
1993 $ta->setRequired(
true);
1996 if ($a_mode ==
"edit") {
1998 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
1999 $ti->setValue($this->lmme_obj->getTitle());
2000 $ta->setValue($this->lmme_obj->getTarget());
2003 if ($this->requested_link_ref_id > 0) {
2009 $target_link = $obj_type .
"_" . $link_ref_id;
2010 $ti->setValue($title);
2011 $ta->setValue($target_link);
2015 $hi->setValue($link_ref_id);
2021 if ($a_mode ==
"create") {
2041 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2042 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2043 $this->lmme_obj->setLinkRefId((
int) $form->
getInput(
"link_ref_id"));
2045 if ($form->
getInput(
"link_ref_id")) {
2046 $this->lmme_obj->setLinkType(
"intern");
2049 $this->lmme_obj->create();
2051 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_added"),
true);
2052 $this->
ctrl->redirect($this,
"editMenuProperties");
2061 if (empty($this->requested_menu_entry)) {
2062 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2063 $this->
ctrl->redirect($this,
"editMenuProperties");
2067 $this->lmme_obj->delete($this->requested_menu_entry);
2069 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_removed"),
true);
2070 $this->
ctrl->redirect($this,
"editMenuProperties");
2081 $ilTabs->setTabActive(
"settings");
2085 if (empty($this->requested_menu_entry)) {
2086 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2087 $this->
ctrl->redirect($this,
"editMenuProperties");
2090 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2091 $ilToolbar->addButton(
2092 $this->
lng->txt(
"lm_menu_select_internal_object"),
2093 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
2096 if (is_null($form)) {
2099 $this->tpl->setContent($form->
getHTML());
2106 if ($this->edit_request->getMenuEntry() ==
"") {
2107 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2108 $this->
ctrl->redirect($this,
"editMenuProperties");
2112 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2113 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2114 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2115 if ($form->
getInput(
"link_ref_id")) {
2116 $this->lmme_obj->setLinkType(
"intern");
2118 if (is_int(strpos($form->
getInput(
"target"),
"."))) {
2119 $this->lmme_obj->setLinkType(
"extern");
2121 $this->lmme_obj->update();
2122 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_updated"),
true);
2123 $this->
ctrl->redirect($this,
"editMenuProperties");
2137 $ilTabs->setTabActive(
"settings");
2140 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2142 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"lm_menu_select_object_to_add"));
2146 "showEntrySelector",
2152 $exp->setClickableTypes(array(
'mcst',
'mep',
'cat',
'lm',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
"crs",
"grp",
"book",
"tst",
"file"));
2153 if (!$exp->handleCommand()) {
2154 $this->tpl->setContent($exp->getHTML());
2163 $ids = $this->edit_request->getIds();
2164 if (count($ids) == 0) {
2165 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2166 $this->
ctrl->redirect($this,
"pages");
2168 if (count($ids) > 1) {
2169 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2170 $this->
ctrl->redirect($this,
"pages");
2172 if ($ids[0] != $this->lm->getHeaderPage()) {
2173 $this->lm->setHeaderPage($ids[0]);
2175 $this->lm->setHeaderPage(0);
2177 $this->lm->updateProperties();
2178 $this->
ctrl->redirect($this,
"pages");
2186 $ids = $this->edit_request->getIds();
2187 if (count($ids) == 0) {
2188 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2189 $this->
ctrl->redirect($this,
"pages");
2191 if (count($ids) > 1) {
2192 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2193 $this->
ctrl->redirect($this,
"pages");
2195 if ($ids[0] != $this->lm->getFooterPage()) {
2196 $this->lm->setFooterPage($ids[0]);
2198 $this->lm->setFooterPage(0);
2200 $this->lm->updateProperties();
2201 $this->
ctrl->redirect($this,
"pages");
2213 $this->edit_request->getTitles(),
2217 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"lm_save_titles"),
true);
2218 $ilCtrl->redirect($this,
"chapters");
2221 public static function _goto(
string $a_target): void
2224 $main_tpl = $DIC->ui()->mainTemplate();
2226 $ilAccess = $DIC->access();
2228 $lng = $DIC->language();
2229 $ctrl = $DIC->ctrl();
2231 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2238 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2242 $main_tpl->setOnScreenMessage(
'failure', sprintf(
2243 $lng->
txt(
"msg_no_perm_read_item"),
2258 if (count($ids) == 0) {
2259 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2260 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2264 foreach ($ids as $k => $item) {
2269 foreach ($todel as $k) {
2274 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"cont_selected_items_have_been_cut"),
true);
2276 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2287 if (count($ids) == 0) {
2288 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2289 $ilCtrl->redirect($this,
"chapters");
2293 foreach ($ids as $k => $item) {
2298 foreach ($todel as $k) {
2303 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"cont_selected_items_have_been_copied"),
true);
2304 $ilCtrl->redirect($this,
"chapters");
2331 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2332 $lm_tree = $this->lm->getTree();
2334 $options = array(
"" =>
$lng->
txt(
"all"));
2335 foreach ($childs as
$c) {
2336 $options[$c[
"child"]] = $c[
"title"];
2341 $ilToolbar->addInputItem($si,
true);
2342 $ilToolbar->addFormButton(
$lng->
txt(
"help_filter"),
"filterHelpChapters");
2356 $ilCtrl->redirect($this,
"showExportIDsOverview");
2366 foreach ($this->edit_request->getExportIds() as $exp_id) {
2367 if ($exp_id !=
"" && !preg_match(
2368 "/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
2375 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"cont_exp_ids_not_resp_format1") .
": a-z, A-Z, 0-9, '_'. " .
2376 $lng->
txt(
"cont_exp_ids_not_resp_format3") .
" " .
2377 $lng->
txt(
"cont_exp_ids_not_resp_format2"));
2383 foreach ($this->edit_request->getExportIds() as $pg_id => $exp_id) {
2392 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"cont_saved_export_ids"),
true);
2393 $ilCtrl->redirect($this,
"showExportIdsOverview");
2400 $help_map = $this->
help->internal()->domain()->map();
2402 foreach ($this->edit_request->getScreenIds() as $chap => $ids) {
2403 $ids = explode(
"\n", $ids);
2404 $help_map->saveScreenIdsForChapter($chap, $ids);
2406 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2407 $ilCtrl->redirect($this,
"showExportIdsOverview");
2424 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2426 $ti->setMaxLength(200);
2428 $ilToolbar->addInputItem($ti,
true);
2429 $ilToolbar->addFormButton(
$lng->
txt(
"add"),
"addTooltip");
2430 $ilToolbar->addSeparator();
2432 $options = $this->
help->internal()->domain()->tooltips()->getTooltipComponents();
2439 $ilToolbar->addInputItem($si,
true);
2440 $ilToolbar->addFormButton(
$lng->
txt(
"help_filter"),
"filterTooltips");
2452 $tt_id = $this->edit_request->getTooltipId();
2453 if (trim($tt_id) !=
"") {
2454 if (is_int(strpos($tt_id,
"_"))) {
2455 $this->
help->internal()->domain()->tooltips()->addTooltip(trim($tt_id),
"");
2456 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2458 $fu = strpos($tt_id,
"_");
2459 $comp = substr($tt_id, 0, $fu);
2462 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"cont_help_no_valid_tooltip_id"),
true);
2465 $ilCtrl->redirect($this,
"showTooltipList");
2474 $this->edit_request->getTooltipComponent()
2476 $ilCtrl->redirect($this,
"showTooltipList");
2484 $tooltip_ids = $this->edit_request->getTooltipIds();
2485 foreach ($this->edit_request->getTooltipTexts() as
$id =>
$text) {
2486 $this->
help->internal()->domain()->tooltips()->updateTooltip(
2489 $tooltip_ids[(
int) $id]
2492 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2493 $ilCtrl->redirect($this,
"showTooltipList");
2501 $ids = $this->edit_request->getIds();
2502 if (count($ids) > 0) {
2503 foreach ($ids as
$id) {
2504 $this->
help->internal()->domain()->tooltips()->deleteTooltip($id);
2506 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2508 $ilCtrl->redirect($this,
"showTooltipList");
2518 string $a_def_option =
"" 2524 $lng = $DIC->language();
2528 if ($a_def_option !=
"") {
2532 $layout->addOption(
new ilRadioOption(
"<table><tr><td>" . $im_tag .
"</td><td><strong>" .
2533 $lng->
txt(
"cont_lm_default_layout") .
2534 "</strong>: " .
$lng->
txt(
"cont_layout_" . $a_def_option) .
2535 "</td></tr></table>",
""));
2542 $layout->addOption(
new ilRadioOption(
"<table><tr><td style='padding: 0px 5px 5px;'>" .
2543 $im_tag .
"</td><td style='padding:5px;'><strong>" .
$lng->
txt(
"cont_layout_" . $l) .
"</strong>: " .
2544 $lng->
txt(
"cont_layout_" . $l .
"_desc") .
"</td></tr></table>", $l));
2565 bool $a_in_hierarchy =
false 2571 $ids = $this->edit_request->getIds();
2572 if (count($ids) == 0) {
2573 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2575 if ($a_in_hierarchy) {
2576 $ilCtrl->redirect($this,
"chapters");
2578 $ilCtrl->redirect($this,
"pages");
2594 $ids = $this->edit_request->getIds();
2595 foreach ($ids as
$id) {
2598 $this->
form->addItem($hi);
2600 $layout = self::getLayoutOption(
2603 $this->lm->getLayout()
2605 $this->
form->addItem($layout);
2607 $this->
form->addCommandButton(
"savePageLayout",
$lng->
txt(
"save"));
2608 $this->
form->addCommandButton(
"pages",
$lng->
txt(
"cancel"));
2610 $this->
form->setTitle(
$lng->
txt(
"cont_set_layout"));
2611 $this->
form->setFormAction($ilCtrl->getFormAction($this));
2619 $ilCtrl->
setParameter($this,
"hierarchy", $this->requested_hierarchy);
2621 $ids = $this->edit_request->getIds();
2622 foreach ($ids as
$id) {
2625 $this->edit_request->getLayout(),
2629 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2631 if ($this->requested_hierarchy) {
2632 $ilCtrl->redirect($this,
"chapters");
2634 $ilCtrl->redirect($this,
"pages");
2654 $ilTabs->setTabActive(
"settings");
2657 $ilToolbar->addButton(
2659 $ilCtrl->getLinkTarget($this,
"showLMGlossarySelector")
2675 $ilTabs->setTabActive(
"settings");
2680 $exp->setPathOpen($this->
object->getRefId());
2681 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'showLMGlossarySelector'));
2682 $exp->setTargetClass(get_class($this));
2683 $exp->setCmd(
'confirmGlossarySelection');
2684 $exp->setClickableTypes(array(
"glo"));
2685 $exp->addFilter(
"glo");
2699 $ilCtrl->setParameter($this,
"glo_ref_id", $this->requested_root_id);
2700 $cgui->setFormAction($ilCtrl->getFormAction($this));
2701 $cgui->setHeaderText(
$lng->
txt(
"cont_link_glo_in_lm"));
2702 $cgui->setCancel(
$lng->
txt(
"no"),
"selectLMGlossary");
2703 $cgui->setConfirm(
$lng->
txt(
"yes"),
"selectLMGlossaryLink");
2710 $this->lm->autoLinkGlossaryTerms($glo_ref_id);
2719 $glos = $this->lm->getAutoGlossaries();
2722 if (!in_array($glo_id, $glos)) {
2725 $this->lm->setAutoGlossaries($glos);
2726 $this->lm->update();
2728 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2729 $ilCtrl->redirect($this,
"editGlossaries");
2737 $this->lm->removeAutoGlossary($this->requested_glo_id);
2738 $this->lm->update();
2740 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
2741 $ilCtrl->redirect($this,
"editGlossaries");
2749 if ($this->lang_switch_mode ==
"short_titles") {
2750 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2752 $ilCtrl->redirect($this,
"chapters");
2759 $ilCtrl->
setParameter($this,
"transl", $this->requested_totransl);
2760 if ($this->lang_switch_mode ==
"short_titles") {
2761 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2763 $ilCtrl->redirect($this,
"chapters");
2769 parent::redrawHeaderActionObject();
2777 $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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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)
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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
listLinks()
List all broken links.
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)
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
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.
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)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
selectFooter()
select page as footer
saveProperties()
save properties
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)
setContent(string $a_html)
Sets content for standard template.
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
selectHeader()
select page as header
setScreenIdComponent(string $a_comp)
Class ilObjectGUI Basic methods of all Output classes.
static getInstance(int $obj_id)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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")
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
GUI class for object translation handling.
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()