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":
199 $this->
tabs->activateTab(
"settings");
202 $this->
ctrl->setReturn($this,
"properties");
204 $tax_gui->setMultiple(
false);
206 $tax_gui->setAssignedObject($this->
object->getId());
207 $ret = $this->
ctrl->forwardCommand($tax_gui);
213 $this->
tabs->activateTab(
"export");
217 $exp_gui->addFormat(
"xml");
218 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
219 $exp_gui->addCustomColumn(
220 $this->
lng->txt(
"cont_public_access"),
222 "getPublicAccessColValue" 224 $exp_gui->addCustomMultiCommand(
225 $this->
lng->txt(
"cont_public_access"),
229 $ret = $this->
ctrl->forwardCommand($exp_gui);
232 case 'ilobjectcopygui':
236 $this->
ctrl->forwardCommand($cp);
239 case "ilglossaryforeigntermcollectorgui":
240 $this->
ctrl->setReturn($this,
"");
246 $this->
ctrl->forwardCommand($coll);
250 $cmd = $this->
ctrl->getCmd(
"listTerms");
252 if (($cmd ==
"create") && ($this->edit_request->getNewType() ==
"term")) {
253 $this->
ctrl->setCmd(
"create");
254 $this->
ctrl->setCmdClass(
"ilGlossaryTermGUI");
258 if ($cmd !=
"quickList") {
259 if ($this->in_administration ||
269 if ($cmd ==
"redrawHeaderAction") {
270 $cmd =
"redrawHeaderActionObject";
279 if ($cmd !=
"quickList") {
281 $this->tpl->printToStdout();
284 $this->tpl->printToStdout(
false);
295 if (isset($glossary) && $glossary->getType() ==
"glo") {
311 $form->
setTitle($this->
lng->txt($new_type .
"_new"));
317 $ti->setRequired(
true);
342 $new_type = $this->edit_request->getNewType();
349 $this->
lng->loadLanguageModule($new_type);
350 $this->
ctrl->setParameter($this,
"new_type", $new_type);
354 $this->
ctrl->setParameter($this,
"new_type",
"");
357 $newObj->setType($new_type);
358 $newObj->setTitle($form->
getInput(
"title"));
359 $newObj->setDescription($form->
getInput(
"desc"));
360 $newObj->setVirtualMode(
"none");
368 $newObj->applyDidacticTemplate($dtpl);
372 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"glo_added"),
true);
373 $this->
ctrl->setParameterByClass(
374 ilObjGlossaryGUI::class,
378 $this->
ctrl->redirectByClass(
379 [ilGlossaryEditorGUI::class, ilObjGlossaryGUI::class],
386 $this->tpl->setContent($form->
getHTML());
394 $this->
lng->loadLanguageModule(
"meta");
397 $info->enablePrivateNotes();
399 if ($this->
access->checkAccess(
"write",
"", $this->requested_ref_id)) {
400 $info->enableNewsEditing();
402 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
403 if ($enable_internal_rss) {
404 $info->setBlockProperty(
"news",
"settings",
true);
407 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
409 self::addUsagesToInfo($info, $this->
object->getId());
411 $this->
ctrl->forwardCommand($info);
423 $lng = $DIC->language();
424 $ilAccess = $DIC->access();
428 foreach ($sms as $sm) {
431 foreach ($refs as $ref) {
432 if ($link ===
false && $ilAccess->checkAccess(
"write",
"", $ref)) {
438 if ($link !==
false) {
439 $entry =
"<a href='" . $link .
"' target='_top'>" . $entry .
"</a>";
449 if ($this->in_administration) {
450 parent::viewObject();
454 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
469 $ecs->addSettingsToForm($this->
form,
'glo');
471 $this->tpl->setContent($this->
form->getHTML());
475 string $a_mode =
"edit" 483 $title->setRequired(
true);
484 $this->
form->addItem($title);
488 $this->
form->addItem($desc);
494 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_mode_normal"),
"none", $this->
lng->txt(
"glo_mode_normal_info"));
495 $glo_mode->addOption($op1);
496 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_collection"),
"coll", $this->
lng->txt(
"glo_collection_info"));
497 $glo_mode->addOption($op2);
500 $glo_mode2->setValue(
"level");
501 $op3 =
new ilRadioOption($this->
lng->txt(
"glo_mode_level"),
"level", $this->
lng->txt(
"glo_mode_level_info"));
502 $glo_mode2->addOption($op3);
503 $op4 =
new ilRadioOption($this->
lng->txt(
"glo_mode_subtree"),
"subtree", $this->
lng->txt(
"glo_mode_subtree_info"));
504 $glo_mode2->addOption($op4);
506 $this->
form->addItem($glo_mode);
509 $this->
lng->loadLanguageModule(
"rep");
511 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
512 $this->
form->addItem($section);
517 $online->setInfo($this->
lng->txt(
"glo_online_info"));
518 $this->
form->addItem($online);
539 $section->setTitle($this->
lng->txt(
'cont_presentation'));
540 $this->
form->addItem($section);
543 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->addTileImage();
548 $op1 =
new ilRadioOption($this->
lng->txt(
"glo_table_form"),
"table", $this->
lng->txt(
"glo_table_form_info"));
552 $snl->setMaxValue(3000);
553 $snl->setMinValue(100);
554 $snl->setMaxLength(4);
556 $snl->
setInfo($this->
lng->txt(
"glo_text_snippet_length_info"));
558 $snl->setSuffix($this->
lng->txt(
"characters"));
561 $pres_mode->addOption($op1);
562 $op2 =
new ilRadioOption($this->
lng->txt(
"glo_full_definitions"),
"full_def", $this->
lng->txt(
"glo_full_definitions_info"));
563 $pres_mode->addOption($op2);
564 $this->
form->addItem($pres_mode);
569 if (count($tax_ids) > 0) {
571 $show_tax->
setInfo($this->
lng->txt(
"glo_show_taxonomy_info"));
572 $this->
form->addItem($show_tax);
578 $down->setInfo($this->
lng->txt(
"cont_downloads_desc"));
579 $this->
form->addItem($down);
581 if ($a_mode ==
"edit") {
582 $title->setValue($this->
object->getTitle());
583 $desc->setValue($this->
object->getDescription());
584 $online->setChecked($this->
object->getOnline());
585 $mode1 = $this->
object->getVirtualMode() ===
"none" 588 $mode2 = $this->
object->getVirtualMode() !==
"none" 589 ? $this->
object->getVirtualMode()
591 $glo_mode->setValue($mode1);
592 $glo_mode2->setValue($mode2);
593 $pres_mode->setValue($this->
object->getPresentationMode());
595 if (count($tax_ids) > 0) {
596 $show_tax->setChecked($this->
object->getShowTaxonomy());
599 $down->setChecked($this->
object->isActiveDownloads());
603 $feat->setTitle($this->
lng->txt(
'obj_features'));
604 $this->
form->addItem($feat);
617 $cols = $adv_ap->getColumnOrder();
618 if (count($cols) > 1) {
620 $this->
form->addItem($ti);
621 $ti->setValue($cols);
622 $ti->setInfo($this->
lng->txt(
"glo_col_ordering_info"));
626 $this->
form->addCommandButton(
"saveProperties", $this->
lng->txt(
"save"));
628 $this->
form->setTitle($this->
lng->txt(
"cont_glo_properties"));
629 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
638 if ($this->
form->checkInput()) {
639 $this->
object->setTitle($this->
form->getInput(
"title"));
640 $this->
object->setDescription($this->
form->getInput(
"description"));
642 $glo_mode = $this->
form->getInput(
"glo_mode") ===
"none" 643 ? $this->
form->getInput(
"glo_mode")
644 : $this->
form->getInput(
"glo_mode2");
645 $this->
object->setVirtualMode($glo_mode);
646 $this->
object->setActiveDownloads(
ilUtil::yn2tf($this->
form->getInput(
"glo_act_downloads")));
647 $this->
object->setPresentationMode($this->
form->getInput(
"pres_mode"));
648 $this->
object->setSnippetLength($this->
form->getInput(
"snippet_length"));
649 $this->
object->setShowTaxonomy($this->
form->getInput(
"show_tax"));
650 $this->
object->update();
653 $obj_service->commonSettings()->legacyForm($this->
form, $this->
object)->saveTileImage();
657 $cols = $adv_ap->getColumnOrder();
658 if (count($cols) > 1) {
659 $adv_ap->saveColumnOrder($this->
form->getInput(
"field_order"));
675 if ($ecs->handleSettingsUpdate()) {
676 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
677 $this->
ctrl->redirect($this,
"properties");
680 $this->
form->setValuesByPost();
681 $this->tpl->setContent($this->
form->getHTML());
690 $ti->setMaxLength(80);
692 $this->
toolbar->addInputItem($ti,
true);
695 $this->
lng->loadLanguageModule(
"meta");
697 $session_lang = $this->term_manager->getSessionLang();
698 if ($session_lang !=
"") {
699 $s_lang = $session_lang;
701 $s_lang = $this->
user->getLanguage();
704 $si->setOptions(
$lang);
705 $si->setValue($s_lang);
706 $this->
toolbar->addInputItem($si,
true);
708 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this));
709 $this->
toolbar->addFormButton($this->
lng->txt(
"glo_add_new_term"),
"addTerm");
711 $this->
toolbar->addSeparator();
714 if ($this->
user->clipboardHasObjectsOfType(
"term")) {
716 $this->
lng->txt(
"paste"),
717 $this->
ctrl->getLinkTarget($this,
"pasteTerms")
720 $this->
lng->txt(
"clear_clipboard"),
721 $this->
ctrl->getLinkTarget($this,
"clearClipboard")
725 $this->
lng->txt(
"glo_add_from_other"),
726 $this->
ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"")
730 $this->
tabs->activateTab(
"cont_terms");
733 $this->tpl->setContent($tab->getHTML());
738 $this->
ctrl->setParameter($this,
"show_tax", 1);
739 $this->
ctrl->redirect($this,
"listTerms");
747 $this->
ctrl->setParameter($this,
"show_tax",
"");
748 $this->
ctrl->redirect($this,
"listTerms");
757 $new_term = $this->edit_request->getNewTerm();
758 if ($new_term ==
"") {
759 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_please_enter_a_term"),
true);
760 $this->
ctrl->redirect($this,
"listTerms");
764 $lang = $this->edit_request->getTermLanguage();
771 $this->term_manager->setSessionLang(
$lang);
775 $def->setTermId($term->
getId());
776 $def->setTitle($new_term);
779 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term->
getId());
780 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
781 $this->
ctrl->redirectByClass(array(
"ilglossarytermgui",
782 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
791 $this->edit_request->getDefinitionId()
795 $this->
ctrl->redirect($this,
"listTerms");
804 $this->edit_request->getDefinitionId()
808 $this->
ctrl->redirect($this,
"listTerms");
821 $this->
ctrl->setParameterByClass(
826 $link =
"[<a href='" .
827 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
828 "'>" . $this->
lng->txt(
"glo_list_usages") .
"</a>]";
829 $add =
"<br/>" . sprintf($this->
lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link;
833 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure") . $add);
835 $cgui->setFormAction($this->
ctrl->getFormAction($this));
836 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelDefinitionDeletion");
837 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"deleteDefinition");
843 $this->tpl->setCurrentBlock(
"SyntaxStyle");
844 $this->tpl->setVariable(
845 "LOCATION_SYNTAX_STYLESHEET",
848 $this->tpl->parseCurrentBlock();
851 $this->edit_request->getDefinitionId()
854 $page_gui->setTemplateOutput(
false);
855 $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
856 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->requested_ref_id);
857 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->requested_ref_id);
858 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->requested_ref_id);
859 $output = $page_gui->preview();
863 $this->edit_request->getDefinitionId(),
867 $this->tpl->setContent($cgui->getHTML());
872 $this->
ctrl->redirect($this,
"listTerms");
879 $this->
ctrl->redirect($this,
"listTerms");
886 $glo_exp->buildExportFile();
887 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
896 $glo_exp->buildExportFile();
897 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
905 $files = $this->edit_request->getFiles();
906 if (count($files) == 0) {
907 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
908 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
910 if (count($files) > 1) {
911 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_select_max_one_item"),
true);
912 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
915 $file = explode(
":", $files[0]);
916 $export_dir = $this->
object->getExportDirectory($file[0]);
918 if ($this->
object->getPublicExportFile($file[0]) ==
920 $this->
object->setPublicExportFile($file[0],
"");
922 $this->
object->setPublicExportFile($file[0], $file[1]);
924 $this->
object->update();
925 $this->
ctrl->redirectByClass(
"ilexportgui",
"");
930 $ids = $this->edit_request->getIds();
931 if (count($ids) == 0) {
932 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
933 $this->
ctrl->redirect($this,
"listTerms");
937 foreach ($ids as $term_id) {
940 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"glo_term_must_belong_to_glo"),
true);
941 $this->
ctrl->redirect($this,
"listTerms");
947 $cgui->setFormAction($this->
ctrl->getFormAction($this));
948 $cgui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
949 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelTermDeletion");
950 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"deleteTerms");
952 foreach ($ids as
$id) {
958 $this->
ctrl->setParameterByClass(
965 $add =
" (" . $this->
lng->txt(
"glo_term_reference") .
")";
967 $link =
"[<a href='" .
968 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
969 "'>" . $this->
lng->txt(
"glo_list_usages") .
"</a>]";
970 $add =
"<div class='small'>" .
971 sprintf($this->
lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link .
"</div>";
975 $cgui->addItem(
"id[]", $id, $term->
getTerm() . $add);
978 $this->tpl->setContent($cgui->getHTML());
983 $this->
ctrl->redirect($this,
"listTerms");
988 $ids = $this->edit_request->getIds();
989 foreach ($ids as
$id) {
999 $this->
ctrl->redirect($this,
"listTerms");
1004 if (strtolower($this->edit_request->getBaseClass()) !=
"ilglossaryeditorgui") {
1005 parent::setLocator();
1006 } elseif (is_object($this->
object)) {
1008 if (is_object($this->term)) {
1009 $gloss_loc->setTerm($this->term);
1011 $gloss_loc->setGlossary($this->getGlossary());
1012 $gloss_loc->display();
1023 $term_id = $this->edit_request->getTermId();
1026 if ($term_glo_id != $this->
object->getId()) {
1027 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"glo_term_must_belong_to_glo"),
true);
1028 $this->
ctrl->redirect($this,
"listTerms");
1036 $def->setTermId($term->
getId());
1040 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term->
getId());
1041 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
1042 $this->
ctrl->redirectByClass(array(
"ilglossarytermgui",
1043 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1048 $this->tpl->loadStandardTemplate();
1050 $title = $this->
object->getTitle();
1053 if ($this->term_id > 0) {
1054 $this->tpl->setTitle($this->
lng->txt(
"term") .
": " .
1057 parent::setTitleAndDescription();
1059 $this->tpl->setTitle($this->
lng->txt(
"glo") .
": " . $title);
1065 $this->
help->setScreenIdComponent(
"glo");
1068 $cmd = $this->
ctrl->getCmd();
1069 $force_active = ($cmd ==
"" || $cmd ==
"listTerms");
1070 $this->tabs_gui->addTarget(
1072 $this->
ctrl->getLinkTarget($this,
"listTerms"),
1073 array(
"listTerms",
""),
1079 $force_active =
false;
1080 if ($this->
ctrl->getCmd() ==
"showSummary" ||
1081 strtolower($this->
ctrl->getNextClass()) ==
"ilinfoscreengui") {
1082 $force_active =
true;
1084 $this->tabs_gui->addTarget(
1086 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
1094 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
1095 $this->tabs_gui->addTarget(
1097 $this->
ctrl->getLinkTarget($this,
"properties"),
1104 $mdtab = $mdgui->getTab();
1106 $this->tabs_gui->addTarget(
1110 "ilobjectmetadatagui" 1120 $this->tabs_gui->addTarget(
1122 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1129 if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
1135 $this->tabs_gui->addTarget(
1137 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1138 array(
"perm",
"info",
"owner"),
1143 $this->tabs_gui->addNonTabbedLink(
1144 "presentation_view",
1145 $this->
lng->txt(
"glo_presentation_view"),
1146 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->
object->getRefId(),
1155 array(
"general_settings",
"style",
"taxonomy",
"glossaries")
1158 $this->
tabs->addSubTab(
1160 $this->
lng->txt(
"settings"),
1161 $this->
ctrl->getLinkTarget($this,
'properties')
1165 $this->
tabs->addSubTab(
1167 $this->
lng->txt(
"obj_sty"),
1168 $this->
ctrl->getLinkTargetByClass(
"ilobjectcontentstylesettingsgui",
'')
1173 $this->
tabs->addSubTab(
1175 $this->
lng->txt(
"tax_taxonomy"),
1176 $this->
ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
'')
1180 $this->
tabs->addSubTab(
1182 $this->
lng->txt(
"cont_auto_glossaries"),
1183 $this->
ctrl->getLinkTarget($this,
'editGlossaries')
1186 $this->
tabs->activateSubTab($a_active);
1191 public static function _goto(
string $a_target): void
1194 $main_tpl = $DIC->ui()->mainTemplate();
1196 $lng = $DIC->language();
1197 $ilAccess = $DIC->access();
1198 $ctrl = $DIC->ctrl();
1200 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1203 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1207 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1208 $lng->
txt(
"msg_no_perm_read_item"),
1220 $prtab->resetOffset();
1221 $prtab->writeFilterToSession();
1228 $prtab->resetOffset();
1229 $prtab->resetFilter();
1241 if ($a_tpl != null) {
1247 $this->content_style_gui->
addCss($ctpl, $this->
object->getRefId());
1257 if ($this->
object->getPublicExportFile($a_type) == $a_file) {
1258 return $this->
lng->txt(
"yes");
1271 $ctrl = $DIC->ctrl();
1274 if (count($tax_ids) > 0) {
1276 $DIC->globalScreen()->tool()->context()->current()
1277 ->addAdditionalData(
1281 $DIC->globalScreen()->tool()->context()->current()
1282 ->addAdditionalData(
1286 $DIC->globalScreen()->tool()->context()->current()
1287 ->addAdditionalData(
1291 $DIC->globalScreen()->tool()->context()->current()
1292 ->addAdditionalData(
1296 $DIC->globalScreen()->tool()->context()->current()
1297 ->addAdditionalData(
1310 if (!$tax_exp->handleCommand()) {
1326 $this->
tabs->setTabActive(
"settings");
1330 $this->
lng->txt(
"add"),
1331 $this->
ctrl->getLinkTarget($this,
"showGlossarySelector")
1336 $this->tpl->setContent($tab->getHTML());
1344 $this->
tabs->setTabActive(
"settings");
1348 $search_root_expand = $this->edit_request->getSearchRootExpand();
1349 $exp->
setExpand($search_root_expand ?: $this->tree->readRootId());
1350 $exp->setExpandTarget($this->
ctrl->getLinkTarget($this,
'showGlossarySelector'));
1351 $exp->setTargetClass(get_class($this));
1352 $exp->setCmd(
'confirmGlossarySelection');
1353 $exp->setClickableTypes(array(
"glo"));
1354 $exp->addFilter(
"glo");
1358 $this->tpl->setContent($exp->getOutput());
1364 $this->
ctrl->setParameter($this,
"glo_ref_id", $this->edit_request->getGlossaryRefId());
1365 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1366 $cgui->setHeaderText($this->
lng->txt(
"glo_link_glo_in_glo"));
1367 $cgui->setCancel($this->
lng->txt(
"no"),
"selectGlossary");
1368 $cgui->setConfirm($this->
lng->txt(
"yes"),
"selectGlossaryLink");
1369 $this->tpl->setContent($cgui->getHTML());
1377 $glo_ref_id = $this->edit_request->getGlossaryRefId();
1378 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
1388 $glos = $this->
object->getAutoGlossaries();
1389 $glo_ref_id = $this->edit_request->getGlossaryRefId();
1391 if (!in_array($glo_id, $glos)) {
1394 $this->
object->setAutoGlossaries($glos);
1395 $this->
object->update();
1397 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1398 $this->
ctrl->redirect($this,
"editGlossaries");
1403 $this->
object->removeAutoGlossary($this->edit_request->getGlossaryId());
1404 $this->
object->update();
1406 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1407 $this->
ctrl->redirect($this,
"editGlossaries");
1415 $items = $this->edit_request->getIds();
1416 if (count($items) == 0) {
1417 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1418 $this->
ctrl->redirect($this,
"listTerms");
1421 $this->
user->clipboardDeleteObjectsOfType(
"term");
1424 $time = date(
"Y-m-d H:i:s");
1426 foreach ($items as
$id) {
1427 $this->
user->addObjectToClipboard(
1438 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1439 $this->
ctrl->redirect($this,
"listTerms");
1447 $items = $this->edit_request->getIds();
1448 if (count($items) == 0) {
1449 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1450 $this->
ctrl->redirect($this,
"listTerms");
1453 $this->
user->clipboardDeleteObjectsOfType(
"term");
1456 $time = date(
"Y-m-d H:i:s");
1458 foreach ($items as
$id) {
1459 $this->
user->addObjectToClipboard(
1470 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1471 $this->
ctrl->redirect($this,
"listTerms");
1477 $this->
user->clipboardDeleteObjectsOfType(
"term");
1478 $this->
ctrl->redirect($this,
"listTerms");
1484 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1490 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1495 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1496 $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