50 bool $a_call_by_reference =
true,
51 bool $a_prepare_output =
true 55 $this->
ctrl = $DIC->ctrl();
56 $this->
lng = $DIC->language();
57 $this->
user = $DIC->user();
58 $this->
toolbar = $DIC->toolbar();
59 $this->
tabs = $DIC->tabs();
60 $this->setting = $DIC[
"ilSetting"];
61 $this->
access = $DIC->access();
62 $this->rbacsystem = $DIC->rbac()->system();
63 $this->
help = $DIC[
"ilHelp"];
65 $this->edit_request = $DIC->glossary()
75 $this->
ctrl->saveParameter($this, array(
"ref_id"));
76 $this->
lng->loadLanguageModule(
"content");
77 $this->
lng->loadLanguageModule(
"glo");
84 $this->term_id = $this->edit_request->getTermId();
86 if ($this->term_id > 0 && $term_glo_id != $this->
object->getId()
91 $this->tax_id = $this->
object->getTaxonomyId();
92 if ($this->tax_id > 0) {
93 $this->
ctrl->saveParameter($this, array(
"show_tax",
"tax_node"));
97 $tax_node = $this->edit_request->getTaxNode();
98 if ($tax_node > 1 && $this->tax->getTree()->readRootId() !=
$tax_node) {
102 if ($this->getGlossary()) {
103 $this->term_manager = $DIC->glossary()
107 $this->getGlossary(),
112 $this->in_administration =
113 (strtolower($this->edit_request->getBaseClass()) ==
"iladministrationgui");
114 $cs = $DIC->contentStyle();
115 $this->content_style_gui = $cs->gui();
116 if (is_object($this->
object)) {
117 $this->content_style_domain = $cs->domain()->styleForRefId($this->
object->getRefId());
123 $cmd = $this->
ctrl->getCmd();
124 $next_class = $this->
ctrl->getNextClass($this);
126 $this->log->debug(
"glossary term, next class " . $next_class .
", cmd: " . $cmd);
128 switch ($next_class) {
129 case 'ilobjectmetadatagui':
137 $this->tabs_gui->activateTab(
'meta_data');
139 $this->
ctrl->forwardCommand($md_gui);
142 case "ilglossarytermgui":
143 if (!$this->term_perm->checkPermission(
"edit_content", $this->term_id) &&
144 !$this->term_perm->checkPermission(
"write", $this->term_id)) {
149 $this->
ctrl->setReturn($this,
"listTerms");
151 $term_gui->setGlossary($this->getGlossary());
152 $this->
ctrl->forwardCommand($term_gui);
155 case "ilinfoscreengui":
160 case "ilobjectcontentstylesettingsgui":
164 $this->tabs_gui->activateTab(
"settings");
166 $settings_gui = $this->content_style_gui
167 ->objectSettingsGUIForRefId(
171 $this->
ctrl->forwardCommand($settings_gui);
175 case 'ilpermissiongui':
176 if ($this->in_administration) {
185 $ret = $this->
ctrl->forwardCommand($perm_gui);
188 case "ilcommonactiondispatchergui":
191 $this->
ctrl->forwardCommand($gui);
194 case "ilobjtaxonomygui":
200 $this->
tabs->activateTab(
"settings");
203 $this->
ctrl->setReturn($this,
"properties");
205 $tax_gui->setMultiple(
false);
207 $tax_gui->setAssignedObject($this->
object->getId());
208 $ret = $this->
ctrl->forwardCommand($tax_gui);
215 $this->
tabs->activateTab(
"export");
219 $exp_gui->addFormat(
"xml");
220 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
221 $exp_gui->addCustomColumn(
222 $this->
lng->txt(
"cont_public_access"),
224 "getPublicAccessColValue" 226 $exp_gui->addCustomMultiCommand(
227 $this->
lng->txt(
"cont_public_access"),
231 $ret = $this->
ctrl->forwardCommand($exp_gui);
234 case 'ilobjectcopygui':
238 $this->
ctrl->forwardCommand($cp);
241 case "ilglossaryforeigntermcollectorgui":
243 $this->
ctrl->setReturn($this,
"");
249 $this->
ctrl->forwardCommand($coll);
253 $cmd = $this->
ctrl->getCmd(
"listTerms");
255 if (($cmd ==
"create") && ($this->edit_request->getNewType() ==
"term")) {
256 $this->
ctrl->setCmd(
"create");
257 $this->
ctrl->setCmdClass(
"ilGlossaryTermGUI");
261 if ($cmd !=
"quickList") {
262 if ($this->in_administration ||
272 if ($cmd ==
"redrawHeaderAction") {
273 $cmd =
"redrawHeaderActionObject";
278 "redrawHeaderActionObject" 281 } elseif (in_array($cmd, [
295 if ($cmd !=
"quickList") {
297 $this->tpl->printToStdout();
300 $this->tpl->printToStdout(
false);
311 if (isset($glossary) && $glossary->getType() ==
"glo") {
327 $form->
setTitle($this->
lng->txt($new_type .
"_new"));
333 $ti->setRequired(
true);
358 $new_type = $this->edit_request->getNewType();
365 $this->
lng->loadLanguageModule($new_type);
366 $this->
ctrl->setParameter($this,
"new_type", $new_type);
370 $this->
ctrl->setParameter($this,
"new_type",
"");
373 $newObj->setType($new_type);
374 $newObj->setTitle($form->
getInput(
"title"));
375 $newObj->setDescription($form->
getInput(
"desc"));
376 $newObj->setVirtualMode(
"none");
384 $newObj->applyDidacticTemplate($dtpl);
388 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"glo_added"),
true);
389 $this->
ctrl->setParameterByClass(
390 ilObjGlossaryGUI::class,
394 $this->
ctrl->redirectByClass(
395 [ilGlossaryEditorGUI::class, ilObjGlossaryGUI::class],
402 $this->tpl->setContent($form->
getHTML());
410 $this->
lng->loadLanguageModule(
"meta");
413 $info->enablePrivateNotes();
415 if ($this->
access->checkAccess(
"write",
"", $this->requested_ref_id)) {
416 $info->enableNewsEditing();
418 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
419 if ($enable_internal_rss) {
420 $info->setBlockProperty(
"news",
"settings",
true);
423 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
425 self::addUsagesToInfo($info, $this->
object->getId());
427 $this->
ctrl->forwardCommand($info);
439 $lng = $DIC->language();
440 $ilAccess = $DIC->access();
444 foreach ($sms as $sm) {
447 foreach ($refs as $ref) {
448 if ($link ===
false && $ilAccess->checkAccess(
"write",
"", $ref)) {
454 if ($link !==
false) {
455 $entry =
"<a href='" . $link .
"' target='_top'>" . $entry .
"</a>";
465 if ($this->in_administration) {
466 parent::viewObject();
470 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
485 $ecs->addSettingsToForm($this->
form,
'glo');
487 $this->tpl->setContent($this->
form->getHTML());
491 string $a_mode =
"edit" 499 $title->setRequired(
true);
500 $this->
form->addItem($title);
504 $this->
form->addItem($desc);
510 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_mode_normal"),
"none", $this->
lng->txt(
"glo_mode_normal_info"));
511 $glo_mode->addOption($op1);
512 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_collection"),
"coll", $this->
lng->txt(
"glo_collection_info"));
513 $glo_mode->addOption($op2);
516 $glo_mode2->setValue(
"level");
517 $op3 =
new ilRadioOption($this->
lng->txt(
"glo_mode_level"),
"level", $this->
lng->txt(
"glo_mode_level_info"));
518 $glo_mode2->addOption($op3);
519 $op4 =
new ilRadioOption($this->
lng->txt(
"glo_mode_subtree"),
"subtree", $this->
lng->txt(
"glo_mode_subtree_info"));
520 $glo_mode2->addOption($op4);
522 $this->
form->addItem($glo_mode);
525 $this->
lng->loadLanguageModule(
"rep");
527 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
528 $this->
form->addItem($section);
533 $online->setInfo($this->
lng->txt(
"glo_online_info"));
534 $this->
form->addItem($online);
555 $section->setTitle($this->
lng->txt(
'cont_presentation'));
556 $this->
form->addItem($section);
559 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->addTileImage();
564 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_table_form"),
"table", $this->
lng->txt(
"glo_table_form_info"));
568 $snl->setMaxValue(3000);
569 $snl->setMinValue(100);
570 $snl->setMaxLength(4);
572 $snl->
setInfo($this->
lng->txt(
"glo_text_snippet_length_info"));
574 $snl->setSuffix($this->
lng->txt(
"characters"));
577 $pres_mode->addOption($op1);
578 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_full_definitions"),
"full_def", $this->
lng->txt(
"glo_full_definitions_info"));
579 $pres_mode->addOption($op2);
580 $this->
form->addItem($pres_mode);
585 if (count($tax_ids) > 0) {
587 $show_tax->
setInfo($this->
lng->txt(
"glo_show_taxonomy_info"));
588 $this->
form->addItem($show_tax);
594 $down->setInfo($this->
lng->txt(
"cont_downloads_desc"));
595 $this->
form->addItem($down);
597 if ($a_mode ==
"edit") {
598 $title->setValue($this->
object->getTitle());
599 $desc->setValue($this->
object->getDescription());
600 $online->setChecked($this->
object->getOnline());
601 $mode1 = $this->
object->getVirtualMode() ===
"none" 604 $mode2 = $this->
object->getVirtualMode() !==
"none" 605 ? $this->
object->getVirtualMode()
607 $glo_mode->setValue($mode1);
608 $glo_mode2->setValue($mode2);
609 $pres_mode->setValue($this->
object->getPresentationMode());
611 if (count($tax_ids) > 0) {
612 $show_tax->setChecked($this->
object->getShowTaxonomy());
615 $down->setChecked($this->
object->isActiveDownloads());
619 $feat->setTitle($this->
lng->txt(
'obj_features'));
620 $this->
form->addItem($feat);
633 $cols = $adv_ap->getColumnOrder();
634 if (count($cols) > 1) {
636 $this->
form->addItem($ti);
637 $ti->setValue($cols);
638 $ti->setInfo($this->
lng->txt(
"glo_col_ordering_info"));
642 $this->
form->addCommandButton(
"saveProperties", $this->
lng->txt(
"save"));
644 $this->
form->setTitle($this->
lng->txt(
"cont_glo_properties"));
645 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
654 if ($this->
form->checkInput()) {
655 $this->
object->setTitle($this->
form->getInput(
"title"));
656 $this->
object->setDescription($this->
form->getInput(
"description"));
658 $glo_mode = $this->
form->getInput(
"glo_mode") ===
"none" 659 ? $this->
form->getInput(
"glo_mode")
660 : $this->
form->getInput(
"glo_mode2");
661 $this->
object->setVirtualMode($glo_mode);
662 $this->
object->setActiveDownloads(
ilUtil::yn2tf($this->
form->getInput(
"glo_act_downloads")));
663 $this->
object->setPresentationMode($this->
form->getInput(
"pres_mode"));
664 $this->
object->setSnippetLength($this->
form->getInput(
"snippet_length"));
665 $this->
object->setShowTaxonomy($this->
form->getInput(
"show_tax"));
666 $this->
object->update();
669 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->saveTileImage();
673 $cols = $adv_ap->getColumnOrder();
674 if (count($cols) > 1) {
675 $adv_ap->saveColumnOrder($this->
form->getInput(
"field_order"));
691 if ($ecs->handleSettingsUpdate()) {
692 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
693 $this->
ctrl->redirect($this,
"properties");
696 $this->
form->setValuesByPost();
697 $this->tpl->setContent($this->
form->getHTML());
706 $ti->setMaxLength(80);
708 $this->
toolbar->addInputItem($ti,
true);
711 $this->
lng->loadLanguageModule(
"meta");
713 $session_lang = $this->term_manager->getSessionLang();
714 if ($session_lang !=
"") {
715 $s_lang = $session_lang;
717 $s_lang = $this->
user->getLanguage();
720 $si->setOptions(
$lang);
721 $si->setValue($s_lang);
722 $this->
toolbar->addInputItem($si,
true);
724 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this));
725 $this->
toolbar->addFormButton($this->
lng->txt(
"glo_add_new_term"),
"addTerm");
727 $this->
toolbar->addSeparator();
730 if ($this->
user->clipboardHasObjectsOfType(
"term")) {
732 $this->
lng->txt(
"paste"),
733 $this->
ctrl->getLinkTarget($this,
"pasteTerms")
736 $this->
lng->txt(
"clear_clipboard"),
737 $this->
ctrl->getLinkTarget($this,
"clearClipboard")
741 $this->
lng->txt(
"glo_add_from_other"),
742 $this->
ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"")
746 $this->
tabs->activateTab(
"cont_terms");
749 $this->tpl->setContent($tab->getHTML());
754 $this->
ctrl->setParameter($this,
"show_tax", 1);
755 $this->
ctrl->redirect($this,
"listTerms");
763 $this->
ctrl->setParameter($this,
"show_tax",
"");
764 $this->
ctrl->redirect($this,
"listTerms");
773 $new_term = $this->edit_request->getNewTerm();
774 if ($new_term ==
"") {
775 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_please_enter_a_term"),
true);
776 $this->
ctrl->redirect($this,
"listTerms");
780 $lang = $this->edit_request->getTermLanguage();
787 $this->term_manager->setSessionLang(
$lang);
791 $def->setTermId($term->
getId());
792 $def->setTitle($new_term);
795 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term->
getId());
796 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
797 $this->
ctrl->redirectByClass(array(
"ilglossarytermgui",
798 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
807 $this->edit_request->getDefinitionId()
811 $this->
ctrl->redirect($this,
"listTerms");
820 $this->edit_request->getDefinitionId()
824 $this->
ctrl->redirect($this,
"listTerms");
837 $this->
ctrl->setParameterByClass(
842 $link =
"[<a href='" .
843 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
844 "'>" . $this->
lng->txt(
"glo_list_usages") .
"</a>]";
845 $add =
"<br/>" . sprintf($this->
lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link;
849 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure") . $add);
851 $cgui->setFormAction($this->
ctrl->getFormAction($this));
852 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelDefinitionDeletion");
853 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"deleteDefinition");
859 $this->tpl->setCurrentBlock(
"SyntaxStyle");
860 $this->tpl->setVariable(
861 "LOCATION_SYNTAX_STYLESHEET",
864 $this->tpl->parseCurrentBlock();
867 $this->edit_request->getDefinitionId()
870 $page_gui->setTemplateOutput(
false);
871 $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
872 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->requested_ref_id);
873 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->requested_ref_id);
874 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->requested_ref_id);
875 $output = $page_gui->preview();
879 $this->edit_request->getDefinitionId(),
883 $this->tpl->setContent($cgui->getHTML());
888 $this->
ctrl->redirect($this,
"listTerms");
895 $this->
ctrl->redirect($this,
"listTerms");
902 $glo_exp->buildExportFile();
903 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
912 $glo_exp->buildExportFile();
913 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
921 $files = $this->edit_request->getFiles();
922 if (count($files) == 0) {
923 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
924 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
926 if (count($files) > 1) {
927 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
928 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
931 $file = explode(
":", $files[0]);
932 $export_dir = $this->
object->getExportDirectory($file[0]);
934 if ($this->
object->getPublicExportFile($file[0]) ==
936 $this->
object->setPublicExportFile($file[0],
"");
938 $this->
object->setPublicExportFile($file[0], $file[1]);
940 $this->
object->update();
941 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
946 $ids = $this->edit_request->getIds();
947 if (count($ids) == 0) {
948 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
949 $this->
ctrl->redirect($this,
"listTerms");
953 foreach ($ids as $term_id) {
956 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"glo_term_must_belong_to_glo"),
true);
957 $this->
ctrl->redirect($this,
"listTerms");
963 $cgui->setFormAction($this->
ctrl->getFormAction($this));
964 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
965 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelTermDeletion");
966 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"deleteTerms");
968 foreach ($ids as
$id) {
974 $this->
ctrl->setParameterByClass(
981 $add =
" (" . $this->
lng->txt(
"glo_term_reference") .
")";
983 $link =
"[<a href='" .
984 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
985 "'>" . $this->
lng->txt(
"glo_list_usages") .
"</a>]";
986 $add =
"<div class='small'>" .
987 sprintf($this->
lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link .
"</div>";
991 $cgui->addItem(
"id[]", $id, $term->
getTerm() . $add);
994 $this->tpl->setContent($cgui->getHTML());
999 $this->
ctrl->redirect($this,
"listTerms");
1004 $ids = $this->edit_request->getIds();
1005 foreach ($ids as
$id) {
1015 $this->
ctrl->redirect($this,
"listTerms");
1020 if (strtolower($this->edit_request->getBaseClass()) !=
"ilglossaryeditorgui") {
1021 parent::setLocator();
1022 } elseif (is_object($this->
object)) {
1024 if (is_object($this->term)) {
1025 $gloss_loc->setTerm($this->term);
1027 $gloss_loc->setGlossary($this->getGlossary());
1028 $gloss_loc->display();
1039 $term_id = $this->edit_request->getTermId();
1042 if ($term_glo_id != $this->
object->getId()) {
1043 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"glo_term_must_belong_to_glo"),
true);
1044 $this->
ctrl->redirect($this,
"listTerms");
1052 $def->setTermId($term->
getId());
1056 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term->
getId());
1057 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
1058 $this->
ctrl->redirectByClass(array(
"ilglossarytermgui",
1059 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1064 $this->tpl->loadStandardTemplate();
1066 $title = $this->
object->getTitle();
1069 if ($this->term_id > 0) {
1070 $this->tpl->setTitle($this->
lng->txt(
"term") .
": " .
1073 parent::setTitleAndDescription();
1075 $this->tpl->setTitle($this->
lng->txt(
"glo") .
": " . $title);
1081 $this->
help->setScreenIdComponent(
"glo");
1084 $cmd = $this->
ctrl->getCmd();
1085 $force_active = ($cmd ==
"" || $cmd ==
"listTerms");
1086 $this->tabs_gui->addTarget(
1088 $this->
ctrl->getLinkTarget($this,
"listTerms"),
1089 array(
"listTerms",
""),
1095 $force_active =
false;
1096 if ($this->
ctrl->getCmd() ==
"showSummary" ||
1097 strtolower($this->
ctrl->getNextClass()) ==
"ilinfoscreengui") {
1098 $force_active =
true;
1100 $this->tabs_gui->addTarget(
1102 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
1110 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
1111 $this->tabs_gui->addTarget(
1113 $this->
ctrl->getLinkTarget($this,
"properties"),
1120 $mdtab = $mdgui->getTab();
1122 $this->tabs_gui->addTarget(
1126 "ilobjectmetadatagui" 1136 $this->tabs_gui->addTarget(
1138 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1145 if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
1151 $this->tabs_gui->addTarget(
1153 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1154 array(
"perm",
"info",
"owner"),
1159 $this->tabs_gui->addNonTabbedLink(
1160 "presentation_view",
1161 $this->
lng->txt(
"glo_presentation_view"),
1162 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->
object->getRefId(),
1171 array(
"general_settings",
"style",
"taxonomy",
"glossaries")
1174 $this->
tabs->addSubTab(
1176 $this->
lng->txt(
"settings"),
1177 $this->
ctrl->getLinkTarget($this,
'properties')
1181 $this->
tabs->addSubTab(
1183 $this->
lng->txt(
"obj_sty"),
1184 $this->
ctrl->getLinkTargetByClass(
"ilobjectcontentstylesettingsgui",
'')
1189 $this->
tabs->addSubTab(
1191 $this->
lng->txt(
"tax_taxonomy"),
1192 $this->
ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
'')
1196 $this->
tabs->addSubTab(
1198 $this->
lng->txt(
"cont_auto_glossaries"),
1199 $this->
ctrl->getLinkTarget($this,
'editGlossaries')
1202 $this->
tabs->activateSubTab($a_active);
1207 public static function _goto(
string $a_target): void
1210 $main_tpl = $DIC->ui()->mainTemplate();
1212 $lng = $DIC->language();
1213 $ilAccess = $DIC->access();
1214 $ctrl = $DIC->ctrl();
1216 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1219 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1223 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1224 $lng->
txt(
"msg_no_perm_read_item"),
1236 $prtab->resetOffset();
1237 $prtab->writeFilterToSession();
1244 $prtab->resetOffset();
1245 $prtab->resetFilter();
1257 if ($a_tpl != null) {
1263 $this->content_style_gui->
addCss($ctpl, $this->
object->getRefId());
1273 if ($this->
object->getPublicExportFile($a_type) == $a_file) {
1274 return $this->
lng->txt(
"yes");
1287 $ctrl = $DIC->ctrl();
1290 if (count($tax_ids) > 0) {
1292 $DIC->globalScreen()->tool()->context()->current()
1293 ->addAdditionalData(
1297 $DIC->globalScreen()->tool()->context()->current()
1298 ->addAdditionalData(
1302 $DIC->globalScreen()->tool()->context()->current()
1303 ->addAdditionalData(
1307 $DIC->globalScreen()->tool()->context()->current()
1308 ->addAdditionalData(
1312 $DIC->globalScreen()->tool()->context()->current()
1313 ->addAdditionalData(
1326 if (!$tax_exp->handleCommand()) {
1342 $this->
tabs->setTabActive(
"settings");
1346 $this->
lng->txt(
"add"),
1347 $this->
ctrl->getLinkTarget($this,
"showGlossarySelector")
1352 $this->tpl->setContent($tab->getHTML());
1360 $this->
tabs->setTabActive(
"settings");
1364 $search_root_expand = $this->edit_request->getSearchRootExpand();
1365 $exp->
setExpand($search_root_expand ?: $this->tree->readRootId());
1366 $exp->setExpandTarget($this->
ctrl->getLinkTarget($this,
'showGlossarySelector'));
1367 $exp->setTargetClass(get_class($this));
1368 $exp->setCmd(
'confirmGlossarySelection');
1369 $exp->setClickableTypes(array(
"glo"));
1370 $exp->addFilter(
"glo");
1374 $this->tpl->setContent($exp->getOutput());
1380 $this->
ctrl->setParameter($this,
"glo_ref_id", $this->edit_request->getGlossaryRefId());
1381 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1382 $cgui->setHeaderText($this->
lng->txt(
"glo_link_glo_in_glo"));
1383 $cgui->setCancel($this->
lng->txt(
"no"),
"selectGlossary");
1384 $cgui->setConfirm($this->
lng->txt(
"yes"),
"selectGlossaryLink");
1385 $this->tpl->setContent($cgui->getHTML());
1393 $glo_ref_id = $this->edit_request->getGlossaryRefId();
1394 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
1404 $glos = $this->
object->getAutoGlossaries();
1405 $glo_ref_id = $this->edit_request->getGlossaryRefId();
1407 if (!in_array($glo_id, $glos)) {
1410 $this->
object->setAutoGlossaries($glos);
1411 $this->
object->update();
1413 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1414 $this->
ctrl->redirect($this,
"editGlossaries");
1419 $this->
object->removeAutoGlossary($this->edit_request->getGlossaryId());
1420 $this->
object->update();
1422 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1423 $this->
ctrl->redirect($this,
"editGlossaries");
1431 $items = $this->edit_request->getIds();
1432 if (count($items) == 0) {
1433 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1434 $this->
ctrl->redirect($this,
"listTerms");
1437 $this->
user->clipboardDeleteObjectsOfType(
"term");
1440 $time = date(
"Y-m-d H:i:s");
1442 foreach ($items as
$id) {
1443 $this->
user->addObjectToClipboard(
1454 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1455 $this->
ctrl->redirect($this,
"listTerms");
1463 $items = $this->edit_request->getIds();
1464 if (count($items) == 0) {
1465 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1466 $this->
ctrl->redirect($this,
"listTerms");
1469 $this->
user->clipboardDeleteObjectsOfType(
"term");
1472 $time = date(
"Y-m-d H:i:s");
1474 foreach ($items as
$id) {
1475 $this->
user->addObjectToClipboard(
1486 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1487 $this->
ctrl->redirect($this,
"listTerms");
1493 $this->
user->clipboardDeleteObjectsOfType(
"term");
1494 $this->
ctrl->redirect($this,
"listTerms");
1500 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1506 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1511 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1512 $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...
static setShortTextsDirty(int $a_glo_id)
Set all short texts of glossary dirty (e.g.
deleteTerm(int $a_term_id)
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
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 getLogger(string $a_component_id)
Get component logger.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
editGlossaries()
Edit automatically linked glossaries.
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)
moveDefinitionUp()
move a definition up
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initSettingsForm(string $a_mode="edit")
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
cancelDefinitionDeletion()
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
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
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)
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.
showTaxonomy()
Show taxonomy.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
moveDefinitionDown()
move a definition down
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
deactTaxonomy()
Hide Taxonomy.
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
confirmGlossarySelection()
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...
addSection(string $a_title)
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
ILIAS Style Content Object ObjectFacade $content_style_domain
static getSyntaxStylePath()
copyTerms()
Copy terms to clipboard.
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd)
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...
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)
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
selectGlossary()
Select auto glossary.
referenceTerms()
Add terms to be referenced to clipboard.
confirmDefinitionDeletion()
deletion confirmation screen
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...
delete()
delete glossary term (and all its definition objects)
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.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
static loadLanguageModule()
static _lookGlossaryID(int $term_id)
get glossary id form term id