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");
36 function ilObjGlossaryGUI($a_data,$a_id = 0,$a_call_by_reference =
true, $a_prepare_output =
true)
41 $this->ctrl->saveParameter($this, array(
"ref_id",
"offset"));
42 $lng->loadLanguageModule(
"content");
49 $this->term_id = (int)
$_GET[
"term_id"];
51 if ($this->term_id > 0 && $term_glo_id != $this->object->getId())
65 $cmd = $this->ctrl->getCmd();
66 $next_class = $this->ctrl->getNextClass($this);
71 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
73 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
81 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
83 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
84 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
86 $this->ctrl->forwardCommand($md_gui);
89 case "ilglossarytermgui":
91 $this->ctrl->setReturn($this,
"listTerms");
93 $term_gui->setGlossary($this->
object);
95 $ret =& $this->ctrl->forwardCommand($term_gui);
98 case "ilinfoscreengui":
103 case "ilobjstylesheetgui":
104 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
105 $this->ctrl->setReturn($this,
"editStyleProperties");
106 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
108 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
110 $style_gui->setCreationMode(
true);
113 if (
$cmd ==
"confirmedDelete")
115 $this->
object->setStyleSheetId(0);
116 $this->
object->update();
119 $ret = $this->ctrl->forwardCommand($style_gui);
121 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
124 $this->
object->setStyleSheetId($style_id);
125 $this->
object->update();
126 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
131 case 'ilpermissiongui':
132 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
143 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
145 $ret =& $this->ctrl->forwardCommand($perm_gui);
148 case "ilcommonactiondispatchergui":
149 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
151 $this->ctrl->forwardCommand($gui);
154 case "ilobjtaxonomygui":
159 $ilTabs->activateTab(
"settings");
162 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
163 $this->ctrl->setReturn($this,
"properties");
165 $tax_gui->setAssignedObject($this->object->getId());
166 $ret = $this->ctrl->forwardCommand($tax_gui);
172 $ilTabs->activateTab(
"export");
174 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
177 $exp_gui->addFormat(
"xml");
178 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
179 $exp_gui->addCustomColumn($lng->txt(
"cont_public_access"),
180 $this,
"getPublicAccessColValue");
181 $exp_gui->addCustomMultiCommand($lng->txt(
"cont_public_access"),
182 $this,
"publishExportFile");
183 $ret = $this->ctrl->forwardCommand($exp_gui);
187 $cmd = $this->ctrl->getCmd(
"listTerms");
189 if ((
$cmd ==
"create") && (
$_POST[
"new_type"] ==
"term"))
191 $this->ctrl->setCmd(
"create");
192 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
198 if (!in_array(
$cmd, array(
"frameset",
"quickList")))
200 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
219 if (!in_array(
$cmd, array(
"frameset",
"quickList")))
221 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")
231 $this->tpl->show(
false);
237 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
254 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
256 $form->setTarget(
"_top");
257 $form->setFormAction($this->ctrl->getFormAction($this));
258 $form->setTitle($this->lng->txt($a_new_type.
"_new"));
264 $ti->setRequired(
true);
275 "none"=>$this->lng->txt(
"glo_mode_normal"),
276 "level"=>$this->lng->txt(
"glo_mode_level"),
277 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
281 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
282 $tm->setRequired(
true);
285 $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
286 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
308 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
311 $this->lng->loadLanguageModule($new_type);
312 $this->ctrl->setParameter($this,
"new_type", $new_type);
315 if ($form->checkInput())
317 $this->ctrl->setParameter($this,
"new_type",
"");
319 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
321 $newObj->setType($new_type);
322 $newObj->setTitle($form->getInput(
"title"));
323 $newObj->setDescription($form->getInput(
"desc"));
324 $newObj->setVirtualMode($form->getInput(
"glo_mode"));
331 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
335 $form->setValuesByPost();
336 $tpl->setContent($form->getHtml());
352 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
355 $this->lng->loadLanguageModule($new_type);
356 $this->ctrl->setParameter($this,
"new_type", $new_type);
359 if ($form->checkInput())
361 $this->ctrl->setParameter($this,
"new_type",
"");
362 $upload = $_FILES[
"importfile"];
365 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
367 $newObj->setType($new_type);
368 $newObj->setTitle($upload[
"name"]);
369 $newObj->create(
true);
374 $newObj->createImportDirectory();
377 $file = pathinfo($upload[
"name"]);
378 $full_path = $newObj->getImportDirectory().
"/".$upload[
"name"];
387 $subdir = basename(
$file[
"basename"],
".".
$file[
"extension"]);
388 $xml_file = $newObj->getImportDirectory().
"/".$subdir.
"/".$subdir.
".xml";
393 if (is_file($newObj->getImportDirectory().
"/".$subdir.
"/manifest.xml"))
395 include_once(
"./Services/Export/classes/class.ilImport.php");
397 $map = $imp->getMapping();
398 $map->addMapping(
"Modules/Glossary",
"glo",
"new_id", $newObj->getId());
399 $imp->importObject($newObj, $full_path, $upload[
"name"],
"glo",
400 "Modules/Glossary",
true);
402 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
406 if (!is_dir($newObj->getImportDirectory().
"/".$subdir))
408 $this->ilias->raiseError(sprintf($this->lng->txt(
"cont_no_subdir_in_zip"), $subdir),
409 $this->ilias->error_obj->MESSAGE);
413 if (!is_file($xml_file))
415 $this->ilias->raiseError(sprintf($this->lng->txt(
"cont_zip_file_invalid"), $subdir.
"/".$subdir.
".xml"),
416 $this->ilias->error_obj->MESSAGE);
419 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
421 $contParser->startParsing();
428 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
432 $form->setValuesByPost();
433 $tpl->setContent($form->getHtml());
449 $this->lng->loadLanguageModule(
"meta");
450 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
453 $info->enablePrivateNotes();
455 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
457 $info->enableNewsEditing();
459 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
460 if ($enable_internal_rss)
462 $info->setBlockProperty(
"news",
"settings",
true);
465 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
469 $this->ctrl->forwardCommand($info);
480 global
$lng, $ilAccess;
482 $info->addSection($lng->txt(
"glo_usages"));
483 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
485 foreach ($sms as $sm)
489 foreach ($refs as $ref)
493 if ($ilAccess->checkAccess(
"write",
"", $ref))
495 include_once(
"./Services/Link/classes/class.ilLink.php");
504 $entry =
"<a href='".$link.
"' target='_top'>".$entry.
"</a>";
507 $info->addProperty($lng->txt(
"obj_sahs"), $entry);
516 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
522 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
524 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
528 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
530 $this->tpl->setCurrentBlock(
"btn_cell");
531 $this->tpl->setVariable(
"BTN_LINK",
532 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID());
533 $this->tpl->setVariable(
"BTN_TARGET",
" target=\"".
535 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
"view"));
536 $this->tpl->parseCurrentBlock();
556 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
558 $ecs->addSettingsToForm($this->form,
'glo');
560 $tpl->setContent($this->form->getHTML());
572 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
578 $this->form->addItem($cb);
582 "none"=>$this->lng->txt(
"glo_mode_normal"),
583 "level"=>$this->lng->txt(
"glo_mode_level"),
584 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
588 $si->setInfo($lng->txt(
"glo_mode_desc"));
589 $this->form->addItem($si);
594 $op1 =
new ilRadioOption($lng->txt(
"glo_table_form"),
"table", $lng->txt(
"glo_table_form_info"));
597 $ni =
new ilNumberInputGUI($lng->txt(
"glo_text_snippet_length"),
"snippet_length");
598 $ni->setMaxValue(3000);
599 $ni->setMinValue(100);
600 $ni->setMaxLength(4);
602 $ni->
setInfo($lng->txt(
"glo_text_snippet_length_info"));
604 $op1->addSubItem($ni);
606 $radg->addOption($op1);
607 $op2 =
new ilRadioOption($lng->txt(
"glo_full_definitions"),
"full_def", $lng->txt(
"glo_full_definitions_info"));
608 $radg->addOption($op2);
609 $this->form->addItem($radg);
612 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
614 if (count($tax_ids) > 0)
617 $this->form->addItem($cb);
623 $cb->setInfo($lng->txt(
"cont_downloads_desc"));
624 $this->form->addItem($cb);
627 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
629 $this->form->setTitle($lng->txt(
"cont_glo_properties"));
630 $this->form->setFormAction($ilCtrl->getFormAction($this));
640 $values[
"cobj_online"] = $this->
object->getOnline();
641 $values[
"glo_mode"] = $this->
object->getVirtualMode();
643 $values[
"glo_act_downloads"] = $this->
object->isActiveDownloads();
644 $values[
"pres_mode"] = $this->
object->getPresentationMode();
645 $values[
"snippet_length"] = $this->
object->getSnippetLength();
646 $values[
"show_tax"] = $this->
object->getShowTaxonomy();
648 $this->form->setValuesByArray($values);
659 if ($this->form->checkInput())
662 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
665 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
666 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
667 $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
668 $this->
object->update();
671 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
675 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
677 if($ecs->handleSettingsUpdate())
680 $this->ctrl->redirect($this,
"properties");
683 $this->form->setValuesByPost();
684 $tpl->setContent($this->form->getHTML());
694 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
696 $fs_gui->setFramesetTitle($this->object->getTitle());
697 if ((
int)
$_GET[
"edit_term"] > 0)
699 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
"term_id", (
int)
$_GET[
"edit_term"]);
700 $fs_gui->setMainFrameSource($this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listDefinitions"));
704 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"listTerms"));
706 $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this,
"quickList"));
707 $fs_gui->setMainFrameName(
"content");
708 $fs_gui->setSideFrameName(
"tree");
721 include_once(
"./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php");
723 $tpl->setLeftContent(
$tab->getHTML());
725 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.glossary_short_list.html",
731 $this->tpl->setVariable(
"FORMACTION1", $this->ctrl->getFormAction($this));
732 $this->tpl->setVariable(
"CMD_REFR",
"quickList");
733 $this->tpl->setVariable(
"TXT_REFR", $this->lng->txt(
"refresh"));
734 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_terms"));
736 include_once
"./Services/Table/classes/class.ilTableGUI.php";
741 $this->tpl->addBlockfile(
"SHORT_LIST",
"list",
"tpl.table.html");
744 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.term_short_tbl_row.html",
true);
748 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
757 $tbl->setHeaderNames(array($this->lng->txt(
"cont_term")));
759 $cols = array(
"term");
760 $header_params = $this->ctrl->getParameterArrayByClass(
"ilobjglossarygui",
"listTerms");
761 $header_params[
"cmd"] =
"quickList";
762 $tbl->setHeaderVars($cols, $header_params);
763 $tbl->setColumnWidth(array(
"100%"));
764 $tbl->disable(
"title");
767 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
768 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
769 $tbl->setLimit(
$_GET[
"limit"]);
770 $tbl->setOffset(
$_GET[
"offset"]);
771 $tbl->disable(
"header");
773 $term_list = $this->
object->getTermList();
774 $tbl->setMaxCount(count($term_list));
776 $this->tpl->setVariable(
"COLUMN_COUNT", 1);
779 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
783 $term_list = array_slice($term_list,
$_GET[
"offset"],
$_GET[
"limit"]);
788 if (count($term_list) > 0)
791 foreach($term_list as $key =>
$term)
796 for($j=0; $j<count($defs); $j++)
801 $this->tpl->setCurrentBlock(
"definition");
802 $this->tpl->setVariable(
"SEP", $sep);
803 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"term_id",
$term[
"id"]);
804 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"def", $def[
"id"]);
805 $this->tpl->setVariable(
"LINK_EDIT_DEF",
806 $this->ctrl->getLinkTargetByClass(array(
"ilglossarytermgui",
807 "iltermdefinitioneditorgui",
808 "ilpageobjectgui"),
"edit"));
809 $this->tpl->setVariable(
"TEXT_DEF", $this->lng->txt(
"glo_definition_abbr").($j+1));
810 $this->tpl->parseCurrentBlock();
814 $this->tpl->setCurrentBlock(
"tbl_content");
818 $this->tpl->setVariable(
"TEXT_TERM",
$term[
"term"]);
819 $this->ctrl->setParameter($this,
"term_id",
$term[
"id"]);
820 $this->tpl->setVariable(
"LINK_EDIT_TERM",
821 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"editTerm"));
823 $this->tpl->setVariable(
"CSS_ROW", $css_row);
824 $this->tpl->parseCurrentBlock();
830 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
831 $this->tpl->setVariable(
"NUM_COLS", $num);
845 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
849 $ilToolbar->addInputItem($ti,
true);
852 $this->lng->loadLanguageModule(
"meta");
856 $s_lang =
$_SESSION[
"il_text_lang_".$_GET[
"ref_id"]];
860 $s_lang = $ilUser->getLanguage();
862 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
865 $si->setValue($s_lang);
866 $ilToolbar->addInputItem(
$si,
true);
868 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
869 $ilToolbar->addFormButton($lng->txt(
"glo_add_new_term"),
"addTerm");
873 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
875 $tpl->setContent(
$tab->getHTML());
885 foreach ($a_actions as $name =>
$lng)
887 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
890 $notoperations = array();
891 $operations = array();
895 if (count($operations) > 0)
897 foreach ($operations as $val)
899 $this->tpl->setCurrentBlock(
"tbl_action_btn");
900 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
901 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
902 $this->tpl->parseCurrentBlock();
905 $this->tpl->setCurrentBlock(
"tbl_action_row");
907 $this->tpl->parseCurrentBlock();
918 if (trim(
$_POST[
"new_term"]) ==
"")
921 $ilCtrl->redirect($this,
"listTerms");
925 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
927 $term->setGlossary($this->
object);
935 $def->setTermId(
$term->getId());
939 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"term_id",
$term->getId());
940 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"def", $def->getId());
941 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
942 "iltermdefinitioneditorgui",
"ilpageobjectgui"),
"edit");
950 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
953 $definition->moveUp();
955 $this->ctrl->redirect($this,
"listTerms");
963 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
966 $definition->moveDown();
968 $this->ctrl->redirect($this,
"listTerms");
988 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
989 "term_id", $this->term_id);
990 $link =
"[<a href='".
991 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
992 "'>".$lng->txt(
"glo_list_usages").
"</a>]";
993 $add =
"<br/>".sprintf($lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link;
996 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
998 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure").$add);
1000 $cgui->setFormAction($this->ctrl->getFormAction($this));
1001 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDefinitionDeletion");
1002 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteDefinition");
1008 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1009 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1011 $this->tpl->parseCurrentBlock();
1017 $page_gui->setStyleId($this->object->getStyleSheetId());
1018 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1019 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1020 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1021 $output = $page_gui->preview();
1023 $cgui->addItem(
"def",
$_GET[
"def"],
$term->getTerm().$output);
1025 $this->tpl->setContent($cgui->getHTML());
1030 $this->ctrl->redirect($this,
"listTerms");
1037 $definition->delete();
1038 $this->ctrl->redirect($this,
"listTerms");
1061 $this->ctrl->redirect($this,
"listTerms");
1071 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1073 $glo_exp->buildExportFile();
1074 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1082 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1084 $glo_exp->buildExportFile();
1086 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1094 if(!isset(
$_POST[
"file"]))
1096 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1098 if (count(
$_POST[
"file"]) > 1)
1100 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1104 $export_dir = $this->
object->getExportDirectory(
$file[0]);
1106 if ($this->object->getPublicExportFile(
$file[0]) ==
1109 $this->
object->setPublicExportFile(
$file[0],
"");
1113 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
1115 $this->
object->update();
1116 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1152 if (!isset(
$_POST[
"id"]))
1155 $ilCtrl->redirect($this,
"listTerms");
1159 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1160 foreach (
$_POST[
"id"] as $term_id)
1163 if ($term_glo_id != $this->object->getId())
1166 $ilCtrl->redirect($this,
"listTerms");
1171 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1173 $cgui->setFormAction($this->ctrl->getFormAction($this));
1174 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1175 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelTermDeletion");
1176 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteTerms");
1178 foreach(
$_POST[
"id"] as $id)
1186 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
1188 $link =
"[<a href='".
1189 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
1190 "'>".$lng->txt(
"glo_list_usages").
"</a>]";
1191 $add =
"<div class='small'>".
1192 sprintf($lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link.
"</div>";
1195 $cgui->addItem(
"id[]", $id,
$term->getTerm().$add);
1198 $this->tpl->setContent($cgui->getHTML());
1208 $this->ctrl->redirect($this,
"listTerms");
1216 foreach(
$_POST[
"id"] as $id)
1221 $this->ctrl->redirect($this,
"listTerms");
1233 if(strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui")
1239 if(is_object($this->
object))
1241 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1243 if (is_object($this->term))
1245 $gloss_loc->setTerm($this->term);
1247 $gloss_loc->setGlossary($this->
object);
1249 $gloss_loc->display();
1269 switch(
$_POST[
"new_type"])
1273 $term_gui->create();
1281 $term_gui->setGlossary($this->
object);
1287 $ilCtrl->redirect($this,
"listTerms");
1298 if (count(
$_POST[
"id"]) < 1)
1301 $ilCtrl->redirect($this,
"listTerms");
1304 if (count(
$_POST[
"id"]) > 1)
1307 $ilCtrl->redirect($this,
"listTerms");
1310 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1312 if ($term_glo_id != $this->object->getId())
1315 $ilCtrl->redirect($this,
"listTerms");
1319 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1324 $def->setTermId(
$term->getId());
1328 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"term_id",
$term->getId());
1329 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"def", $def->getId());
1330 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
1331 "iltermdefinitioneditorgui",
"ilpageobjectgui"),
"edit");
1337 $this->tpl->getStandardTemplate();
1339 $title = $this->
object->getTitle();
1342 if ($this->term_id > 0)
1344 $this->tpl->setTitle($this->lng->txt(
"term").
": ".
1350 $this->tpl->setTitle($this->lng->txt(
"glo").
": ".
$title);
1359 $this->
getTabs($this->tabs_gui);
1367 global $rbacsystem, $ilHelp;
1369 $ilHelp->setScreenIdComponent(
"glo");
1372 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"listTerms")
1375 $tabs_gui->addTarget(
"cont_terms",
1376 $this->ctrl->getLinkTarget($this,
"listTerms"), array(
"listTerms",
""),
1377 get_class($this),
"", $force_active);
1379 $force_active =
false;
1380 if ($this->ctrl->getCmd() ==
"showSummary" ||
1381 strtolower($this->ctrl->getNextClass()) ==
"ilinfoscreengui")
1383 $force_active =
true;
1385 $tabs_gui->addTarget(
"info_short",
1386 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
1387 "ilInfoScreenGUI",
"", $force_active);
1390 $tabs_gui->addTarget(
"settings",
1391 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
1395 $tabs_gui->addTarget(
"meta_data",
1396 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
'listSection'),
1397 "",
"ilmdeditorgui");
1405 $tabs_gui->addTarget(
"export",
1406 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1410 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
1417 $tabs_gui->addTarget(
"perm_settings",
1418 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1422 $tabs_gui->addNonTabbedLink(
"presentation_view",
1423 $this->lng->txt(
"glo_presentation_view"),
1424 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID(),
1437 if (in_array($a_active,
1438 array(
"general_settings",
"style",
"taxonomy")))
1441 $ilTabs->addSubTab(
"general_settings",
1442 $lng->txt(
"cont_glo_properties"),
1443 $ilCtrl->getLinkTarget($this,
'properties'));
1446 $ilTabs->addSubTab(
"style",
1447 $lng->txt(
"obj_sty"),
1448 $ilCtrl->getLinkTarget($this,
'editStyleProperties'));
1451 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1453 $ilTabs->addSubTab(
"taxonomy",
1454 $lng->txt(
"tax_taxonomy"),
1455 $ilCtrl->getLinkTargetByClass(
"ilobjtaxonomygui",
'editAOTaxonomySettings'));
1457 $ilTabs->activateSubTab($a_active);
1471 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1473 $_GET[
"ref_id"] = $a_target;
1474 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1475 include(
"ilias.php");
1478 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1480 $_GET[
"ref_id"] = $a_target;
1481 $_GET[
"cmd"] =
"infoScreen";
1482 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1483 include(
"ilias.php");
1486 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1493 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
1503 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1505 $prtab->resetOffset();
1506 $prtab->writeFilterToSession();
1517 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1519 $prtab->resetOffset();
1520 $prtab->resetFilter();
1545 $ctpl->setCurrentBlock(
"ContentStyle");
1546 $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1548 $ctpl->parseCurrentBlock();
1557 global $ilTabs,
$tpl;
1562 $tpl->setContent($this->form->getHTML());
1564 $ilTabs->activateTab(
"settings");
1575 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1576 $lng->loadLanguageModule(
"style");
1578 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1581 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
1582 $style_id = $this->
object->getStyleSheetId();
1584 if ($fixed_style > 0)
1588 $this->lng->txt(
"global_fixed").
")");
1589 $this->form->addItem($st);
1596 $st_styles[0] = $this->lng->txt(
"default");
1606 $this->form->addItem($st);
1611 $this->form->addCommandButton(
"editStyle",
1612 $lng->txt(
"style_edit_style"));
1613 $this->form->addCommandButton(
"deleteStyle",
1614 $lng->txt(
"style_delete_style"));
1622 $st_styles,
false,
true);
1623 $style_sel =
new ilSelectInputGUI($lng->txt(
"style_current_style"),
"style_id");
1625 $style_sel->setValue($style_id);
1626 $this->form->addItem($style_sel);
1628 $this->form->addCommandButton(
"saveStyleSettings",
1630 $this->form->addCommandButton(
"createStyle",
1631 $lng->txt(
"sty_create_ind_style"));
1634 $this->form->setTitle($lng->txt(
"glo_style"));
1635 $this->form->setFormAction($ilCtrl->getFormAction($this));
1645 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1655 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1665 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1675 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1676 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
1678 || $this->object->getStyleSheetId() == 0))
1681 $this->
object->update();
1684 $this->ctrl->redirect($this,
"editStyleProperties");
1694 if ($this->object->getPublicExportFile($a_type) == $a_file)
1696 return $lng->txt(
"yes");