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();
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");
214 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->
rbac()->review()->getLocalRoles($this->lm->getRefId()));
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");
309 case 'ilpermissiongui':
310 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
318 $this->
ctrl->forwardCommand($perm_gui);
322 case 'ilinfoscreengui':
323 if (!$this->
object->isInfoEnabled()) {
330 $info->enablePrivateNotes();
331 $info->enableLearningProgress();
333 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
334 $info->enableNewsEditing();
335 $info->setBlockProperty(
"news",
"settings",
true);
339 $info->addMetaDataSections(
352 case "showExportOptionsXML":
353 case "showExportOptionsHTML":
359 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"transl",
"");
360 $this->
ctrl->setParameterByClass(ilLMEditorGUI::class,
"transl",
"");
362 $this->
ctrl->forwardCommand($exp_gui);
369 case strtolower(TranslationGUI::class):
387 $transgui->forceContentTranslation();
388 $this->
ctrl->forwardCommand($transgui);
392 case "ilcommonactiondispatchergui":
395 $this->
ctrl->forwardCommand($gui);
398 case 'ilobjectcopygui':
402 $this->
ctrl->forwardCommand($cp);
405 case "ilmobmultisrtuploadgui":
411 $this->
ctrl->forwardCommand($gui);
414 case "illmimportgui":
420 $this->
ctrl->forwardCommand($gui);
423 case "illmeditshorttitlesgui":
432 $this->edit_request->getTranslation()
434 $this->
ctrl->forwardCommand($gui);
437 case strtolower(EditSubObjectsGUI::class):
441 if ($this->edit_request->getSubType() ===
"pg") {
447 $gui = $this->gui->editing()->editSubObjectsGUI(
448 $this->edit_request->getSubType(),
450 $this->lng->txt(
"cont_chapters")
452 $this->
ctrl->forwardCommand($gui);
458 if ($cmd ==
"create" &&
459 !in_array($new_type, array(
"lm"))) {
462 $this->
ctrl->redirectByClass(ilLMPageObjectGUI::class, $this->
ctrl->getCmd());
466 $this->
ctrl->redirectByClass(ilStructureObjectGUI::class, $this->
ctrl->getCmd());
472 $new_type ===
"lm") {
490 $this->
lng->loadLanguageModule(
'exp');
491 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
493 if ($ot->getContentTranslationActivated()) {
494 $this->
lng->loadLanguageModule(
"meta");
495 $langs = $ot->getLanguages();
496 foreach ($langs as $l => $ldata) {
497 $items[
"html_" . $l] = $this->
lng->txt(
"meta_l_" . $l);
499 $items[
"html_all"] = $this->
lng->txt(
"cont_all_languages");
501 if (!$ot->getContentTranslationActivated()) {
502 $items[
"exportHTML"] =
"HTML";
504 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"language"), $items)
505 ->withRequired(
true);
506 $section = $this->
ui->factory()->input()->field()->section(
508 $this->
lng->txt(
"export_options")
510 return $this->
ui->factory()->input()->container()->form()->standard(
511 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportHTML"),
513 )->withSubmitLabel($this->
lng->txt(
"export"));
518 $this->
lng->loadLanguageModule(
'exp');
519 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
521 if ($ot->getContentTranslationActivated()) {
522 $items[
"xml_master"] = $this->
lng->txt(
"cont_master_language_only");
523 $items[
"xml_masternomedia"] = $this->
lng->txt(
"cont_master_language_only_no_media");
524 $this->
lng->loadLanguageModule(
"meta");
525 $langs = $ot->getLanguages();
527 $select = $this->
ui->factory()->input()->field()->select($this->
lng->txt(
"export_type"), $items)
528 ->withRequired(
true);
529 $section = $this->
ui->factory()->input()->field()->section(
531 $this->
lng->txt(
"export_options")
533 return $this->
ui->factory()->input()->container()->form()->standard(
534 $this->
ctrl->getLinkTargetByClass(ilObjContentObjectGUI::class,
"doExportXML"),
536 )->withSubmitLabel($this->
lng->txt(
"export"));
544 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($this->buildExportOptionsFormXML()));
549 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
550 if ($ot->getContentTranslationActivated()) {
554 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($this->buildExportOptionsFormHTML()));
556 if (!$ot->getContentTranslationActivated()) {
565 if (!is_null(
$form->getData())) {
566 $format = explode(
"_",
$form->getData()[0][0]);
568 if (is_null(
$form->getData())) {
572 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
577 $cont_exp->buildExportFile($opt);
583 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
586 if ($ot->getContentTranslationActivated() and !is_null(
$form->getData())) {
587 $format = explode(
"_",
$form->getData()[0][0]);
590 if ($ot->getContentTranslationActivated() and is_null(
$form->getData())) {
594 $this->
ui->mainTemplate()->setContent($this->
ui->renderer()->render($form));
598 $cont_exp->buildExportFile();
619 $ecs->addSettingsToForm($this->
form,
'lm');
621 $this->tpl->setContent($this->
form->getHTML());
639 $ti->setRequired(
true);
640 $this->
form->addItem($ti);
644 $this->
form->addItem($ta);
648 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
649 $this->
form->addItem($section);
653 $this->
form->addItem($online);
657 $section->setTitle($this->
lng->txt(
'cont_presentation'));
658 $this->
form->addItem($section);
661 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->addTileImage();
665 $option = array(
"st_title" => $this->
lng->txt(
"cont_st_title"),
666 "pg_title" => $this->lng->txt(
"cont_pg_title"),
667 "none" => $this->lng->txt(
"cont_none"));
668 $page_header->setOptions($option);
669 $this->
form->addItem($page_header);
673 $this->
form->addItem($chap_num);
677 $option = array(
"chapters" => $this->
lng->txt(
"cont_chapters_only"),
678 "pages" => $this->lng->txt(
"cont_chapters_and_pages"));
679 $toc_mode->setOptions($option);
680 $this->
form->addItem($toc_mode);
684 $progr_icons->setInfo($this->
lng->txt(
"cont_progress_icons_info"));
685 $this->
form->addItem($progr_icons);
687 $this->reading_time_gui->addSettingToForm($this->
form);
691 $section->setTitle($this->
lng->txt(
'cont_self_assessment'));
692 $this->
form->addItem($section);
696 $radg->setValue(
"0");
698 $radg->addOption($op1);
700 $radg->addOption($op2);
701 $this->
form->addItem($radg);
705 $qfeed->setInfo($this->
lng->txt(
"cont_restrict_forw_nav_info"));
706 $this->
form->addItem($qfeed);
710 $not->setInfo($this->
lng->txt(
"cont_notify_on_blocked_users_info"));
711 $qfeed->addSubItem($not);
715 $qfeed->setInfo($this->
lng->txt(
"cont_disable_def_feedback_info"));
716 $this->
form->addItem($qfeed);
720 $section->setTitle($this->
lng->txt(
'obj_features'));
721 $this->
form->addItem($section);
725 $this->
lng->loadLanguageModule(
"notes");
727 $pub_nodes->setInfo($this->
lng->txt(
"cont_lm_comments_desc"));
728 $this->
form->addItem($pub_nodes);
732 $this->
lng->loadLanguageModule(
'rating');
734 $rate->setInfo($this->
lng->txt(
'rating_activate_rating_info'));
735 $this->
form->addItem($rate);
737 $this->
form->addItem($ratep);
739 $this->
form->setTitle(
$lng->
txt(
"cont_lm_properties"));
740 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
741 $this->
form->setFormAction($ilCtrl->getFormAction($this));
761 $title = $this->lm->getTitle();
762 $description = $this->lm->getLongDescription();
763 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
764 if ($ot->getContentTranslationActivated()) {
765 $title = $ot->getDefaultTitle();
766 $description = $ot->getDefaultDescription();
769 $values[
"title"] = $title;
770 $values[
"description"] = $description;
771 if (!$this->lm->getOfflineStatus()) {
772 $values[
"cobj_online"] =
true;
775 $values[
"lm_pg_header"] = $this->lm->getPageHeader();
776 if ($this->lm->isActiveNumbering()) {
777 $values[
"cobj_act_number"] =
true;
779 $values[
"toc_mode"] = $this->lm->getTOCMode();
780 if ($this->lm->publicNotes()) {
781 $values[
"cobj_pub_notes"] =
true;
783 if ($this->lm->cleanFrames()) {
784 $values[
"cobj_clean_frames"] =
true;
787 $values[
"rating"] = $this->lm->hasRating();
788 $values[
"rating_pages"] = $this->lm->hasRatingPages();
789 $values[
"disable_def_feedback"] = $this->lm->getDisableDefaultFeedback();
790 $values[
"progr_icons"] = $this->lm->getProgressIcons();
791 $values[
"store_tries"] = (string) (
int) $this->lm->getStoreTries();
792 $values[
"restrict_forw_nav"] = $this->lm->getRestrictForwardNavigation();
800 $values[
"cont_show_info_tab"] = $this->
object->isInfoEnabled();
801 $this->
form->setValuesByArray($values,
true);
820 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
821 if ($ot->getContentTranslationActivated()) {
822 $this->lm->getObjectProperties()->storePropertyTranslations(
832 $this->lm->setOfflineStatus(!(
$form->
getInput(
'cobj_online')));
833 $this->lm->setActiveNumbering((
bool)
$form->
getInput(
"cobj_act_number"));
834 $this->lm->setCleanFrames((
bool)
$form->
getInput(
"cobj_clean_frames"));
836 $this->lm->setPublicNotes(
$form->
getInput(
"cobj_pub_notes"));
839 $this->lm->setRatingPages((
bool)
$form->
getInput(
"rating_pages"));
840 $this->lm->setDisableDefaultFeedback((
int)
$form->
getInput(
"disable_def_feedback"));
841 $this->lm->setProgressIcons((
int)
$form->
getInput(
"progr_icons"));
842 $this->reading_time_gui->saveSettingFromForm($this->
form);
848 $add_info =
"</br>" .
$lng->
txt(
"cont_automatically_set_store_tries");
849 $add_info = str_replace(
"$1",
$lng->
txt(
"cont_tries_store"), $add_info);
850 $add_info = str_replace(
"$2",
$lng->
txt(
"cont_restrict_forw_nav"), $add_info);
853 $this->lm->setStoreTries((
int) $store_tries);
854 $this->lm->setRestrictForwardNavigation((
int)
$form->
getInput(
"restrict_forw_nav"));
855 $this->lm->updateProperties();
859 $obj_service->commonSettings()->legacyForm($this->
form, $this->lm)->saveTileImage();
865 (
bool) $this->form->getInput(
"notification_blocked_users")
880 if ($ecs->handleSettingsUpdate(
$form)) {
886 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified") . $add_info,
true);
887 $this->
ctrl->redirect($this,
"properties");
893 $this->
form->setValuesByPost();
894 $this->tpl->setContent($this->
form->getHTML());
907 $menu->setChecked($this->lm->isActiveLMMenu());
919 $print->setChecked($this->lm->isActivePrintView());
923 $glo =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_print_view_pre_glo"),
"cobj_act_print_prev_glo");
924 $glo->setChecked($this->lm->isActivePreventGlossaryAppendix());
925 $print->addSubItem($glo);
928 $hhfp =
new ilCheckboxInputGUI($this->
lng->txt(
"cont_hide_head_foot_print"),
"hide_head_foot_print");
929 $hhfp->setChecked($this->lm->getHideHeaderFooterPrint());
930 $print->addSubItem($hhfp);
950 $ilTabs->setTabActive(
"settings");
953 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
954 $ilToolbar->addFormButton($this->
lng->txt(
"add_menu_entry"),
"addMenuEntry");
955 $ilToolbar->setCloseFormTag(
false);
962 $entries = $this->lmme_obj->getMenuEntries();
964 $table->setOpenFormTag(
false);
973 $this->lm->setActiveLMMenu((
int)
$form->
getInput(
"cobj_act_lm_menu"));
975 $this->lm->setActivePrintView((
int)
$form->
getInput(
"cobj_act_print"));
976 $this->lm->setActivePreventGlossaryAppendix((
int)
$form->
getInput(
"cobj_act_print_prev_glo"));
977 $this->lm->setHideHeaderFooterPrint((
int)
$form->
getInput(
"hide_head_foot_print"));
978 $this->lm->updateProperties();
982 $this->lmme_obj->updateActiveStatus($this->edit_request->getMenuEntries());
984 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
985 $this->
ctrl->redirect($this,
"editMenuProperties");
993 $this->lm->executeDragDrop(
994 $req->getHFormPar(
"source_id"),
995 $req->getHFormPar(
"target_id"),
996 $req->getHFormPar(
"fc"),
997 $req->getHFormPar(
"as_subitem")
999 $ilCtrl->redirect($this,
"chapters");
1004 $new_object->setCleanFrames(
true);
1008 $new_object->createLMTree();
1011 $new_object->addFirstChapterAndPage();
1014 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt($this->type .
"_added"),
true);
1015 $this->
ctrl->setParameterByClass(ilObjLearningModuleGUI::class,
"ref_id", $new_object->
getRefId());
1016 $this->
ctrl->redirectByClass([ilLMEditorGUI::class, ilObjLearningModuleGUI::class],
"");
1022 public function delete(
int $a_parent_subobj_id = 0):
void
1024 $ids = $this->edit_request->getIds();
1026 if (count($ids) == 0) {
1027 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1032 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"),
true);
1036 if ($a_parent_subobj_id == 0) {
1040 if ($a_parent_subobj_id != 0) {
1041 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"backcmd", $this->requested_backcmd);
1042 $this->
ctrl->setParameterByClass(
"ilStructureObjectGUI",
"obj_id", $a_parent_subobj_id);
1045 $this->
ctrl->setParameter($this,
"backcmd", $this->requested_backcmd);
1052 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
1053 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelDelete");
1054 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"confirmedDelete");
1056 foreach ($ids as
$id) {
1059 $caption = $obj->getTitle();
1061 $cgui->addItem(
"id[]",
$id, $caption);
1065 $this->tpl->setContent($cgui->getHTML());
1070 $this->
ctrl->redirect($this, $this->requested_backcmd);
1084 $ids = $this->edit_request->getIds();
1087 if (count($ids) == 0) {
1088 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1089 $this->
ctrl->redirect($this,
"cancelDelete");
1093 foreach ($ids as
$id) {
1097 if (is_object($obj)) {
1098 $obj->setLMId($this->lm->getId());
1102 "delete_" . $obj->getType(),
1104 $this->lm->getType()
1116 $this->lm->checkTree();
1119 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
1121 if ($a_parent_subobj_id == 0) {
1122 $this->
ctrl->redirect($this, $this->requested_backcmd);
1132 $this->gui->ctrl()->setParameterByClass(EditSubObjectsGUI::class,
"sub_type",
"st");
1133 $this->gui->ctrl()->redirectByClass(EditSubObjectsGUI::class);
1138 object $a_gui_class,
1144 $ilCtrl =
$DIC->ctrl();
1163 $ot = (
new TranslationsRepository(
$ilDB))->getFor($a_lm_id);
1164 if ($ot->getContentTranslationActivated()) {
1165 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode", $a_mode);
1177 $l = $ot->getBaseLanguage();
1179 $lng->
txt(
"cont_edit_language_version") .
": " .
1181 $ilCtrl->getLinkTarget($a_gui_class,
"editMasterLanguage")
1186 foreach ($ot->getLanguages() as $al =>
$lang) {
1188 $al != $ot->getBaseLanguage()) {
1189 $ilCtrl->setParameter($a_gui_class,
"totransl", $al);
1191 $lng->
txt(
"cont_edit_language_version") .
": " .
1193 $ilCtrl->getLinkTarget($a_gui_class,
"switchToLanguage")
1203 $ml_head =
'<div class="ilFloatLeft">' . $ml_head .
'</div><div style="margin: 5px 0;" class="small ilRight">' .
$ui_renderer->render($dd) .
"</div>";
1205 $ilCtrl->setParameter($a_gui_class,
"lang_switch_mode",
"");
1214 $ilToolbar = $this->toolbar;
1215 $ilCtrl = $this->ctrl;
1219 $this->setContentSubTabs(
"pages");
1221 $ilCtrl->setParameter($this,
"backcmd",
"pages");
1222 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"pg");
1223 $ilToolbar->addButton(
1224 $lng->txt(
"pg_add"),
1225 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"create")
1227 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"new_type",
"");
1230 $tpl->setContent($t->getHTML());
1241 $this->setContentSubTabs(
"internal_links");
1247 $this->lm->getType()
1250 $tpl->setContent($table_gui->getHTML());
1258 $ilToolbar = $this->toolbar;
1261 $this->setContentSubTabs(
"maintenance");
1263 $ilToolbar->addButton(
1264 $this->
lng->txt(
"cont_fix_tree"),
1265 $this->ctrl->getLinkTarget($this,
"fixTreeConfirm")
1274 $ids = $this->edit_request->getIds();
1275 foreach ($ids as
$id) {
1280 $this->
ctrl->redirect($this,
"pages");
1286 public function pastePage(): void
1289 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_page_in_clipboard"),
true);
1290 $this->
ctrl->redirect($this,
"pages");
1300 == $this->lm->getId()) {
1302 $new_page = $lm_page->copy($this->lm);
1303 $id = $new_page->getId();
1310 $copied_nodes = array();
1311 $new_page = $lm_page->copyToOtherContObject($this->lm, $copied_nodes);
1312 $id = $new_page->getId();
1321 != $this->lm->getId()) {
1326 $lm_page->setLMId($this->lm->getId());
1328 $page = $lm_page->getPageObject();
1330 $page->setParentId($this->lm->getId());
1337 $this->
ctrl->redirect($this,
"pages");
1342 $ids = $this->edit_request->getIds();
1343 if (count($ids) == 0) {
1344 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1345 $this->
ctrl->redirect($this,
"pages");
1351 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_copied"),
true);
1353 $this->
ctrl->redirect($this,
"pages");
1358 int $a_startnode_id = 1
1362 $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1365 for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1370 $path .= $tmpPath[$i][
"title"];
1379 foreach ($a_actions as $name =>
$lng) {
1380 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
1383 $notoperations = array();
1385 $operations = array();
1388 foreach (
$d as $row) {
1389 if (!in_array($row[
"name"], $notoperations)) {
1390 $operations[] = $row;
1395 if (count($operations) > 0) {
1396 foreach ($operations as $val) {
1397 $this->tpl->setCurrentBlock(
"operation_btn");
1398 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
1399 $this->tpl->setVariable(
"BTN_VALUE", $this->
lng->txt($val[
"lng"]));
1400 $this->tpl->parseCurrentBlock();
1403 $this->tpl->setCurrentBlock(
"operation");
1405 $this->tpl->parseCurrentBlock();
1411 if (strtolower($this->requested_baseClass) ==
"iladministrationgui") {
1412 $this->prepareOutput();
1413 parent::viewObject();
1415 $this->viewObject();
1425 $ids = $this->edit_request->getIds();
1426 if (count($ids) == 0) {
1427 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
1428 if ($a_parent_subobj_id == 0) {
1429 $this->
ctrl->redirect($this,
"chapters");
1433 if (count($ids) > 1) {
1434 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"));
1435 if ($a_parent_subobj_id == 0) {
1436 $this->
ctrl->redirect($this,
"chapters");
1442 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_item"));
1443 if ($a_parent_subobj_id == 0) {
1444 $this->
ctrl->redirect($this,
"chapters");
1451 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_chap_select_target_now"),
true);
1453 if ($a_parent_subobj_id == 0) {
1454 $this->
ctrl->redirect($this,
"chapters");
1465 $this->insertChapterClip();
1470 $ids = $this->edit_request->getIds();
1471 if (count($ids) == 0) {
1472 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1473 $this->
ctrl->redirect($this,
"pages");
1476 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_selected_items_have_been_cut"),
true);
1481 $this->
ctrl->redirect($this,
"pages");
1486 if ($this->requested_new_type ==
"pg") {
1487 $this->
ctrl->redirect($this,
"pages");
1489 $this->
ctrl->redirect($this,
"chapters");
1495 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
1497 if ($ot->getContentTranslationActivated()) {
1498 $format = explode(
"_", $this->edit_request->getFormat());
1504 $cont_exp->buildExportFile($opt);
1510 $this->setContentSubTabs(
"maintenance");
1514 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1515 $cgui->setHeaderText($this->
lng->txt(
"cont_fix_tree_confirm"));
1516 $cgui->setCancel($this->
lng->txt(
"cancel"),
"showMaintenance");
1517 $cgui->setConfirm($this->
lng->txt(
"cont_fix_tree"),
"fixTree");
1518 $issues = $this->lm->checkStructure();
1520 if (count($issues) > 0) {
1521 $mess =
"Found Issues: <br>" . implode(
"<br>", $issues);
1523 $this->tpl->setContent($cgui->getHTML() . $mess);
1528 $this->lm->fixTree();
1529 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cont_tree_fixed"),
true);
1530 $this->
ctrl->redirect($this,
"showMaintenance");
1535 $ot = $this->lm->getObjectProperties()->getPropertyTranslations();
1537 if ($ot->getContentTranslationActivated()) {
1538 $format = explode(
"_", $this->edit_request->getFormat());
1542 $cont_exp->buildExportFile();
1550 bool $a_omit_obj_id =
false
1555 if (!$a_omit_obj_id) {
1556 $obj_id = $this->requested_obj_id;
1558 $lmtree = $this->lm->getTree();
1559 if (($obj_id != 0) && $lmtree->isInTree($obj_id)) {
1560 $path = $lmtree->getPathFull($obj_id);
1562 $path = $lmtree->getPathFull($lmtree->getRootId());
1564 $path[] = array(
"type" =>
"pg",
"child" => $this->obj_id,
1569 foreach (
$path as $key => $row) {
1570 if ($row[
"child"] == 1) {
1571 $this->
ctrl->setParameter($this,
"obj_id",
null);
1572 $locator->addItem($this->lm->getTitle(), $this->ctrl->getLinkTarget($this,
"chapters"));
1574 $title = $row[
"title"];
1575 switch ($row[
"type"]) {
1577 $this->
ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id", $row[
"child"]);
1578 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view"));
1582 $this->
ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id", $row[
"child"]);
1583 $locator->addItem($title, $this->
ctrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
1588 if (!$a_omit_obj_id) {
1589 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1602 $this->setTabs(
"questions");
1603 $this->setQuestionsSubTabs(
"question_stats");
1606 $tpl->setContent($table->getHTML());
1613 $this->setTabs(
"questions");
1614 $this->setQuestionsSubTabs(
"blocked_users");
1617 $tpl->setContent($table->getHTML());
1623 $ilCtrl = $this->ctrl;
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");
1639 $ilCtrl = $this->ctrl;
1641 $user_q_ids = $this->edit_request->getUserQuestionIds();
1642 if (count($user_q_ids) > 0) {
1643 foreach ($user_q_ids as $uqid) {
1644 $uqid = explode(
":", $uqid);
1647 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
1649 $ilCtrl->redirect($this,
"listBlockedUsers");
1654 $ilCtrl = $this->ctrl;
1656 $user_q_ids = $this->edit_request->getUserQuestionIds();
1657 if (count($user_q_ids) == 0) {
1658 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 1);
1659 $ilCtrl->redirect($this,
"listBlockedUsers");
1663 foreach ($user_q_ids as $uqid) {
1664 $uqid = explode(
":", $uqid);
1666 if (!in_array($login, $rcps)) {
1676 'rcp_to' => implode(
',', $rcps),
1677 'sig' => $this->getBlockedUsersMailSignature()
1684 $link = chr(13) . chr(10) . chr(13) . chr(10);
1685 $link .= $this->
lng->txt(
'cont_blocked_users_mail_link');
1686 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1687 $link .= ilLink::_getLink($this->lm->getRefId());
1688 return rawurlencode(base64_encode($link));
1696 protected function setTabs(
string $a_act =
""): void
1698 parent::setTitleAndDescription();
1699 $ilHelp = $this->help;
1700 $ilHelp->setScreenIdComponent(
"lm");
1701 $this->addTabs($a_act);
1706 $ilTabs = $this->tabs;
1708 $ilCtrl = $this->ctrl;
1713 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1716 $lng->txt(
"objs_st"),
1717 $this->ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1724 $lng->txt(
"cont_all_pages"),
1725 $ilCtrl->getLinkTarget($this,
"pages")
1731 $lng->txt(
"cont_short_titles"),
1732 $ilCtrl->getLinkTargetByClass(
"illmeditshorttitlesgui",
"")
1736 if (
$lm_set->get(
"html_export_ids")) {
1740 $lng->txt(
"cont_html_export_ids"),
1741 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1746 $lng->loadLanguageModule(
"help");
1749 $lng->txt(
"cont_online_help_ids"),
1750 $ilCtrl->getLinkTarget($this,
"showExportIDsOverview")
1755 $lng->txt(
"help_tooltips"),
1756 $ilCtrl->getLinkTarget($this,
"showTooltipList")
1763 $lng->txt(
"cont_internal_links"),
1764 $ilCtrl->getLinkTarget($this,
"listLinks")
1770 $lng->txt(
"cont_maintenance"),
1771 $ilCtrl->getLinkTarget($this,
"showMaintenance")
1777 $lng->txt(
"cont_subtitle_files"),
1778 $ilCtrl->getLinkTargetByClass(
"ilmobmultisrtuploadgui",
"")
1784 $lng->txt(
"cont_import"),
1785 $ilCtrl->getLinkTargetByClass(
"illmimportgui",
"")
1788 $ilTabs->activateSubTab($a_active);
1789 $ilTabs->activateTab(
"content");
1794 $ilTabs = $this->tabs;
1796 $ilCtrl = $this->ctrl;
1801 $lng->txt(
"cont_question_stats"),
1802 $ilCtrl->getLinkTarget($this,
"listQuestions")
1808 $lng->txt(
"cont_blocked_users"),
1809 $ilCtrl->getLinkTarget($this,
"listBlockedUsers")
1812 $ilTabs->activateSubTab($a_active);
1817 $rbacsystem = $this->rbacsystem;
1818 $ilTabs = $this->tabs;
1822 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
1825 $lng->txt(
"content"),
1826 $this->ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
1830 if ($this->
object->isInfoEnabled()) {
1833 $lng->txt(
"info_short"),
1834 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
'showSummary')
1841 $lng->txt(
"settings"),
1842 $this->ctrl->getLinkTarget($this,
'properties')
1848 $lng->txt(
"objs_qst"),
1849 $this->ctrl->getLinkTarget($this,
"listQuestions")
1855 'learning_progress',
1856 $lng->txt(
"learning_progress"),
1857 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
'')
1863 $mdtab = $mdgui->getTab();
1867 $lng->txt(
"meta_data"),
1875 $lng->txt(
"export"),
1876 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1880 if ($rbacsystem->
checkAccess(
'edit_permission', $this->lm->getRefId())) {
1883 $lng->txt(
"perm_settings"),
1884 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
1889 $ilTabs->activateTab($a_act);
1893 $ilTabs->addNonTabbedLink(
1895 $lng->txt(
"cont_presentation_view"),
1896 "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->lm->getRefId()
1902 $ilTabs = $this->tabs;
1907 array(
"settings",
"cont_style",
"cont_lm_menu",
"public_section",
1908 "cont_glossaries",
"cont_multilinguality",
"obj_multilinguality",
1912 $ilTabs->addSubTabTarget(
1914 $this->
ctrl->getLinkTarget($this,
'properties'),
1920 $ilTabs->addSubTabTarget(
1922 $this->
ctrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
""),
1924 "ilObjectContentStyleSettingsGUI"
1928 $ilTabs->addSubTabTarget(
1930 $this->
ctrl->getLinkTarget($this,
'editMenuProperties'),
1936 $ilTabs->addSubTabTarget(
1938 $this->
ctrl->getLinkTarget($this,
'editGlossaries'),
1943 $ilTabs->addSubTabTarget(
1944 "obj_multilinguality",
1945 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"")
1949 if ($lti_settings->hasSettingsAccess()) {
1950 $ilTabs->addSubTabTarget(
1952 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1956 $ilTabs->setSubTabActive($a_active);
1963 $this->lmme_obj->setObjId($this->lm->getId());
1971 $ilTabs = $this->tabs;
1972 $ilToolbar = $this->toolbar;
1973 $ilCtrl = $this->ctrl;
1977 $ilTabs->setTabActive(
"settings");
1978 $this->setSubTabs(
"cont_lm_menu");
1980 $ilToolbar->addButton(
1981 $this->
lng->txt(
"lm_menu_select_internal_object"),
1982 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
1985 if (is_null($form)) {
1986 $form = $this->initMenuEntryForm(
"create");
1988 $this->tpl->setContent($form->
getHTML());
1994 $ilCtrl = $this->ctrl;
2000 $ti->setMaxLength(255);
2002 $ti->setRequired(
true);
2007 $ta->setMaxLength(255);
2009 $ta->setRequired(
true);
2012 if ($a_mode ==
"edit") {
2013 $this->__initLMMenuEditor();
2014 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2015 $ti->setValue($this->lmme_obj->getTitle());
2016 $ta->setValue($this->lmme_obj->getTarget());
2019 if ($this->requested_link_ref_id > 0) {
2020 $link_ref_id = $this->requested_link_ref_id;
2025 $target_link = $obj_type .
"_" . $link_ref_id;
2026 $ti->setValue($title);
2027 $ta->setValue($target_link);
2031 $hi->setValue($link_ref_id);
2037 if ($a_mode ==
"create") {
2054 $form = $this->initMenuEntryForm(
"create");
2056 $this->__initLMMenuEditor();
2057 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2058 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2059 $this->lmme_obj->setLinkRefId((
int) $form->
getInput(
"link_ref_id"));
2061 if ($form->
getInput(
"link_ref_id")) {
2062 $this->lmme_obj->setLinkType(
"intern");
2065 $this->lmme_obj->create();
2067 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_added"),
true);
2068 $this->
ctrl->redirect($this,
"editMenuProperties");
2071 $this->addMenuEntry($form);
2077 if (empty($this->requested_menu_entry)) {
2078 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2079 $this->
ctrl->redirect($this,
"editMenuProperties");
2082 $this->__initLMMenuEditor();
2083 $this->lmme_obj->delete($this->requested_menu_entry);
2085 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_removed"),
true);
2086 $this->
ctrl->redirect($this,
"editMenuProperties");
2091 $ilToolbar = $this->toolbar;
2092 $ilCtrl = $this->ctrl;
2093 $ilTabs = $this->tabs;
2097 $ilTabs->setTabActive(
"settings");
2098 $this->setSubTabs(
"cont_lm_menu");
2101 if (empty($this->requested_menu_entry)) {
2102 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2103 $this->
ctrl->redirect($this,
"editMenuProperties");
2106 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2107 $ilToolbar->addButton(
2108 $this->
lng->txt(
"lm_menu_select_internal_object"),
2109 $ilCtrl->getLinkTarget($this,
"showEntrySelector")
2112 if (is_null($form)) {
2113 $form = $this->initMenuEntryForm(
"edit");
2115 $this->tpl->setContent($form->
getHTML());
2120 $form = $this->initMenuEntryForm(
"edit");
2122 if ($this->edit_request->getMenuEntry() ==
"") {
2123 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_menu_entry_id"),
true);
2124 $this->
ctrl->redirect($this,
"editMenuProperties");
2127 $this->__initLMMenuEditor();
2128 $this->lmme_obj->readEntry($this->edit_request->getMenuEntry());
2129 $this->lmme_obj->setTitle($form->
getInput(
"title"));
2130 $this->lmme_obj->setTarget($form->
getInput(
"target"));
2131 if ($form->
getInput(
"link_ref_id")) {
2132 $this->lmme_obj->setLinkType(
"intern");
2134 if (is_int(strpos($form->
getInput(
"target"),
"."))) {
2135 $this->lmme_obj->setLinkType(
"extern");
2137 $this->lmme_obj->update();
2138 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_entry_updated"),
true);
2139 $this->
ctrl->redirect($this,
"editMenuProperties");
2142 $this->editMenuEntry($form);
2148 $ilTabs = $this->tabs;
2149 $ilCtrl = $this->ctrl;
2153 $ilTabs->setTabActive(
"settings");
2154 $this->setSubTabs(
"cont_lm_menu");
2156 $ilCtrl->saveParameter($this, array(
"menu_entry"));
2158 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"lm_menu_select_object_to_add"));
2162 "showEntrySelector",
2168 $exp->setClickableTypes(array(
'mcst',
'mep',
'cat',
'lm',
'glo',
'frm',
'exc',
'tst',
'svy',
'chat',
'wiki',
'sahs',
"crs",
"grp",
"book",
"tst",
"file"));
2169 if (!$exp->handleCommand()) {
2170 $this->tpl->setContent($exp->getHTML());
2179 $ids = $this->edit_request->getIds();
2180 if (count($ids) == 0) {
2181 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2182 $this->
ctrl->redirect($this,
"pages");
2184 if (count($ids) > 1) {
2185 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2186 $this->
ctrl->redirect($this,
"pages");
2188 if ($ids[0] != $this->lm->getHeaderPage()) {
2189 $this->lm->setHeaderPage($ids[0]);
2191 $this->lm->setHeaderPage(0);
2193 $this->lm->updateProperties();
2194 $this->
ctrl->redirect($this,
"pages");
2202 $ids = $this->edit_request->getIds();
2203 if (count($ids) == 0) {
2204 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
2205 $this->
ctrl->redirect($this,
"pages");
2207 if (count($ids) > 1) {
2208 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
2209 $this->
ctrl->redirect($this,
"pages");
2211 if ($ids[0] != $this->lm->getFooterPage()) {
2212 $this->lm->setFooterPage($ids[0]);
2214 $this->lm->setFooterPage(0);
2216 $this->lm->updateProperties();
2217 $this->
ctrl->redirect($this,
"pages");
2225 $ilCtrl = $this->ctrl;
2229 $this->edit_request->getTitles(),
2230 $this->requested_transl
2233 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"lm_save_titles"),
true);
2234 $ilCtrl->redirect($this,
"chapters");
2237 public static function _goto(
string $a_target): void
2240 $main_tpl =
$DIC->ui()->mainTemplate();
2242 $ilAccess =
$DIC->access();
2245 $ctrl =
$DIC->ctrl();
2247 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2248 $ctrl->setParameterByClass(
"ilLMPresentationGUI",
"ref_id", $a_target);
2250 $ctrl->redirectByClass(
"ilLMPresentationGUI",
"");
2252 $ctrl->redirectByClass(
"ilLMPresentationGUI",
"resume");
2254 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2255 $ctrl->setParameterByClass(
"ilLMPresentationGUI",
"ref_id", $a_target);
2256 $ctrl->redirectByClass(
"ilLMPresentationGUI",
"infoScreen");
2258 $main_tpl->setOnScreenMessage(
'failure', sprintf(
2259 $lng->txt(
"msg_no_perm_read_item"),
2271 $ilCtrl = $this->ctrl;
2274 if (count($ids) == 0) {
2275 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2276 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2280 foreach ($ids as $k => $item) {
2285 foreach ($todel as $k) {
2290 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"cont_selected_items_have_been_cut"),
true);
2292 $ilCtrl->redirect($this, $this->edit_request->getBackCmd());
2300 $ilCtrl = $this->ctrl;
2303 if (count($ids) == 0) {
2304 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2305 $ilCtrl->redirect($this,
"chapters");
2309 foreach ($ids as $k => $item) {
2314 foreach ($todel as $k) {
2319 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"cont_selected_items_have_been_copied"),
true);
2320 $ilCtrl->redirect($this,
"chapters");
2328 $this->cutItems(
"chapters");
2338 $ilToolbar = $this->toolbar;
2340 $ilCtrl = $this->ctrl;
2343 $this->setContentSubTabs(
"export_ids");
2347 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2348 $lm_tree = $this->lm->getTree();
2350 $options = array(
"" =>
$lng->txt(
"all"));
2351 foreach ($childs as
$c) {
2352 $options[
$c[
"child"]] =
$c[
"title"];
2355 $si->setOptions($options);
2357 $ilToolbar->addInputItem($si,
true);
2358 $ilToolbar->addFormButton(
$lng->txt(
"help_filter"),
"filterHelpChapters");
2365 $tpl->setContent($tbl->getHTML());
2370 $ilCtrl = $this->ctrl;
2372 $ilCtrl->redirect($this,
"showExportIDsOverview");
2377 $ilCtrl = $this->ctrl;
2382 foreach ($this->edit_request->getExportIds() as $exp_id) {
2383 if ($exp_id !=
"" && !preg_match(
2384 "/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
2391 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"cont_exp_ids_not_resp_format1") .
": a-z, A-Z, 0-9, '_'. " .
2392 $lng->txt(
"cont_exp_ids_not_resp_format3") .
" " .
2393 $lng->txt(
"cont_exp_ids_not_resp_format2"));
2394 $this->showExportIDsOverview(
true);
2399 foreach ($this->edit_request->getExportIds() as $pg_id => $exp_id) {
2408 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"cont_saved_export_ids"),
true);
2409 $ilCtrl->redirect($this,
"showExportIdsOverview");
2415 $ilCtrl = $this->ctrl;
2416 $help_map = $this->
help->internal()->domain()->map();
2418 foreach ($this->edit_request->getScreenIds() as $chap => $ids) {
2419 $ids = explode(
"\n", $ids);
2420 $help_map->saveScreenIdsForChapter($chap, $ids);
2422 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2423 $ilCtrl->redirect($this,
"showExportIdsOverview");
2433 $ilToolbar = $this->toolbar;
2434 $ilCtrl = $this->ctrl;
2438 $this->setContentSubTabs(
"help_tooltips");
2440 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2442 $ti->setMaxLength(200);
2444 $ilToolbar->addInputItem($ti,
true);
2445 $ilToolbar->addFormButton(
$lng->txt(
"add"),
"addTooltip");
2446 $ilToolbar->addSeparator();
2448 $options = $this->
help->internal()->domain()->tooltips()->getTooltipComponents();
2453 $si->setOptions($options);
2455 $ilToolbar->addInputItem($si,
true);
2456 $ilToolbar->addFormButton(
$lng->txt(
"help_filter"),
"filterTooltips");
2460 $tpl->setContent($tbl->getHTML());
2466 $ilCtrl = $this->ctrl;
2468 $tt_id = $this->edit_request->getTooltipId();
2469 if (trim($tt_id) !=
"") {
2470 if (is_int(strpos($tt_id,
"_"))) {
2471 $this->
help->internal()->domain()->tooltips()->addTooltip(trim($tt_id),
"");
2472 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2474 $fu = strpos($tt_id,
"_");
2475 $comp = substr($tt_id, 0, $fu);
2478 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"cont_help_no_valid_tooltip_id"),
true);
2481 $ilCtrl->redirect($this,
"showTooltipList");
2486 $ilCtrl = $this->ctrl;
2490 $this->edit_request->getTooltipComponent()
2492 $ilCtrl->redirect($this,
"showTooltipList");
2497 $ilCtrl = $this->ctrl;
2500 $tooltip_ids = $this->edit_request->getTooltipIds();
2501 foreach ($this->edit_request->getTooltipTexts() as
$id => $text) {
2502 $this->
help->internal()->domain()->tooltips()->updateTooltip(
2505 $tooltip_ids[(
int)
$id]
2508 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2509 $ilCtrl->redirect($this,
"showTooltipList");
2515 $ilCtrl = $this->ctrl;
2517 $ids = $this->edit_request->getIds();
2518 if (count($ids) > 0) {
2519 foreach ($ids as
$id) {
2520 $this->
help->internal()->domain()->tooltips()->deleteTooltip($id);
2522 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2524 $ilCtrl->redirect($this,
"showTooltipList");
2534 string $a_def_option =
""
2544 if ($a_def_option !=
"") {
2548 $layout->addOption(
new ilRadioOption(
"<table><tr><td>" . $im_tag .
"</td><td><strong>" .
2549 $lng->txt(
"cont_lm_default_layout") .
2550 "</strong>: " .
$lng->txt(
"cont_layout_" . $a_def_option) .
2551 "</td></tr></table>",
""));
2558 $layout->addOption(
new ilRadioOption(
"<table><tr><td style='padding: 0px 5px 5px;'>" .
2559 $im_tag .
"</td><td style='padding:5px;'><strong>" .
$lng->txt(
"cont_layout_" . $l) .
"</strong>: " .
2560 $lng->txt(
"cont_layout_" . $l .
"_desc") .
"</td></tr></table>", $l));
2571 $ilCtrl = $this->ctrl;
2572 $ilCtrl->setParameter($this,
"hierarchy",
"1");
2573 $this->setPageLayout(
true);
2581 bool $a_in_hierarchy =
false
2584 $ilCtrl = $this->ctrl;
2587 $ids = $this->edit_request->getIds();
2588 if (count($ids) == 0) {
2589 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2591 if ($a_in_hierarchy) {
2592 $ilCtrl->redirect($this,
"chapters");
2594 $ilCtrl->redirect($this,
"pages");
2598 $this->initSetPageLayoutForm();
2600 $tpl->setContent($this->
form->getHTML());
2606 $ilCtrl = $this->ctrl;
2610 $ids = $this->edit_request->getIds();
2611 foreach ($ids as
$id) {
2614 $this->
form->addItem($hi);
2616 $layout = self::getLayoutOption(
2617 $lng->txt(
"cont_layout"),
2619 $this->lm->getLayout()
2621 $this->
form->addItem($layout);
2623 $this->
form->addCommandButton(
"savePageLayout",
$lng->txt(
"save"));
2624 $this->
form->addCommandButton(
"pages",
$lng->txt(
"cancel"));
2626 $this->
form->setTitle(
$lng->txt(
"cont_set_layout"));
2627 $this->
form->setFormAction($ilCtrl->getFormAction($this));
2633 $ilCtrl = $this->ctrl;
2635 $ilCtrl->setParameter($this,
"hierarchy", $this->requested_hierarchy);
2637 $ids = $this->edit_request->getIds();
2638 foreach ($ids as
$id) {
2641 $this->edit_request->getLayout(),
2645 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2647 if ($this->requested_hierarchy) {
2648 $ilCtrl->redirect($this,
"chapters");
2650 $ilCtrl->redirect($this,
"pages");
2664 $ilToolbar = $this->toolbar;
2666 $ilCtrl = $this->ctrl;
2667 $ilTabs = $this->tabs;
2670 $ilTabs->setTabActive(
"settings");
2671 $this->setSubTabs(
"cont_glossaries");
2673 $ilToolbar->addButton(
2675 $ilCtrl->getLinkTarget($this,
"showLMGlossarySelector")
2680 $tpl->setContent($tab->getHTML());
2686 $ilCtrl = $this->ctrl;
2687 $tree = $this->tree;
2688 $ilTabs = $this->tabs;
2691 $ilTabs->setTabActive(
"settings");
2692 $this->setSubTabs(
"cont_glossaries");
2695 $exp->setExpand($this->requested_search_root_expand ?: $tree->readRootId());
2696 $exp->setPathOpen($this->
object->getRefId());
2697 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'showLMGlossarySelector'));
2698 $exp->setTargetClass(get_class($this));
2699 $exp->setCmd(
'confirmGlossarySelection');
2700 $exp->setClickableTypes(array(
"glo"));
2701 $exp->addFilter(
"glo");
2705 $tpl->setContent($exp->getOutput());
2710 $ilCtrl = $this->ctrl;
2715 $ilCtrl->setParameter($this,
"glo_ref_id", $this->requested_root_id);
2716 $cgui->setFormAction($ilCtrl->getFormAction($this));
2717 $cgui->setHeaderText(
$lng->txt(
"cont_link_glo_in_lm"));
2718 $cgui->setCancel(
$lng->txt(
"no"),
"selectLMGlossary");
2719 $cgui->setConfirm(
$lng->txt(
"yes"),
"selectLMGlossaryLink");
2720 $tpl->setContent($cgui->getHTML());
2725 $glo_ref_id = $this->requested_glo_ref_id;
2726 $this->lm->autoLinkGlossaryTerms($glo_ref_id);
2727 $this->selectLMGlossary();
2732 $ilCtrl = $this->ctrl;
2735 $glos = $this->lm->getAutoGlossaries();
2736 $glo_ref_id = $this->requested_glo_ref_id;
2738 if (!in_array($glo_id, $glos)) {
2741 $this->lm->setAutoGlossaries($glos);
2742 $this->lm->update();
2744 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2745 $ilCtrl->redirect($this,
"editGlossaries");
2750 $ilCtrl = $this->ctrl;
2753 $this->lm->removeAutoGlossary($this->requested_glo_id);
2754 $this->lm->update();
2756 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"msg_obj_modified"),
true);
2757 $ilCtrl->redirect($this,
"editGlossaries");
2762 $ilCtrl = $this->ctrl;
2764 $ilCtrl->setParameter($this,
"transl",
"-");
2765 if ($this->lang_switch_mode ==
"short_titles") {
2766 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2768 $ilCtrl->redirect($this,
"chapters");
2773 $ilCtrl = $this->ctrl;
2775 $ilCtrl->setParameter($this,
"transl", $this->requested_totransl);
2776 if ($this->lang_switch_mode ==
"short_titles") {
2777 $ilCtrl->redirectByClass(
"illmeditshorttitlesgui",
"");
2779 $ilCtrl->redirect($this,
"chapters");
2785 parent::redrawHeaderActionObject();
2793 $this->
ctrl->redirectByClass(array(
'illearningprogressgui'),
'');
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
GUI class for object translation handling.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static storeContentObject(string $a_type, int $a_id, string $a_action="cut")
static getContentObjectId()
static getContentObjectType()
static setAction(string $a_action)
Export User Interface Class.
const CMD_LIST_EXPORT_FILES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Import related features for learning modules.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
static writeLayout(int $a_obj_id, string $a_layout, ?ilObjLearningModule $a_lm=null)
Write layout setting.
static clipboardCut(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static saveExportId(int $a_lm_id, int $a_lmobj_id, string $a_exp_id, string $a_type="pg")
static saveTitles(ilObjLearningModule $a_lm, array $a_titles, string $a_lang="-")
Save titles for lm objects.
static _lookupContObjID(int $a_id)
get learning module id for lm object
static _lookupTitle(int $a_obj_id)
static clipboardCopy(int $a_cont_obj_id, array $a_ids)
Copy a set of chapters/pages into the clipboard.
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static _lookupType(int $a_obj_id, int $a_lm_id=0)
User Interface for Learning Module Page Objects Editing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getPresentationTitle(int $a_pg_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for LTI provider object settings.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
const TYPE_LM_BLOCKED_USERS
Class ilObjContentObjectGUI.
string $requested_backcmd
copyItems(array $ids)
Copy items to clipboard.
static getMultiLangHeader(int $a_lm_id, object $a_gui_class, string $a_mode="")
string $requested_totransl
addTabs(string $a_act="")
setSubTabs(string $a_active)
int $requested_link_ref_id
properties()
edit properties form
ilObjLearningModule $lm_obj
afterSave(ilObject $new_object)
Post (successful) object creation hook.
learningProgress()
Learning progress.
static _goto(string $a_target)
confirmGlossarySelection()
showMaintenance()
Show maintenance.
ILIAS Style Content Service $content_style_service
selectHeader()
select page as header
buildExportOptionsFormXML()
setTabs(string $a_act="")
ilComponentRepository $component_repository
initMenuEntryForm(string $a_mode="edit")
editMenuEntry(?ilPropertyFormGUI $form=null)
ILIAS LearningModule InternalDomainService $domain
EditingGUIRequest $edit_request
getContextPath(int $a_endnode_id, int $a_startnode_id=1)
setPageLayout(bool $a_in_hierarchy=false)
Set layout for multiple pages.
saveAllTitles()
Save all titles of chapters/pages.
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=false)
initPropertiesForm()
Init properties form.
showActions(array $a_actions)
confirmedDelete(int $a_parent_subobj_id=0)
delete page object or structure objects
int $requested_search_root_expand
addMenuEntry(?ilPropertyFormGUI $form=null)
display add menu entry form
static getLayoutOption(string $a_txt, string $a_var, string $a_def_option="")
int $requested_menu_entry
cutChapter()
Cut chapter(s)
bool $requested_hierarchy
getPropertiesFormValues()
Get values for properties form.
moveChapter(int $a_parent_subobj_id=0)
move a single chapter (selection)
listLinks()
List all broken links.
selectFooter()
select page as footer
ILIAS LearningModule ReadingTime SettingsGUI $reading_time_gui
showExportIDsOverview(bool $a_validation=false)
int $requested_glo_ref_id
buildExportOptionsFormHTML()
setPageLayoutInHierarchy()
Set layout for multiple pages.
saveProperties()
save properties
addLocations(bool $a_omit_obj_id=false)
display locator
activatePages()
activates or deactivates pages
string $requested_lang_switch_mode
setQuestionsSubTabs(string $a_active)
setContentSubTabs(string $a_active)
string $requested_baseClass
int $requested_active_node
bool $requested_lmmovecopy
string $requested_new_type
ILIAS LearningModule InternalGUIService $gui
getBlockedUsersMailSignature()
editGlossaries()
Edit automatically linked glossaries.
int $requested_lm_menu_expand
static getAvailableLayouts()
get all available lm layouts
static isOnlineHelpModule(int $a_id, bool $a_as_obj_id=false)
Is module an online module.
static _lookupSetting(string $a_set)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupLogin(int $a_user_id)
GUI class for the workflow of copying objects.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
ilGlobalTemplateInterface $tpl
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ilObjectService $object_service
addHeaderAction()
Add header action menu.
prepareOutput(bool $show_sub_objects=true)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const INFO_TAB_VISIBILITY
Class ilObject Basic functions for all objects.
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
Page multilinguality GUI class.
static _writeActive(int $a_id, string $a_parent_type, bool $a_active)
write activation status
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static unlock(int $a_q_id, int $a_user_id)
Unlock question for user.
static resetTries(int $a_q_id, int $a_user_id)
Reset tries for user and question.
This class represents an option in a radio group.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
Explorer for selecting repository items.
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
@ilCtrl_Calls ilStructureObjectGUI: ilConditionHandlerGUI, ilObjectMetaDataGUI @ilCtrl_Calls ilStruct...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
isInTree(?int $a_node_id)
get all information of a node.
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
deleteTree(array $a_node)
delete node and the whole subtree under this node
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static redirect(string $a_script)
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setContent(string $a_html)
Sets content for standard template.
Readable part of repository interface to ilComponentDataDB.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form( $class_path, string $cmd, string $submit_caption="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
catch(\Exception $e) $req