5 require_once(
"./Services/Object/classes/class.ilObjectGUI.php");
6 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
7 require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
8 require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
9 require_once(
"./Modules/Glossary/classes/class.ilTermDefinitionEditorGUI.php");
10 require_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
97 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
99 $this->error =
$DIC[
"ilErr"];
102 $this->ctrl = $DIC->ctrl();
103 $this->lng = $DIC->language();
104 $this->
user = $DIC->user();
105 $this->toolbar = $DIC->toolbar();
106 $this->tabs = $DIC->tabs();
107 $this->setting = $DIC[
"ilSetting"];
108 $this->access = $DIC->access();
109 $this->rbacsystem = $DIC->rbac()->system();
110 $this->help = $DIC[
"ilHelp"];
114 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermPermission.php");
117 $this->ctrl->saveParameter($this,
array(
"ref_id",
"offset"));
119 $this->lng->loadLanguageModule(
"content");
120 $this->lng->loadLanguageModule(
"glo");
123 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
127 $this->term_id = (int)
$_GET[
"term_id"];
129 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
130 if ($this->term_id > 0 && $term_glo_id != $this->
object->getId()
135 $this->tax_id = $this->
object->getTaxonomyId();
136 if ($this->tax_id > 0) {
137 $this->ctrl->saveParameter($this,
array(
"show_tax",
"tax_node"));
139 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
142 if ((
int)
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() !=
$_GET[
"tax_node"]) {
143 $this->tax_node = (int)
$_GET[
"tax_node"];
152 $cmd = $this->ctrl->getCmd();
153 $next_class = $this->ctrl->getNextClass($this);
155 $this->log->debug(
"glossary term, next class " . $next_class .
", cmd: " . $cmd);
157 switch ($next_class) {
158 case 'ilobjectmetadatagui':
166 $this->tabs_gui->activateTab(
'meta_data');
167 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
169 $this->ctrl->forwardCommand($md_gui);
172 case "ilglossarytermgui":
173 if (!$this->term_perm->checkPermission(
"edit_content", $this->term_id) &&
174 !$this->term_perm->checkPermission(
"write", $this->term_id)) {
175 include_once(
"./Modules/Glossary/exceptions/class.ilGlossaryException.php");
180 $this->ctrl->setReturn($this,
"listTerms");
182 $term_gui->setGlossary($this->
object);
184 $ret = $this->ctrl->forwardCommand($term_gui);
187 case "ilinfoscreengui":
192 case "ilobjstylesheetgui":
193 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
194 $this->ctrl->setReturn($this,
"editStyleProperties");
197 if ($cmd ==
"create" ||
$_GET[
"new_type"]==
"sty") {
198 $style_gui->setCreationMode(
true);
201 if ($cmd ==
"confirmedDelete") {
202 $this->
object->setStyleSheetId(0);
203 $this->
object->update();
206 $ret = $this->ctrl->forwardCommand($style_gui);
208 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
210 $this->
object->setStyleSheetId($style_id);
211 $this->
object->update();
212 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
217 case 'ilpermissiongui':
218 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
226 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
228 $ret = $this->ctrl->forwardCommand($perm_gui);
231 case "ilcommonactiondispatchergui":
232 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
234 $this->ctrl->forwardCommand($gui);
237 case "ilobjtaxonomygui":
242 $this->tabs->activateTab(
"settings");
245 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
246 $this->ctrl->setReturn($this,
"properties");
248 $tax_gui->setMultiple(
false);
254 $tax_gui->setAssignedObject($this->
object->getId());
255 $ret = $this->ctrl->forwardCommand($tax_gui);
261 $this->tabs->activateTab(
"export");
263 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
266 $exp_gui->addFormat(
"xml");
267 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
268 $exp_gui->addCustomColumn(
269 $this->lng->txt(
"cont_public_access"),
271 "getPublicAccessColValue" 273 $exp_gui->addCustomMultiCommand(
274 $this->lng->txt(
"cont_public_access"),
278 $ret = $this->ctrl->forwardCommand($exp_gui);
281 case 'ilobjectcopygui':
283 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
286 $this->ctrl->forwardCommand($cp);
289 case "ilglossaryforeigntermcollectorgui":
290 $this->ctrl->setReturn($this,
"");
295 include_once(
"./Modules/Glossary/classes/class.ilGlossaryForeignTermCollectorGUI.php");
297 $this->ctrl->forwardCommand($coll);
301 $cmd = $this->ctrl->getCmd(
"listTerms");
303 if (($cmd ==
"create") && (
$_POST[
"new_type"] ==
"term")) {
304 $this->ctrl->setCmd(
"create");
305 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
309 if (!in_array($cmd,
array(
"quickList"))) {
310 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
320 if ($cmd ==
"redrawHeaderAction") {
321 $cmd =
"redrawHeaderActionObject";
325 $ret = $this->$cmd();
330 if (!in_array($cmd,
array(
"quickList"))) {
331 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui") {
337 $this->tpl->show(
false);
343 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
360 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
362 $form->setTarget(
"_top");
363 $form->setFormAction($this->ctrl->getFormAction($this));
364 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
370 $ti->setRequired(
true);
381 "none"=>$this->lng->txt(
"glo_mode_normal"),
382 "level"=>$this->lng->txt(
"glo_mode_level"),
383 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
387 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
388 $tm->setRequired(
true);
391 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
392 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
409 $new_type = $_REQUEST[
"new_type"];
413 $ilErr->raiseError($this->lng->txt(
"no_create_permission"),
$ilErr->MESSAGE);
416 $this->lng->loadLanguageModule($new_type);
417 $this->ctrl->setParameter($this,
"new_type", $new_type);
420 if (
$form->checkInput()) {
421 $this->ctrl->setParameter($this,
"new_type",
"");
423 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
425 $newObj->setType($new_type);
426 $newObj->setTitle(
$form->getInput(
"title"));
427 $newObj->setDescription(
$form->getInput(
"desc"));
428 $newObj->setVirtualMode(
$form->getInput(
"glo_mode"));
435 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
439 $form->setValuesByPost();
440 $this->tpl->setContent(
$form->getHtml());
454 $this->lng->loadLanguageModule(
"meta");
455 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
458 $info->enablePrivateNotes();
460 if ($this->access->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
461 $info->enableNewsEditing();
463 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
464 if ($enable_internal_rss) {
465 $info->setBlockProperty(
"news",
"settings",
true);
468 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
472 $this->ctrl->forwardCommand(
$info);
485 $lng = $DIC->language();
486 $ilAccess = $DIC->access();
488 $info->addSection(
$lng->txt(
"glo_usages"));
489 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
491 foreach ($sms as $sm) {
494 foreach ($refs as $ref) {
495 if ($link ===
false) {
496 if ($ilAccess->checkAccess(
"write",
"", $ref)) {
497 include_once(
"./Services/Link/classes/class.ilLink.php");
504 if ($link !==
false) {
505 $entry =
"<a href='" . $link .
"' target='_top'>" . $entry .
"</a>";
508 $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
517 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
518 parent::viewObject();
522 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
523 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
541 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
543 $ecs->addSettingsToForm($this->form,
'glo');
545 $this->tpl->setContent($this->form->getHTML());
555 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
560 $title->setRequired(
true);
561 $this->form->addItem(
$title);
565 $this->form->addItem($desc);
567 $this->lng->loadLanguageModule(
"rep");
569 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
575 $online->setInfo($this->lng->txt(
"glo_online_info"));
576 $this->form->addItem($online);
579 $section->setTitle($this->lng->txt(
'glo_content_settings'));
585 $op1 =
new ilRadioOption($this->lng->txt(
"glo_mode_normal"),
"none", $this->lng->txt(
"glo_mode_normal_info"));
586 $glo_mode->addOption($op1);
587 $op2 =
new ilRadioOption($this->lng->txt(
"glo_mode_level"),
"level", $this->lng->txt(
"glo_mode_level_info"));
588 $glo_mode->addOption($op2);
589 $op3 =
new ilRadioOption($this->lng->txt(
"glo_mode_subtree"),
"subtree", $this->lng->txt(
"glo_mode_subtree_info"));
590 $glo_mode->addOption($op3);
591 $this->form->addItem($glo_mode);
606 $section->setTitle($this->lng->txt(
'cont_presentation'));
612 $op1 =
new ilRadioOption($this->lng->txt(
"glo_table_form"),
"table", $this->lng->txt(
"glo_table_form_info"));
615 $snl =
new ilNumberInputGUI($this->lng->txt(
"glo_text_snippet_length"),
"snippet_length");
616 $snl->setMaxValue(3000);
617 $snl->setMinValue(100);
618 $snl->setMaxLength(4);
620 $snl->
setInfo($this->lng->txt(
"glo_text_snippet_length_info"));
624 $pres_mode->addOption($op1);
625 $op2 =
new ilRadioOption($this->lng->txt(
"glo_full_definitions"),
"full_def", $this->lng->txt(
"glo_full_definitions_info"));
626 $pres_mode->addOption($op2);
627 $this->form->addItem($pres_mode);
630 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
632 if (count($tax_ids) > 0) {
634 $show_tax->
setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
635 $this->form->addItem($show_tax);
639 $down =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"glo_act_downloads");
641 $down->setInfo($this->lng->txt(
"cont_downloads_desc"));
642 $this->form->addItem($down);
644 if ($a_mode ==
"edit") {
646 $desc->setValue($this->
object->getDescription());
647 $online->setChecked($this->
object->getOnline());
648 $glo_mode->setValue($this->
object->getVirtualMode());
649 $pres_mode->setValue($this->
object->getPresentationMode());
651 if (count($tax_ids) > 0) {
652 $show_tax->setChecked($this->
object->getShowTaxonomy());
655 $down->setChecked($this->
object->isActiveDownloads());
659 $feat->setTitle($this->lng->txt(
'obj_features'));
660 $this->form->addItem($feat);
662 include_once
'./Services/Container/classes/class.ilContainer.php';
663 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
674 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
676 $cols = $adv_ap->getColumnOrder();
677 if (count($cols) > 1) {
678 include_once
'./Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
680 $this->form->addItem($ti);
685 $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
687 $this->form->setTitle($this->lng->txt(
"cont_glo_properties"));
688 $this->form->setFormAction($this->ctrl->getFormAction($this));
698 if ($this->form->checkInput()) {
699 $this->
object->setTitle(
$_POST[
'title']);
700 $this->
object->setDescription(
$_POST[
'description']);
702 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
705 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
706 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
707 $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
708 $this->
object->update();
711 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
713 $cols = $adv_ap->getColumnOrder();
714 if (count($cols) > 1) {
715 $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
719 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
722 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
732 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
734 if ($ecs->handleSettingsUpdate()) {
736 $this->ctrl->redirect($this,
"properties");
739 $this->form->setValuesByPost();
740 $this->tpl->setContent($this->form->getHTML());
749 if (
$_GET[
"show_tax"]) {
754 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
755 $ti =
new ilTextInputGUI($this->lng->txt(
"cont_new_term"),
"new_term");
758 $this->toolbar->addInputItem($ti,
true);
761 $this->lng->loadLanguageModule(
"meta");
766 $s_lang = $this->
user->getLanguage();
768 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
771 $si->setValue($s_lang);
772 $this->toolbar->addInputItem(
$si,
true);
774 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
775 $this->toolbar->addFormButton($this->lng->txt(
"glo_add_new_term"),
"addTerm");
777 $this->toolbar->addSeparator();
780 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
781 if ($this->
user->clipboardHasObjectsOfType(
"term")) {
782 $this->toolbar->addButton(
783 $this->lng->txt(
"paste"),
784 $this->ctrl->getLinkTarget($this,
"pasteTerms")
786 $this->toolbar->addButton(
787 $this->lng->txt(
"clear_clipboard"),
788 $this->ctrl->getLinkTarget($this,
"clearClipboard")
791 $this->toolbar->addButton(
792 $this->lng->txt(
"glo_add_from_other"),
793 $this->ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"")
797 if (is_object($this->tax)) {
798 $this->toolbar->addSeparator();
799 if (
$_GET[
"show_tax"]) {
800 $this->toolbar->addButton(
801 $this->lng->txt(
"glo_hide_taxonomy"),
802 $this->ctrl->getLinkTarget($this,
"deactTaxonomy")
805 $this->toolbar->addButton(
806 $this->lng->txt(
"glo_show_taxonomy"),
807 $this->ctrl->getLinkTarget($this,
"actTaxonomy")
812 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
814 $this->tpl->setContent(
$tab->getHTML());
825 $this->ctrl->setParameter($this,
"show_tax", 1);
826 $this->ctrl->redirect($this,
"listTerms");
837 $this->ctrl->setParameter($this,
"show_tax",
"");
838 $this->ctrl->redirect($this,
"listTerms");
853 $notoperations =
array();
854 $operations =
array();
858 if (count($operations) > 0) {
859 foreach ($operations as $val) {
860 $this->tpl->setCurrentBlock(
"tbl_action_btn");
861 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
862 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
863 $this->tpl->parseCurrentBlock();
866 $this->tpl->setCurrentBlock(
"tbl_action_row");
868 $this->tpl->parseCurrentBlock();
877 if (trim(
$_POST[
"new_term"]) ==
"") {
879 $this->ctrl->redirect($this,
"listTerms");
883 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
885 $term->setGlossary($this->
object);
897 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
898 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def",
$def->getId());
899 $this->ctrl->redirectByClass(
array(
"ilglossarytermgui",
900 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
908 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
911 $definition->moveUp();
913 $this->ctrl->redirect($this,
"listTerms");
921 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
924 $definition->moveDown();
926 $this->ctrl->redirect($this,
"listTerms");
943 $this->ctrl->setParameterByClass(
948 $link =
"[<a href='" .
949 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
950 "'>" . $this->lng->txt(
"glo_list_usages") .
"</a>]";
951 $add =
"<br/>" . sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link;
954 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
956 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure") . $add);
958 $cgui->setFormAction($this->ctrl->getFormAction($this));
959 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDefinitionDeletion");
960 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteDefinition");
966 $this->tpl->setCurrentBlock(
"SyntaxStyle");
967 $this->tpl->setVariable(
968 "LOCATION_SYNTAX_STYLESHEET",
971 $this->tpl->parseCurrentBlock();
976 $page_gui->setStyleId($this->
object->getStyleSheetId());
977 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
978 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
979 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
980 $output = $page_gui->preview();
984 $this->tpl->setContent($cgui->getHTML());
989 $this->ctrl->redirect($this,
"listTerms");
996 $definition->delete();
997 $this->ctrl->redirect($this,
"listTerms");
1020 $this->ctrl->redirect($this,
"listTerms");
1032 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1034 $glo_exp->buildExportFile();
1035 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1043 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1045 $glo_exp->buildExportFile();
1047 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1057 if (!isset(
$_POST[
"file"])) {
1058 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1060 if (count(
$_POST[
"file"]) > 1) {
1061 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
1065 $export_dir = $this->
object->getExportDirectory(
$file[0]);
1067 if ($this->
object->getPublicExportFile(
$file[0]) ==
1069 $this->
object->setPublicExportFile(
$file[0],
"");
1071 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
1073 $this->
object->update();
1074 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1090 if (!isset(
$_POST[
"id"])) {
1092 $this->ctrl->redirect($this,
"listTerms");
1096 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1097 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1102 $this->ctrl->redirect($this,
"listTerms");
1107 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1109 $cgui->setFormAction($this->ctrl->getFormAction($this));
1110 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1111 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelTermDeletion");
1112 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteTerms");
1114 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1122 $this->ctrl->setParameterByClass(
1123 "ilglossarytermgui",
1129 $add =
" (" . $this->lng->txt(
"glo_term_reference") .
")";
1131 $link =
"[<a href='" .
1132 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
1133 "'>" . $this->lng->txt(
"glo_list_usages") .
"</a>]";
1134 $add =
"<div class='small'>" .
1135 sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link .
"</div>";
1139 $cgui->addItem(
"id[]", $id,
$term->getTerm() . $add);
1142 $this->tpl->setContent($cgui->getHTML());
1152 $this->ctrl->redirect($this,
"listTerms");
1160 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1171 $this->ctrl->redirect($this,
"listTerms");
1183 if (strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui") {
1184 parent::setLocator($a_tree, $a_id);
1186 if (is_object($this->
object)) {
1187 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1189 if (is_object($this->term)) {
1190 $gloss_loc->setTerm($this->term);
1192 $gloss_loc->setGlossary($this->
object);
1194 $gloss_loc->display();
1213 switch (
$_POST[
"new_type"]) {
1216 $term_gui->create();
1224 $term_gui->setGlossary($this->
object);
1230 $this->ctrl->redirect($this,
"listTerms");
1241 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1243 if ($term_glo_id != $this->
object->getId()) {
1245 $this->ctrl->redirect($this,
"listTerms");
1249 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1258 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
1259 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def",
$def->getId());
1260 $this->ctrl->redirectByClass(
array(
"ilglossarytermgui",
1261 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1266 $this->tpl->getStandardTemplate();
1268 $title = $this->
object->getTitle();
1271 if ($this->term_id > 0) {
1272 $this->tpl->setTitle($this->lng->txt(
"term") .
": " .
1275 parent::setTitleAndDescription();
1277 $this->tpl->setTitle($this->lng->txt(
"glo") .
": " .
$title);
1294 $this->help->setScreenIdComponent(
"glo");
1297 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"listTerms")
1300 $this->tabs_gui->addTarget(
1302 $this->ctrl->getLinkTarget($this,
"listTerms"),
1303 array(
"listTerms",
""),
1309 $force_active =
false;
1310 if ($this->ctrl->getCmd() ==
"showSummary" ||
1311 strtolower($this->ctrl->getNextClass()) ==
"ilinfoscreengui") {
1312 $force_active =
true;
1314 $this->tabs_gui->addTarget(
1316 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
1324 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
1325 $this->tabs_gui->addTarget(
1327 $this->ctrl->getLinkTarget($this,
"properties"),
1333 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
1335 $mdtab = $mdgui->getTab();
1337 $this->tabs_gui->addTarget(
1341 "ilobjectmetadatagui" 1351 $this->tabs_gui->addTarget(
1353 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1360 if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
1366 $this->tabs_gui->addTarget(
1368 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
1369 array(
"perm",
"info",
"owner"),
1374 $this->tabs_gui->addNonTabbedLink(
1375 "presentation_view",
1376 $this->lng->txt(
"glo_presentation_view"),
1377 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->
object->getRefID(),
1389 array(
"general_settings",
"style",
"taxonomy",
"glossaries")
1392 $this->tabs->addSubTab(
1394 $this->lng->txt(
"settings"),
1395 $this->ctrl->getLinkTarget($this,
'properties')
1399 $this->tabs->addSubTab(
1401 $this->lng->txt(
"obj_sty"),
1402 $this->ctrl->getLinkTarget($this,
'editStyleProperties')
1406 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1408 $this->tabs->addSubTab(
1410 $this->lng->txt(
"tax_taxonomy"),
1411 $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
'')
1415 $this->tabs->addSubTab(
1417 $this->lng->txt(
"cont_auto_glossaries"),
1418 $this->ctrl->getLinkTarget($this,
'editGlossaries')
1421 $this->tabs->activateSubTab($a_active);
1435 $lng = $DIC->language();
1436 $ilAccess = $DIC->access();
1439 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1440 $_GET[
"ref_id"] = $a_target;
1441 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1442 include(
"ilias.php");
1444 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1445 $_GET[
"ref_id"] = $a_target;
1446 $_GET[
"cmd"] =
"infoScreen";
1447 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1448 include(
"ilias.php");
1450 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1452 $lng->txt(
"msg_no_perm_read_item"),
1466 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1468 $prtab->resetOffset();
1469 $prtab->writeFilterToSession();
1479 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1481 $prtab->resetOffset();
1482 $prtab->resetFilter();
1496 if ($a_tpl != null) {
1502 $ctpl->setCurrentBlock(
"ContentStyle");
1504 "LOCATION_CONTENT_STYLESHEET",
1507 $ctpl->parseCurrentBlock();
1519 $this->tpl->setContent($this->form->getHTML());
1521 $this->tabs->activateTab(
"settings");
1530 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1531 $this->lng->loadLanguageModule(
"style");
1533 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1536 $fixed_style = $this->setting->get(
"fixed_content_style_id");
1537 $style_id = $this->
object->getStyleSheetId();
1539 if ($fixed_style > 0) {
1542 $this->lng->txt(
"global_fixed") .
")");
1543 $this->form->addItem($st);
1551 $st_styles[0] = $this->lng->txt(
"default");
1554 if ($style_id > 0) {
1559 $this->form->addItem($st);
1564 $this->form->addCommandButton(
1566 $this->lng->txt(
"style_edit_style")
1568 $this->form->addCommandButton(
1570 $this->lng->txt(
"style_delete_style")
1584 $style_sel =
new ilSelectInputGUI($this->lng->txt(
"style_current_style"),
"style_id");
1586 $style_sel->setValue($style_id);
1587 $this->form->addItem($style_sel);
1589 $this->form->addCommandButton(
1590 "saveStyleSettings",
1591 $this->lng->txt(
"save")
1593 $this->form->addCommandButton(
1595 $this->lng->txt(
"sty_create_ind_style")
1599 $this->form->setTitle($this->lng->txt(
"glo_style"));
1600 $this->form->setFormAction($this->ctrl->getFormAction($this));
1608 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1616 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1624 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1632 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1633 if ($this->setting->get(
"fixed_content_style_id") <= 0 &&
1635 || $this->
object->getStyleSheetId() == 0)) {
1637 $this->
object->update();
1640 $this->ctrl->redirect($this,
"editStyleProperties");
1648 if ($this->
object->getPublicExportFile(
$a_type) == $a_file) {
1649 return $this->lng->txt(
"yes");
1663 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1665 if (count($tax_ids) > 0) {
1666 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1674 if (!$tax_exp->handleCommand()) {
1676 $this->tpl->setLeftNavContent($tax_exp->getHTML() .
" ");
1693 $this->tabs->setTabActive(
"settings");
1696 $this->toolbar->addButton(
1697 $this->lng->txt(
"add"),
1698 $this->ctrl->getLinkTarget($this,
"showGlossarySelector")
1701 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAutoLinkTableGUI.php");
1704 $this->tpl->setContent(
$tab->getHTML());
1715 $this->tabs->setTabActive(
"settings");
1718 include_once
'Services/Search/classes/class.ilSearchRootSelector.php';
1721 $exp->
setExpand(
$_GET[
"search_root_expand"] ?
$_GET[
"search_root_expand"] : $this->tree->readRootId());
1722 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showGlossarySelector'));
1723 $exp->setTargetClass(get_class($this));
1724 $exp->setCmd(
'confirmGlossarySelection');
1725 $exp->setClickableTypes(
array(
"glo"));
1726 $exp->addFilter(
"glo");
1730 $this->tpl->setContent($exp->getOutput());
1738 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1740 $this->ctrl->setParameter($this,
"glo_ref_id",
$_GET[
"root_id"]);
1741 $cgui->setFormAction($this->ctrl->getFormAction($this));
1742 $cgui->setHeaderText($this->lng->txt(
"glo_link_glo_in_glo"));
1743 $cgui->setCancel($this->lng->txt(
"no"),
"selectGlossary");
1744 $cgui->setConfirm($this->lng->txt(
"yes"),
"selectGlossaryLink");
1745 $this->tpl->setContent($cgui->getHTML());
1756 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1758 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
1771 $glos = $this->
object->getAutoGlossaries();
1772 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1774 if (!in_array($glo_id, $glos)) {
1777 $this->
object->setAutoGlossaries($glos);
1778 $this->
object->update();
1781 $this->ctrl->redirect($this,
"editGlossaries");
1792 $this->
object->removeAutoGlossary((
int)
$_GET[
"glo_id"]);
1793 $this->
object->update();
1796 $this->ctrl->redirect($this,
"editGlossaries");
1808 if (!is_array($items)) {
1810 $this->ctrl->redirect($this,
"listTerms");
1813 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1814 $this->
user->clipboardDeleteObjectsOfType(
"term");
1819 foreach ($items as
$id) {
1820 $this->
user->addObjectToClipboard(
1831 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1832 $this->ctrl->redirect($this,
"listTerms");
1844 if (!is_array($items)) {
1846 $this->ctrl->redirect($this,
"listTerms");
1849 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1850 $this->
user->clipboardDeleteObjectsOfType(
"term");
1855 foreach ($items as
$id) {
1856 $this->
user->addObjectToClipboard(
1867 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1868 $this->ctrl->redirect($this,
"listTerms");
1880 $this->
user->clipboardDeleteObjectsOfType(
"term");
1881 $this->ctrl->redirect($this,
"listTerms");
1889 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1891 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1896 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1898 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1904 $this->ctrl->redirect($this,
"listTerms");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
static getInstance()
Get instance.
This class represents an option in a radio group.
showInfoScreen()
Show info screen.
saveObject()
save new content object to db
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
setSettingsSubTabs($a_active)
Set sub tabs.
setValue($a_value)
Set Value.
setTemplateOutput($a_output=true)
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
cancelTermDeletion()
cancel deletion of object
deleteTerm($a_term_id)
Delete term.
GUI class for the workflow of copying objects.
const TITLE_LENGTH
max length of object title
deleteTerms()
delete selected terms
editGlossaries()
Edit automatically linked glossaries.
static getNumberOfUsages($a_term_id)
Get number of usages.
moveDefinitionUp()
move a definiton up
cancelDefinitionDeletion()
initSettingsForm($a_mode="edit")
Init settings form.
Taxonomy explorer GUI class.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
executeCommand()
execute command
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
removeGlossary()
Remove lm glossary.
exportHTML()
create html package
createObject()
create new object form
export()
export content object
addTerm($a_term_id)
Add term.
showActions($a_actions)
show possible action (form buttons)
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
setInfo($a_info)
Set Info.
static _getAllReferences($a_id)
get all reference ids of object
deleteStyle()
Delete Style.
editStyleProperties()
Edit style properties.
showTaxonomy()
Show taxonomy.
static _lookupStandard($a_id)
Lookup standard flag.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export User Interface Class.
moveDefinitionDown()
move a definiton down
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
prepareOutput($a_show_subobjects=true)
prepare output
TableGUI class for auto link glossaries.
setValue($a_value)
Set Value.
deactTaxonomy()
Hide Taxonomy.
if(isset($_POST['submit'])) $form
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
confirmGlossarySelection()
Confirm glossary selection.
actTaxonomy()
Show Taxonomy.
selectGlossaryLink()
Select a glossary and link all its terms.
create()
create new (subobject) in glossary
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
saveProperties()
save properties
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
omitLocator($a_omit=true)
setSize($a_size)
Set Size.
static addUsagesToInfo($info, $glo_id)
Add usages to info.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
GUI class for glossary terms.
setMaxLength($a_maxlength)
Set Max Length.
confirmTermDeletion()
confirm term deletion
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
initCreateForm($a_new_type)
Create styles array
The data for the language used.
addDefinition()
add definition
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setLocator($a_tree="", $a_id="")
set Locator
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static _lookGlossaryID($term_id)
get glossary id form term id
Class ilGlossaryDefinition.
createStyle()
Create Style.
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
properties()
edit properties of object (admin form)
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
This class represents a non editable value in a property form.
Create new PHPExcel object
obj_idprivate
Class ilObjStyleSheetGUI.
static _goto($a_target)
redirect script
This class represents a text area property in a property form.
Glossary definition page GUI class.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
selectGlossary()
Select lm glossary.
getCreationMode()
get creation mode
referenceTerms()
Reference terms.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
confirmDefinitionDeletion()
deletion confirmation screen
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Export class for content objects.
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
static yn2tf($a_yn)
convert "y"/"n" to true/false
applyFilter()
Apply filter.
showGlossarySelector()
Select LM Glossary.
static setAction($a_action)
publishExportFile()
download export file
static redirect($a_script)
addHeaderAction()
Add header action menu.
saveStyleSettings()
Save style settings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static _lookGlossaryTerm($term_id)
get glossary term
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Class ilECSGlossarySettings.
initStylePropertiesForm()
Init style properties form.
Confirmation screen class.
clearClipboard()
Clear clipboard.
static loadLanguageModule()
Load language module.