32 protected \ILIAS\Glossary\InternalDomainService
$domain;
33 protected \ILIAS\Glossary\InternalGUIService
$gui;
34 protected \ILIAS\DI\UIServices
$ui;
62 bool $a_call_by_reference =
true,
63 bool $a_prepare_output =
true 67 $service = $DIC->glossary()->internal();
69 $this->domain = $domain =
$service->domain();
71 $this->
lng = $domain->lng();
72 $this->
user = $domain->user();
73 $this->setting = $domain->settings();
74 $this->
access = $domain->access();
75 $this->rbacsystem = $domain->rbac()->system();
76 $this->log = $domain->log();
78 $this->
ctrl = $gui->ctrl();
79 $this->
toolbar = $gui->toolbar();
80 $this->
tabs = $gui->tabs();
81 $this->
help = $gui->help();
82 $this->
ui = $gui->ui();
83 $this->ui_fac = $gui->ui()->factory();
84 $this->ui_ren = $gui->ui()->renderer();
85 $this->global_screen = $gui->globalScreen();
86 $this->gui_presentation_service = $gui->presentation();
88 $this->edit_request = $gui->editing()->request();
91 $this->
ctrl->saveParameter($this, array(
"ref_id"));
92 $this->
lng->loadLanguageModule(
"content");
93 $this->
lng->loadLanguageModule(
"glo");
100 $this->term_id = $this->edit_request->getTermId();
102 if ($this->term_id > 0 && $term_glo_id != $this->
object->getId()
107 $this->tax_id = $this->
object->getTaxonomyId();
108 if ($this->tax_id > 0) {
109 $this->
ctrl->saveParameter($this, array(
"tax_node"));
113 $tax_node = $this->edit_request->getTaxNode();
114 if ($tax_node > 1 && $this->tax->getTree()->readRootId() !=
$tax_node) {
118 if ($this->getGlossary()) {
119 $this->term_manager = $domain->term(
120 $this->getGlossary(),
123 $this->tax_manager = $domain->taxonomy(
128 $this->term_def_bulk_gui = $this->gui_presentation_service
129 ->TermDefinitionBulkCreationGUI($this->getGlossary());
131 $this->in_administration =
132 (strtolower($this->edit_request->getBaseClass()) ==
"iladministrationgui");
133 $cs = $DIC->contentStyle();
134 $this->content_style_gui = $cs->gui();
135 if (is_object($this->
object)) {
136 $this->content_style_domain = $cs->domain()->styleForRefId($this->
object->getRefId());
137 $this->taxonomy = $DIC->taxonomy();
143 $cmd = $this->
ctrl->getCmd();
144 $next_class = $this->
ctrl->getNextClass($this);
146 $this->log->debug(
"glossary term, next class " . $next_class .
", cmd: " . $cmd);
148 switch ($next_class) {
149 case 'ilobjectmetadatagui':
157 $this->tabs_gui->activateTab(
'meta_data');
159 $this->
ctrl->forwardCommand($md_gui);
162 case "ilglossarytermgui":
163 if (!$this->term_perm->checkPermission(
"edit_content", $this->term_id) &&
164 !$this->term_perm->checkPermission(
"write", $this->term_id)) {
169 $this->
ctrl->setReturn($this,
"listTerms");
171 $term_gui->setGlossary($this->getGlossary());
172 $this->
ctrl->forwardCommand($term_gui);
175 case "ilinfoscreengui":
180 case "ilobjectcontentstylesettingsgui":
184 $this->tabs_gui->activateTab(
"settings");
186 $settings_gui = $this->content_style_gui
187 ->objectSettingsGUIForRefId(
191 $this->
ctrl->forwardCommand($settings_gui);
195 case 'ilpermissiongui':
196 if ($this->in_administration) {
205 $ret = $this->
ctrl->forwardCommand($perm_gui);
208 case "ilcommonactiondispatchergui":
211 $this->
ctrl->forwardCommand($gui);
214 case strtolower(ilTaxonomySettingsGUI::class):
220 $this->
tabs->activateTab(
"settings");
223 $this->
ctrl->setReturn($this,
"properties");
224 $tax_gui = $this->taxonomy->gui()->getSettingsGUI(
226 $this->
lng->txt(
"glo_tax_info"),
230 $ret = $this->
ctrl->forwardCommand($tax_gui);
237 $this->
tabs->activateTab(
"export");
241 $exp_gui->addFormat(
"xml");
242 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
243 $exp_gui->addCustomColumn(
244 $this->
lng->txt(
"cont_public_access"),
246 "getPublicAccessColValue" 248 $exp_gui->addCustomMultiCommand(
249 $this->
lng->txt(
"cont_public_access"),
253 $ret = $this->
ctrl->forwardCommand($exp_gui);
256 case 'ilobjectcopygui':
260 $this->
ctrl->forwardCommand($cp);
263 case "ilglossaryforeigntermcollectorgui":
265 $this->
ctrl->setReturn($this,
"");
271 $this->
ctrl->forwardCommand($coll);
274 case "iltermdefinitionbulkcreationgui":
276 $this->
ctrl->setReturn($this,
"listTerms");
277 $this->
ctrl->forwardCommand($this->term_def_bulk_gui);
281 $cmd = $this->
ctrl->getCmd(
"listTerms");
283 if (($cmd ==
"create") && ($this->edit_request->getNewType() ==
"term")) {
284 $this->
ctrl->setCmd(
"create");
285 $this->
ctrl->setCmdClass(
"ilGlossaryTermGUI");
289 if ($cmd !=
"quickList") {
290 if ($this->in_administration ||
300 if ($cmd ==
"redrawHeaderAction") {
301 $cmd =
"redrawHeaderActionObject";
306 "redrawHeaderActionObject" 309 } elseif (in_array($cmd, [
323 if ($cmd !=
"quickList") {
325 $this->tpl->printToStdout();
328 $this->tpl->printToStdout(
false);
339 if (isset($glossary) && $glossary->getType() ==
"glo") {
355 $form->
setTitle($this->
lng->txt($new_type .
"_new"));
361 $ti->setRequired(
true);
386 $new_type = $this->edit_request->getNewType();
393 $this->
lng->loadLanguageModule($new_type);
394 $this->
ctrl->setParameter($this,
"new_type", $new_type);
398 $this->
ctrl->setParameter($this,
"new_type",
"");
401 $newObj->setType($new_type);
402 $newObj->setTitle($form->
getInput(
"title"));
403 $newObj->setDescription($form->
getInput(
"desc"));
404 $newObj->setVirtualMode(
"none");
412 $newObj->applyDidacticTemplate($dtpl);
416 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"glo_added"),
true);
417 $this->
ctrl->setParameterByClass(
418 ilObjGlossaryGUI::class,
422 $this->
ctrl->redirectByClass(
423 [ilGlossaryEditorGUI::class, ilObjGlossaryGUI::class],
430 $this->tpl->setContent($form->
getHTML());
438 $this->
lng->loadLanguageModule(
"meta");
441 $info->enablePrivateNotes();
443 if ($this->
access->checkAccess(
"write",
"", $this->requested_ref_id)) {
444 $info->enableNewsEditing();
446 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
447 if ($enable_internal_rss) {
448 $info->setBlockProperty(
"news",
"settings",
true);
451 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
453 self::addUsagesToInfo($info, $this->
object->getId());
455 $this->
ctrl->forwardCommand($info);
467 $lng = $DIC->language();
468 $ilAccess = $DIC->access();
472 foreach ($sms as $sm) {
475 foreach ($refs as $ref) {
476 if ($link ===
false && $ilAccess->checkAccess(
"write",
"", $ref)) {
477 $link = ilLink::_getLink($ref,
'sahs');
482 if ($link !==
false) {
483 $entry =
"<a href='" . $link .
"' target='_top'>" . $entry .
"</a>";
493 if ($this->in_administration) {
494 parent::viewObject();
498 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
513 $ecs->addSettingsToForm($this->
form,
'glo');
515 $this->tpl->setContent($this->
form->getHTML());
519 string $a_mode =
"edit" 527 $title->setRequired(
true);
528 $this->
form->addItem($title);
532 $this->
form->addItem($desc);
538 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_mode_normal"),
"none", $this->
lng->txt(
"glo_mode_normal_info"));
539 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_collection"),
"coll", $this->
lng->txt(
"glo_collection_info"));
540 if (!empty($this->
object->getGlossariesForCollection()) && $this->
object->isVirtual()) {
543 $glo_mode->setInfo($this->
lng->txt(
"glo_change_to_standard_unavailable_info"));
548 $glo_mode->setInfo($this->
lng->txt(
"glo_change_to_collection_unavailable_info"));
550 $glo_mode->addOption($op1);
551 $glo_mode->addOption($op2);
552 $this->
form->addItem($glo_mode);
555 $this->
lng->loadLanguageModule(
"rep");
557 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
558 $this->
form->addItem($section);
562 $online->setValue(
"y");
563 $online->setInfo($this->
lng->txt(
"glo_online_info"));
564 $this->
form->addItem($online);
567 $section->setTitle($this->
lng->txt(
'cont_presentation'));
568 $this->
form->addItem($section);
571 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->addTileImage();
576 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_table_form"),
"table", $this->
lng->txt(
"glo_table_form_info"));
580 $snl->setMaxValue(3000);
581 $snl->setMinValue(100);
582 $snl->setMaxLength(4);
584 $snl->
setInfo($this->
lng->txt(
"glo_text_snippet_length_info"));
586 $snl->setSuffix($this->
lng->txt(
"characters"));
589 $pres_mode->addOption($op1);
590 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_full_definitions"),
"full_def", $this->
lng->txt(
"glo_full_definitions_info"));
591 $pres_mode->addOption($op2);
592 $this->
form->addItem($pres_mode);
596 $flash_active->setValue(
"y");
597 $flash_active->setInfo($this->
lng->txt(
"glo_flashcard_training_info"));
601 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_term_vs_def"),
"term", $this->
lng->txt(
"glo_term_vs_def_info"));
602 $flash_mode->addOption($op1);
603 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_def_vs_term"),
"def", $this->
lng->txt(
"glo_def_vs_term_info"));
604 $flash_mode->addOption($op2);
606 $this->
form->addItem($flash_active);
610 $down->setValue(
"y");
611 $down->setInfo($this->
lng->txt(
"cont_downloads_desc"));
612 $this->
form->addItem($down);
614 if ($a_mode ==
"edit") {
615 $title->setValue($this->
object->getTitle());
616 $desc->setValue($this->
object->getDescription());
617 $online->setChecked($this->
object->getOnline());
618 $mode1 = $this->
object->getVirtualMode() ===
"none" 621 $glo_mode->setValue($mode1);
622 $pres_mode->setValue($this->
object->getPresentationMode());
625 $down->setChecked($this->
object->isActiveDownloads());
626 $flash_active->setChecked($this->
object->isActiveFlashcards());
627 $flash_mode->setValue($this->
object->getFlashcardsMode());
631 $feat->setTitle($this->
lng->txt(
'obj_features'));
632 $this->
form->addItem($feat);
647 if (count($cols) > 1) {
649 $this->
form->addItem($ti);
650 $ti->setValue($cols);
651 $ti->setInfo($this->
lng->txt(
"glo_col_ordering_info"));
655 $this->
form->addCommandButton(
"saveProperties", $this->
lng->txt(
"save"));
657 $this->
form->setTitle($this->
lng->txt(
"cont_glo_properties"));
658 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
666 if ($this->
form->checkInput()) {
667 $this->
object->setTitle($this->
form->getInput(
"title"));
668 $this->
object->setDescription($this->
form->getInput(
"description"));
670 $glo_mode = $this->
form->getInput(
"glo_mode") ?: $this->
object->getVirtualMode();
671 $this->
object->setVirtualMode($glo_mode);
672 $this->
object->setActiveDownloads(
ilUtil::yn2tf($this->
form->getInput(
"glo_act_downloads")));
673 $this->
object->setPresentationMode($this->
form->getInput(
"pres_mode"));
674 $this->
object->setSnippetLength($this->
form->getInput(
"snippet_length"));
675 $this->
object->setActiveFlashcards(
ilUtil::yn2tf($this->
form->getInput(
"flash_active")));
676 $this->
object->setFlashcardsMode($this->
form->getInput(
"flash_mode"));
677 $this->
object->update();
680 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->saveTileImage();
685 if (count($cols) > 1) {
686 $adv_ap->saveColumnOrder($this->
form->getInput(
"field_order"));
703 if ($ecs->handleSettingsUpdate($this->form)) {
704 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
705 $this->
ctrl->redirect($this,
"properties");
708 $this->
form->setValuesByPost();
709 $this->tpl->setContent($this->
form->getHTML());
715 $active = $this->
object->getShowTaxonomy();
717 ? $this->
lng->txt(
"yes")
718 : $this->
lng->txt(
"no");
721 $this->
lng->txt(
"glo_show_in_presentation") => $value
729 $this->
ctrl->setParameterByClass(self::class,
"glo_tax_id", $tax_id);
730 $active = $this->
object->getShowTaxonomy();
732 $actions[] = $this->
ui->factory()->button()->shy(
733 $this->
lng->txt(
"glo_show_in_presentation_on"),
734 $this->
ctrl->getLinkTargetByClass(
736 "showTaxInPresentation" 740 $actions[] = $this->
ui->factory()->button()->shy(
741 $this->
lng->txt(
"glo_show_in_presentation_off"),
742 $this->
ctrl->getLinkTargetByClass(
744 "hideTaxInPresentation" 748 $this->
ctrl->setParameterByClass(self::class,
"glo_tax_id", null);
755 $this->
object->setShowTaxonomy(
true);
756 $this->
object->update();
757 $this->
ctrl->redirectByClass(ilTaxonomySettingsGUI::class);
762 $this->
object->setShowTaxonomy(
false);
763 $this->
object->update();
764 $this->
ctrl->redirectByClass(ilTaxonomySettingsGUI::class);
774 if ($this->
object->isVirtual()) {
777 $panel_html = $this->ui_ren->render($panel);
782 $tab_html = $tab->getHTML();
785 $this->
tabs->activateTab(
"content");
787 $this->tpl->setContent($panel_html . $modals . $tab_html);
802 $ti->setMaxLength(80);
804 $this->
toolbar->addInputItem($ti,
true);
807 $this->
lng->loadLanguageModule(
"meta");
809 $session_lang = $this->term_manager->getSessionLang();
810 if ($session_lang !=
"") {
811 $s_lang = $session_lang;
813 $s_lang = $this->
user->getLanguage();
817 $si->setValue($s_lang);
818 $this->
toolbar->addInputItem($si,
true);
820 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this));
821 $this->
toolbar->addFormButton($this->
lng->txt(
"glo_add_new_term"),
"addTerm");
823 $this->
toolbar->addSeparator();
826 if ($this->
user->clipboardHasObjectsOfType(
"term")) {
828 $this->
lng->txt(
"paste"),
829 $this->
ctrl->getLinkTarget($this,
"pasteTerms")
832 $this->
lng->txt(
"clear_clipboard"),
833 $this->
ctrl->getLinkTarget($this,
"clearClipboard")
837 $this->
lng->txt(
"glo_add_from_other"),
838 $this->
ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"")
842 $this->term_def_bulk_gui->modifyToolbar($this->
toolbar);
848 $button = $this->ui_fac->button()->standard($this->
lng->txt(
"glo_add_glossary"),
"")->withOnClick($modal->getShowSignal());
849 $this->modals_to_render[] = $modal;
850 $this->
toolbar->addComponent($button);
859 $glo_ids = $this->
object->getAllGlossaryIds(
true);
860 $at_least_one_glossary =
false;
861 foreach ($glo_ids as $glo_id) {
862 if ($this->
object->getId() === $glo_id) {
867 $glo_link = $this->ui_fac->link()->standard($glossary->getTitle(), ilLink::_getLink($glo_ref_id));
868 $glo_item = $this->ui_fac->item()->standard($glo_link);
869 $glo_item = $glo_item->withDescription($glossary->getDescription());
870 $form_action = $this->
ctrl->getFormActionByClass(ilObjGlossaryGUI::class,
"removeGlossaryFromCollection");
871 $delete_modal = $this->ui_fac->modal()->interruptive(
873 $this->
lng->txt(
"glo_really_remove_from_collection"),
875 )->withAffectedItems([
876 $this->ui_fac->modal()->interruptiveItem()->standard(
878 $glossary->getTitle(),
879 $this->ui_fac->image()->standard(
881 $this->
lng->txt(
"icon") .
" " . $this->
lng->txt(
"obj_" . $glossary->getType())
885 $actions = $this->ui_fac->dropdown()->standard([
886 $this->ui_fac->button()->shy($this->
lng->txt(
"remove"),
"")->withOnClick($delete_modal->getShowSignal()),
888 $glo_item = $glo_item->withActions($actions);
890 $items[] = $glo_item;
891 $this->modals_to_render[] = $delete_modal;
892 $at_least_one_glossary =
true;
896 if (!$at_least_one_glossary) {
897 $message_box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"glo_collection_empty_info"));
898 $components[] = $message_box;
900 if (!empty($items)) {
901 $item_group = $this->ui_fac->item()->group($this->
lng->txt(
"glo_selected_glossaries_info"), $items);
902 $panel = $this->ui_fac->panel()->listing()->standard(
903 $this->
lng->txt(
"glo_selected_glossaries"),
906 $components[] = $panel;
916 "showModalForCollection",
918 "saveGlossaryForCollection",
921 $modal = $this->ui_fac->modal()->roundtrip(
922 $this->
lng->txt(
"glo_add_to_collection"),
923 $this->ui_fac->legacy(!$exp->handleCommand() ? $exp->getHTML() :
"")
931 $selected_glo =
new ilObjGlossary($this->edit_request->getSelectedGlossaryRefId(),
true);
932 if ($selected_glo->getId() === $this->
object->getId()) {
933 $this->tpl->setOnScreenMessage(
"info", $this->
lng->txt(
"glo_selected_glossary_is_current_info"),
true);
936 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"glo_added_to_collection_info"),
true);
938 $this->
ctrl->redirect($this,
"listTerms");
943 $glo_id = $this->edit_request->getInterruptiveItemIds()[0];
944 $this->
object->removeGlossaryFromCollection($glo_id);
945 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"glo_removed_from_collection_info"),
true);
946 $this->
ctrl->redirect($this,
"listTerms");
954 $new_term = $this->edit_request->getNewTerm();
955 if ($new_term ==
"") {
956 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_please_enter_a_term"),
true);
957 $this->
ctrl->redirect($this,
"listTerms");
961 $lang = $this->edit_request->getTermLanguage();
968 $this->term_manager->setSessionLang(
$lang);
970 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term->
getId());
971 $this->
ctrl->redirectByClass(array(
"ilglossarytermgui",
972 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
979 $glo_exp->buildExportFile();
980 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
989 $glo_exp->buildExportFile();
990 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
998 $files = $this->edit_request->getFiles();
999 if (count($files) == 0) {
1000 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1001 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
1003 if (count($files) > 1) {
1004 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
1005 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
1008 $file = explode(
":", $files[0]);
1009 $export_dir = $this->
object->getExportDirectory($file[0]);
1011 if ($this->
object->getPublicExportFile($file[0]) ==
1013 $this->
object->setPublicExportFile($file[0],
"");
1015 $this->
object->setPublicExportFile($file[0], $file[1]);
1017 $this->
object->update();
1018 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
1023 $ids = $this->edit_request->getIds();
1024 if (count($ids) == 0) {
1025 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1026 $this->
ctrl->redirect($this,
"listTerms");
1030 foreach ($ids as $term_id) {
1033 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"glo_term_must_belong_to_glo"),
true);
1034 $this->
ctrl->redirect($this,
"listTerms");
1040 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1041 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
1042 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelTermDeletion");
1043 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"deleteTerms");
1045 foreach ($ids as
$id) {
1049 $cgui->addItem(
"id[]", $id,
"Error: Page is missing.");
1057 $this->
ctrl->setParameterByClass(
1058 "ilglossarytermgui",
1064 $add =
" (" . $this->
lng->txt(
"glo_term_reference") .
")";
1066 $link =
"[<a href='" .
1067 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
1068 "'>" . $this->
lng->txt(
"glo_list_usages") .
"</a>]";
1069 $add =
"<div class='small'>" .
1070 sprintf($this->
lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link .
"</div>";
1074 $cgui->addItem(
"id[]", $id, $term->
getTerm() . $add);
1077 $this->tpl->setContent($cgui->getHTML());
1082 $this->
ctrl->redirect($this,
"listTerms");
1087 $ids = $this->edit_request->getIds();
1088 foreach ($ids as
$id) {
1094 $this->term_manager->deleteTerm($id);
1097 $this->
ctrl->redirect($this,
"listTerms");
1102 if (strtolower($this->edit_request->getBaseClass()) !=
"ilglossaryeditorgui") {
1103 parent::setLocator();
1104 } elseif (is_object($this->
object)) {
1106 if (is_object($this->term)) {
1107 $gloss_loc->setTerm($this->term);
1109 $gloss_loc->setGlossary($this->getGlossary());
1110 $gloss_loc->display();
1121 $this->tpl->loadStandardTemplate();
1123 $title = $this->
object->getTitle();
1126 if ($this->term_id > 0) {
1127 $this->tpl->setTitle($this->
lng->txt(
"term") .
": " .
1130 parent::setTitleAndDescription();
1132 $this->tpl->setTitle($this->
lng->txt(
"glo") .
": " . $title);
1138 $this->
help->setScreenIdComponent(
"glo");
1141 $cmd = $this->
ctrl->getCmd();
1142 $force_active = ($cmd ==
"" || $cmd ==
"listTerms");
1143 $this->tabs_gui->addTarget(
1145 $this->
ctrl->getLinkTarget($this,
"listTerms"),
1146 array(
"listTerms",
""),
1152 $force_active =
false;
1153 if ($this->
ctrl->getCmd() ==
"showSummary" ||
1154 strtolower($this->
ctrl->getNextClass()) ==
"ilinfoscreengui") {
1155 $force_active =
true;
1157 $this->tabs_gui->addTarget(
1159 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
1167 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
1168 $this->tabs_gui->addTarget(
1170 $this->
ctrl->getLinkTarget($this,
"properties"),
1177 $mdtab = $mdgui->getTab();
1179 $this->tabs_gui->addTarget(
1183 "ilobjectmetadatagui" 1193 $this->tabs_gui->addTarget(
1195 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1202 if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
1208 $this->tabs_gui->addTarget(
1210 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1211 array(
"perm",
"info",
"owner"),
1216 $this->tabs_gui->addNonTabbedLink(
1217 "presentation_view",
1218 $this->
lng->txt(
"glo_presentation_view"),
1219 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->
object->getRefId(),
1228 array(
"general_settings",
"style",
"taxonomy",
"glossaries")
1231 $this->
tabs->addSubTab(
1233 $this->
lng->txt(
"settings"),
1234 $this->
ctrl->getLinkTarget($this,
'properties')
1238 $this->
tabs->addSubTab(
1240 $this->
lng->txt(
"obj_sty"),
1241 $this->
ctrl->getLinkTargetByClass(
"ilobjectcontentstylesettingsgui",
'')
1244 $this->taxonomy->gui()->addSettingsSubTab($this->
getObject()->
getId());
1247 $this->
tabs->addSubTab(
1249 $this->
lng->txt(
"cont_auto_glossaries"),
1250 $this->
ctrl->getLinkTarget($this,
'editGlossaries')
1253 $this->
tabs->activateSubTab($a_active);
1258 public static function _goto(
string $a_target): void
1261 $main_tpl = $DIC->ui()->mainTemplate();
1263 $lng = $DIC->language();
1264 $ilAccess = $DIC->access();
1265 $ctrl = $DIC->ctrl();
1267 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1270 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1274 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1275 $lng->
txt(
"msg_no_perm_read_item"),
1287 $prtab->resetOffset();
1288 $prtab->writeFilterToSession();
1295 $prtab->resetOffset();
1296 $prtab->resetFilter();
1308 if ($a_tpl != null) {
1314 $this->content_style_gui->
addCss($ctpl, $this->
object->getRefId());
1324 if ($this->
object->getPublicExportFile($a_type) == $a_file) {
1325 return $this->
lng->txt(
"yes");
1338 if (is_null($this->tax_manager) || !$this->tax_manager->showInEditing()) {
1342 $tool_context = $this->global_screen->tool()->context()->current();
1344 $tax_id = $this->tax_manager->getTaxonomyId();
1346 $tool_context->addAdditionalData(
1350 $tool_context->addAdditionalData(
1354 $tool_context->addAdditionalData(
1358 $tool_context->addAdditionalData(
1362 $tool_context->addAdditionalData(
1377 $this->
tabs->setTabActive(
"settings");
1381 $this->
lng->txt(
"add"),
1382 $this->
ctrl->getLinkTarget($this,
"showGlossarySelector")
1387 $this->tpl->setContent($tab->getHTML());
1395 $this->
tabs->setTabActive(
"settings");
1399 $search_root_expand = $this->edit_request->getSearchRootExpand();
1400 $exp->
setExpand($search_root_expand ?: $this->tree->readRootId());
1401 $exp->setExpandTarget($this->
ctrl->getLinkTarget($this,
'showGlossarySelector'));
1402 $exp->setTargetClass(get_class($this));
1403 $exp->setCmd(
'confirmGlossarySelection');
1404 $exp->setClickableTypes(array(
"glo"));
1405 $exp->addFilter(
"glo");
1409 $this->tpl->setContent($exp->getOutput());
1415 $this->
ctrl->setParameter($this,
"glo_ref_id", $this->edit_request->getGlossaryRefId());
1416 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1417 $cgui->setHeaderText($this->
lng->txt(
"glo_link_glo_in_glo"));
1418 $cgui->setCancel($this->
lng->txt(
"no"),
"selectGlossary");
1419 $cgui->setConfirm($this->
lng->txt(
"yes"),
"selectGlossaryLink");
1420 $this->tpl->setContent($cgui->getHTML());
1428 $glo_ref_id = $this->edit_request->getGlossaryRefId();
1429 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
1439 $glos = $this->
object->getAutoGlossaries();
1440 $glo_ref_id = $this->edit_request->getGlossaryRefId();
1442 if (!in_array($glo_id, $glos)) {
1445 $this->
object->setAutoGlossaries($glos);
1446 $this->
object->update();
1448 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1449 $this->
ctrl->redirect($this,
"editGlossaries");
1454 $this->
object->removeAutoGlossary($this->edit_request->getGlossaryId());
1455 $this->
object->update();
1457 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1458 $this->
ctrl->redirect($this,
"editGlossaries");
1466 $items = $this->edit_request->getIds();
1467 if (count($items) == 0) {
1468 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1469 $this->
ctrl->redirect($this,
"listTerms");
1472 $this->
user->clipboardDeleteObjectsOfType(
"term");
1475 $time = date(
"Y-m-d H:i:s");
1477 foreach ($items as
$id) {
1478 $this->
user->addObjectToClipboard(
1489 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1490 $this->
ctrl->redirect($this,
"listTerms");
1498 $items = $this->edit_request->getIds();
1499 if (count($items) == 0) {
1500 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1501 $this->
ctrl->redirect($this,
"listTerms");
1504 $this->
user->clipboardDeleteObjectsOfType(
"term");
1507 $time = date(
"Y-m-d H:i:s");
1509 foreach ($items as
$id) {
1510 $this->
user->addObjectToClipboard(
1521 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1522 $this->
ctrl->redirect($this,
"listTerms");
1528 $this->
user->clipboardDeleteObjectsOfType(
"term");
1529 $this->
ctrl->redirect($this,
"listTerms");
1535 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1541 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1546 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1547 $this->
ctrl->redirect($this,
"listTerms");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static setAction(string $a_action)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS GlobalScreen Services $global_screen
getProperties(int $tax_id)
deleteTerm(int $a_term_id)
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
ilTermDefinitionBulkCreationGUI $term_def_bulk_gui
static addUsagesToInfo(ilInfoScreenGUI $info, int $glo_id)
Add usages to info screen.
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
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...
addGlossaryForCollection(int $glo_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDisabled(bool $a_disabled)
GUI class for the workflow of copying objects.
editGlossaries()
Edit automatically linked glossaries.
ILIAS Glossary Presentation GUIService $gui_presentation_service
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
initCreateForm(string $new_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
initSettingsForm(string $a_mode="edit")
static _getAllReferences(int $id)
get all reference ids for object ID
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ILIAS Glossary Term TermManager $term_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
static getScormModulesForGlossary(int $a_glo_id)
Get SCORM modules that assign a certain glossary.
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
removeGlossaryFromCollection()
setParameterByClass(string $a_class, string $a_parameter, $a_value)
exportHTML()
create html package
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPublicAccessColValue(string $a_type, string $a_file)
Get public access value for export table.
createObject()
create new object form
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
saveGlossaryForCollection()
setGlossary(ilObjGlossary $a_glossary)
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
static _lookupObjId(int $ref_id)
static _copyTerm(int $a_term_id, int $a_glossary_id)
Copy a term to a glossary.
ILIAS Glossary Taxonomy TaxonomyManager $tax_manager
showTaxonomy()
Show taxonomy.
Export User Interface Class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Style Content GUIService $content_style_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
ILIAS Glossary Editing EditingGUIRequest $edit_request
ilGlossaryTermPermission $term_perm
static _lookupTitle(int $obj_id)
confirmGlossarySelection()
create(bool $a_omit_page_creation=false)
selectGlossaryLink()
Select a glossary and link all its terms.
initDidacticTemplate(ilPropertyFormGUI $form)
Class ilObjectGUI Basic methods of all Output classes.
setValue(string $a_value)
static _lookGlossaryTerm(int $term_id)
get glossary term
static _goto(string $a_target)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getTermsOfGlossary(int $a_glo_id)
addSection(string $a_title)
showToolbarForCollection()
showSelectedGlossariesForCollection()
ILIAS Style Content Object ObjectFacade $content_style_domain
copyTerms()
Copy terms to clipboard.
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
setLanguage(string $a_language)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
setSettingsSubTabs(string $a_active)
form( $class_path, string $cmd, string $submit_caption="")
This class represents a text area property in a property form.
selectGlossary()
Select auto glossary.
referenceTerms()
Add terms to be referenced to clipboard.
static setShortTextsDirty(int $a_glo_id)
Set all short texts of glossary dirty (e.g.
static yn2tf(string $a_yn)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Glossary InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getNumberOfUsages(int $a_term_id)
showGlossarySelector()
Show auto glossary selection.
publishExportFile()
download export file
addHeaderAction()
Add header action menu.
ILIAS Glossary InternalDomainService $domain
ILIAS UI Renderer $ui_ren
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ILIAS Taxonomy Service $taxonomy
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...
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.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
static _lookGlossaryID(int $term_id)
get glossary id form term id