5require_once(
"./Services/Object/classes/class.ilObjectGUI.php");
6require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
7require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
8require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
9require_once(
"./Modules/Glossary/classes/class.ilTermDefinitionEditorGUI.php");
10require_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"));
43 $lng->loadLanguageModule(
"content");
46 parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference,
false);
50 $this->term_id = (int)
$_GET[
"term_id"];
52 if ($this->term_id > 0 && $term_glo_id != $this->object->getId())
57 $this->tax_id = $this->
object->getTaxonomyId();
58 if ($this->tax_id > 0)
60 $this->ctrl->saveParameter($this, array(
"show_tax",
"tax_node"));
62 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
65 if ((
int)
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() !=
$_GET[
"tax_node"])
67 $this->tax_node = (int)
$_GET[
"tax_node"];
78 $cmd = $this->ctrl->getCmd();
79 $next_class = $this->ctrl->getNextClass($this);
91 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
93 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
94 $md_gui->addObserver($this->
object,
'MDUpdateListener',
'General');
96 $this->ctrl->forwardCommand($md_gui);
99 case "ilglossarytermgui":
102 $this->ctrl->setReturn($this,
"listTerms");
104 $term_gui->setGlossary($this->
object);
106 $ret =& $this->ctrl->forwardCommand($term_gui);
109 case "ilinfoscreengui":
114 case "ilobjstylesheetgui":
115 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
116 $this->ctrl->setReturn($this,
"editStyleProperties");
117 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
118 $style_gui->omitLocator();
119 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
121 $style_gui->setCreationMode(
true);
124 if (
$cmd ==
"confirmedDelete")
126 $this->
object->setStyleSheetId(0);
127 $this->
object->update();
130 $ret = $this->ctrl->forwardCommand($style_gui);
132 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
135 $this->
object->setStyleSheetId($style_id);
136 $this->
object->update();
137 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
142 case 'ilpermissiongui':
143 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
154 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
156 $ret =& $this->ctrl->forwardCommand($perm_gui);
159 case "ilcommonactiondispatchergui":
160 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
162 $this->ctrl->forwardCommand($gui);
165 case "ilobjtaxonomygui":
170 $ilTabs->activateTab(
"settings");
173 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
174 $this->ctrl->setReturn($this,
"properties");
176 $tax_gui->setMultiple(
false);
182 $tax_gui->setAssignedObject($this->object->getId());
183 $ret = $this->ctrl->forwardCommand($tax_gui);
189 $ilTabs->activateTab(
"export");
191 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
194 $exp_gui->addFormat(
"xml");
195 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
196 $exp_gui->addCustomColumn(
$lng->txt(
"cont_public_access"),
197 $this,
"getPublicAccessColValue");
198 $exp_gui->addCustomMultiCommand(
$lng->txt(
"cont_public_access"),
199 $this,
"publishExportFile");
200 $ret = $this->ctrl->forwardCommand($exp_gui);
203 case 'ilobjectcopygui':
205 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
208 $this->ctrl->forwardCommand($cp);
212 $cmd = $this->ctrl->getCmd(
"listTerms");
214 if ((
$cmd ==
"create") && (
$_POST[
"new_type"] ==
"term"))
216 $this->ctrl->setCmd(
"create");
217 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
223 if (!in_array(
$cmd, array(
"frameset",
"quickList")))
225 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
238 if(
$cmd ==
"redrawHeaderAction")
240 $cmd =
"redrawHeaderActionObject";
249 if (!in_array(
$cmd, array(
"frameset",
"quickList")))
251 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")
261 $this->tpl->show(
false);
267 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
284 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
286 $form->setTarget(
"_top");
287 $form->setFormAction($this->ctrl->getFormAction($this));
288 $form->setTitle($this->lng->txt($a_new_type.
"_new"));
294 $ti->setRequired(
true);
305 "none"=>$this->lng->txt(
"glo_mode_normal"),
306 "level"=>$this->lng->txt(
"glo_mode_level"),
307 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
310 $tm->setOptions($stati);
311 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
312 $tm->setRequired(
true);
315 $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
316 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
338 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
341 $this->lng->loadLanguageModule($new_type);
342 $this->ctrl->setParameter($this,
"new_type", $new_type);
345 if ($form->checkInput())
347 $this->ctrl->setParameter($this,
"new_type",
"");
349 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
351 $newObj->setType($new_type);
352 $newObj->setTitle($form->getInput(
"title"));
353 $newObj->setDescription($form->getInput(
"desc"));
354 $newObj->setVirtualMode($form->getInput(
"glo_mode"));
361 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
365 $form->setValuesByPost();
366 $tpl->setContent($form->getHtml());
384 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
387 $this->lng->loadLanguageModule($new_type);
388 $this->ctrl->setParameter($this,
"new_type", $new_type);
391 if ($form->checkInput())
393 $this->ctrl->setParameter($this,
"new_type",
"");
394 $upload = $_FILES[
"importfile"];
397 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
399 $newObj->setType($new_type);
400 $newObj->setTitle($upload[
"name"]);
401 $newObj->create(
true);
406 $newObj->createImportDirectory();
409 $file = pathinfo($upload[
"name"]);
410 $full_path = $newObj->getImportDirectory().
"/".$upload[
"name"];
419 $subdir = basename(
$file[
"basename"],
".".
$file[
"extension"]);
420 $xml_file = $newObj->getImportDirectory().
"/".$subdir.
"/".$subdir.
".xml";
425 if (is_file($newObj->getImportDirectory().
"/".$subdir.
"/manifest.xml"))
427 include_once(
"./Services/Export/classes/class.ilImport.php");
429 $map = $imp->getMapping();
430 $map->addMapping(
"Modules/Glossary",
"glo",
"new_id", $newObj->getId());
431 $imp->importObject($newObj, $full_path, $upload[
"name"],
"glo",
432 "Modules/Glossary",
true);
434 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
438 if (!is_dir($newObj->getImportDirectory().
"/".$subdir))
440 $this->
ilias->raiseError(sprintf($this->lng->txt(
"cont_no_subdir_in_zip"), $subdir),
441 $this->ilias->error_obj->MESSAGE);
445 if (!is_file($xml_file))
447 $this->
ilias->raiseError(sprintf($this->lng->txt(
"cont_zip_file_invalid"), $subdir.
"/".$subdir.
".xml"),
448 $this->ilias->error_obj->MESSAGE);
451 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
453 $contParser->startParsing();
460 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
464 $form->setValuesByPost();
465 $tpl->setContent($form->getHtml());
481 $this->lng->loadLanguageModule(
"meta");
482 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
485 $info->enablePrivateNotes();
487 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
489 $info->enableNewsEditing();
491 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
492 if ($enable_internal_rss)
494 $info->setBlockProperty(
"news",
"settings",
true);
497 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
501 $this->ctrl->forwardCommand($info);
512 global
$lng, $ilAccess;
514 $info->addSection(
$lng->txt(
"glo_usages"));
515 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
517 foreach ($sms as $sm)
521 foreach ($refs as $ref)
525 if ($ilAccess->checkAccess(
"write",
"", $ref))
527 include_once(
"./Services/Link/classes/class.ilLink.php");
536 $entry =
"<a href='".$link.
"' target='_top'>".$entry.
"</a>";
539 $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
548 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
550 parent::viewObject();
554 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
556 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
577 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
579 $ecs->addSettingsToForm($this->form,
'glo');
581 $tpl->setContent($this->form->getHTML());
593 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
598 $title->setRequired(
true);
599 $this->form->addItem($title);
603 $this->form->addItem($desc);
605 $lng->loadLanguageModule(
"rep");
607 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
612 $online->setValue(
"y");
613 $online->setInfo(
$lng->txt(
"glo_online_info"));
614 $this->form->addItem($online);
617 $section->setTitle($this->lng->txt(
'glo_content_settings'));
624 $glo_mode->addOption($op1);
626 $glo_mode->addOption($op2);
627 $op3 =
new ilRadioOption(
$lng->txt(
"glo_mode_subtree"),
"subtree",
$lng->txt(
"glo_mode_subtree_info"));
628 $glo_mode->addOption($op3);
629 $this->form->addItem($glo_mode);
644 $section->setTitle($this->lng->txt(
'cont_presentation'));
649 $pres_mode->setValue(
"table");
654 $snl->setMaxValue(3000);
655 $snl->setMinValue(100);
656 $snl->setMaxLength(4);
658 $snl->setInfo(
$lng->txt(
"glo_text_snippet_length_info"));
660 $op1->addSubItem($snl);
662 $pres_mode->addOption($op1);
663 $op2 =
new ilRadioOption(
$lng->txt(
"glo_full_definitions"),
"full_def",
$lng->txt(
"glo_full_definitions_info"));
664 $pres_mode->addOption($op2);
665 $this->form->addItem($pres_mode);
668 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
670 if (count($tax_ids) > 0)
673 $show_tax->setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
674 $this->form->addItem($show_tax);
679 $down->setValue(
"y");
680 $down->setInfo(
$lng->txt(
"cont_downloads_desc"));
681 $this->form->addItem($down);
683 if ($a_mode ==
"edit")
685 $title->setValue($this->object->getTitle());
686 $desc->setValue($this->object->getDescription());
687 $online->setChecked($this->object->getOnline());
688 $glo_mode->setValue($this->object->getVirtualMode());
689 $pres_mode->setValue($this->object->getPresentationMode());
690 $snl->setValue($this->object->getSnippetLength());
691 if (count($tax_ids) > 0)
693 $show_tax->setChecked($this->object->getShowTaxonomy());
696 $down->setChecked($this->object->isActiveDownloads());
700 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
702 $record_gui->setPropertyForm($this->form);
703 $record_gui->parseRecordSelection($this->lng->txt(
"glo_add_term_properties"));
706 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
708 $cols = $adv_ap->getColumnOrder();
709 if (count($cols) > 1)
711 include_once
'./Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
713 $this->form->addItem($ti);
714 $ti->setValue($cols);
718 $this->form->addCommandButton(
"saveProperties",
$lng->txt(
"save"));
720 $this->form->setTitle(
$lng->txt(
"cont_glo_properties"));
721 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
733 if ($this->form->checkInput())
735 $this->
object->setTitle(
$_POST[
'title']);
736 $this->
object->setDescription(
$_POST[
'description']);
738 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
741 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
742 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
743 $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
744 $this->
object->update();
747 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
749 $cols = $adv_ap->getColumnOrder();
750 if (count($cols) > 1)
752 $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
756 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
760 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
762 $record_gui->saveSelection();
765 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
767 if($ecs->handleSettingsUpdate())
770 $this->ctrl->redirect($this,
"properties");
774 $this->form->setValuesByPost();
775 $tpl->setContent($this->form->getHTML());
785 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
787 $fs_gui->setFramesetTitle($this->object->getTitle());
788 if ((
int)
$_GET[
"edit_term"] > 0)
790 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
"term_id", (
int)
$_GET[
"edit_term"]);
791 $fs_gui->setMainFrameSource($this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listDefinitions"));
795 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"listTerms"));
797 $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this,
"quickList"));
798 $fs_gui->setMainFrameName(
"content");
799 $fs_gui->setSideFrameName(
"tree");
821 if (
$_GET[
"show_tax"])
827 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
829 $ti->setMaxLength(80);
831 $ilToolbar->addInputItem($ti,
true);
834 $this->lng->loadLanguageModule(
"meta");
838 $s_lang =
$_SESSION[
"il_text_lang_".$_GET[
"ref_id"]];
842 $s_lang =
$ilUser->getLanguage();
844 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
847 $si->setValue($s_lang);
848 $ilToolbar->addInputItem(
$si,
true);
850 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
851 $ilToolbar->addFormButton(
$lng->txt(
"glo_add_new_term"),
"addTerm");
855 if (is_object($this->tax))
857 $ilToolbar->addSeparator();
858 if (
$_GET[
"show_tax"])
860 $ilToolbar->addButton(
$lng->txt(
"glo_hide_taxonomy"),
861 $ilCtrl->getLinkTarget($this,
"deactTaxonomy"));
865 $ilToolbar->addButton(
$lng->txt(
"glo_show_taxonomy"),
866 $ilCtrl->getLinkTarget($this,
"actTaxonomy"));
870 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
885 $ilCtrl->setParameter($this,
"show_tax", 1);
886 $ilCtrl->redirect($this,
"listTerms");
899 $ilCtrl->setParameter($this,
"show_tax",
"");
900 $ilCtrl->redirect($this,
"listTerms");
911 foreach ($a_actions as $name =>
$lng)
913 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
916 $notoperations = array();
917 $operations = array();
921 if (count($operations) > 0)
923 foreach ($operations as $val)
925 $this->tpl->setCurrentBlock(
"tbl_action_btn");
926 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
927 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
928 $this->tpl->parseCurrentBlock();
931 $this->tpl->setCurrentBlock(
"tbl_action_row");
933 $this->tpl->parseCurrentBlock();
944 if (trim(
$_POST[
"new_term"]) ==
"")
947 $ilCtrl->redirect($this,
"listTerms");
951 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
953 $term->setGlossary($this->
object);
961 $def->setTermId(
$term->getId());
965 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
966 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
967 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
968 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
976 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
979 $definition->moveUp();
981 $this->ctrl->redirect($this,
"listTerms");
989 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
992 $definition->moveDown();
994 $this->ctrl->redirect($this,
"listTerms");
1014 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
1015 "term_id", $this->term_id);
1016 $link =
"[<a href='".
1017 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
1018 "'>".$lng->txt(
"glo_list_usages").
"</a>]";
1019 $add =
"<br/>".sprintf(
$lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link;
1022 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1024 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure").$add);
1026 $cgui->setFormAction($this->ctrl->getFormAction($this));
1027 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDefinitionDeletion");
1028 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteDefinition");
1034 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1035 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1037 $this->tpl->parseCurrentBlock();
1041 $page_gui->setTemplateOutput(
false);
1042 $page_gui->setStyleId($this->object->getStyleSheetId());
1043 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1044 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1045 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1046 $output = $page_gui->preview();
1048 $cgui->addItem(
"def",
$_GET[
"def"],
$term->getTerm().$output);
1050 $this->tpl->setContent($cgui->getHTML());
1055 $this->ctrl->redirect($this,
"listTerms");
1062 $definition->delete();
1063 $this->ctrl->redirect($this,
"listTerms");
1086 $this->ctrl->redirect($this,
"listTerms");
1098 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1100 $glo_exp->buildExportFile();
1101 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1109 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1111 $glo_exp->buildExportFile();
1113 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1121 if(!isset(
$_POST[
"file"]))
1123 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1125 if (count(
$_POST[
"file"]) > 1)
1127 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1131 $export_dir = $this->
object->getExportDirectory(
$file[0]);
1133 if ($this->object->getPublicExportFile(
$file[0]) ==
1136 $this->
object->setPublicExportFile(
$file[0],
"");
1140 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
1142 $this->
object->update();
1143 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1161 if (!isset(
$_POST[
"id"]))
1164 $ilCtrl->redirect($this,
"listTerms");
1168 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1169 foreach (
$_POST[
"id"] as $term_id)
1172 if ($term_glo_id != $this->object->getId())
1175 $ilCtrl->redirect($this,
"listTerms");
1180 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1182 $cgui->setFormAction($this->ctrl->getFormAction($this));
1183 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1184 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelTermDeletion");
1185 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteTerms");
1187 foreach(
$_POST[
"id"] as $id)
1195 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
1197 $link =
"[<a href='".
1198 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
1199 "'>".$lng->txt(
"glo_list_usages").
"</a>]";
1200 $add =
"<div class='small'>".
1201 sprintf(
$lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link.
"</div>";
1204 $cgui->addItem(
"id[]", $id,
$term->getTerm().$add);
1207 $this->tpl->setContent($cgui->getHTML());
1217 $this->ctrl->redirect($this,
"listTerms");
1225 foreach(
$_POST[
"id"] as $id)
1230 $this->ctrl->redirect($this,
"listTerms");
1242 if(strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui")
1244 parent::setLocator($a_tree, $a_id);
1248 if(is_object($this->
object))
1250 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1252 if (is_object($this->term))
1254 $gloss_loc->setTerm($this->term);
1256 $gloss_loc->setGlossary($this->
object);
1258 $gloss_loc->display();
1278 switch(
$_POST[
"new_type"])
1282 $term_gui->create();
1290 $term_gui->setGlossary($this->
object);
1296 $ilCtrl->redirect($this,
"listTerms");
1307 $term_id = (int)
$_GET[
"term_id"];
1309 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1311 if ($term_glo_id != $this->object->getId())
1314 $ilCtrl->redirect($this,
"listTerms");
1318 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1323 $def->setTermId(
$term->getId());
1327 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
1328 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
1329 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
1330 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1336 $this->tpl->getStandardTemplate();
1338 $title = $this->
object->getTitle();
1341 if ($this->term_id > 0)
1343 $this->tpl->setTitle($this->lng->txt(
"term").
": ".
1348 parent::setTitleAndDescription();
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 if ($rbacsystem->checkAccess(
'write',$this->object->getRefId()))
1392 $tabs_gui->addTarget(
"settings",
1393 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
1397 $tabs_gui->addTarget(
"meta_data",
1398 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
'listSection'),
1399 "",
"ilmdeditorgui");
1407 $tabs_gui->addTarget(
"export",
1408 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1413 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
1420 $tabs_gui->addTarget(
"perm_settings",
1421 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1425 $tabs_gui->addNonTabbedLink(
"presentation_view",
1426 $this->lng->txt(
"glo_presentation_view"),
1427 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID(),
1440 if (in_array($a_active,
1441 array(
"general_settings",
"style",
"taxonomy")))
1444 $ilTabs->addSubTab(
"general_settings",
1445 $lng->txt(
"settings"),
1446 $ilCtrl->getLinkTarget($this,
'properties'));
1449 $ilTabs->addSubTab(
"style",
1450 $lng->txt(
"obj_sty"),
1451 $ilCtrl->getLinkTarget($this,
'editStyleProperties'));
1454 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1456 $ilTabs->addSubTab(
"taxonomy",
1457 $lng->txt(
"tax_taxonomy"),
1458 $ilCtrl->getLinkTargetByClass(
"ilobjtaxonomygui",
''));
1460 $ilTabs->activateSubTab($a_active);
1474 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1476 $_GET[
"ref_id"] = $a_target;
1477 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1478 include(
"ilias.php");
1481 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1483 $_GET[
"ref_id"] = $a_target;
1484 $_GET[
"cmd"] =
"infoScreen";
1485 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1486 include(
"ilias.php");
1489 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1504 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1506 $prtab->resetOffset();
1507 $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);
1624 $style_sel->setOptions($st_styles);
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");
1712 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1714 if (count($tax_ids) > 0)
1716 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1718 "ilobjglossarygui",
"listTerms");
1719 if (!$tax_exp->handleCommand())
1722 $tpl->setLeftNavContent($tax_exp->getHTML().
" ");
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
Class ilECSGlossarySettings.
Export User Interface Class.
Glossary definition page GUI class.
Class ilGlossaryDefinition.
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
Export class for content objects.
GUI class for glossary terms.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
static _lookGlossaryTerm($term_id)
get glossary term
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
This class represents a non editable value in a property form.
importFileObject()
display status information or report errors messages in case of error
initSettingsForm($a_mode="edit")
Init settings form.
exportHTML()
create html package
addDefinition()
add definition
deleteStyle()
Delete Style.
moveDefinitionDown()
move a definiton down
setLocator($a_tree="", $a_id="")
set Locator
static _goto($a_target)
redirect script
addUsagesToInfo($info, $glo_id)
Add usages to info.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
setSettingsSubTabs($a_active)
Set sub tabs.
createStyle()
Create Style.
initStylePropertiesForm()
Init style properties form.
frameset()
glossary edit frameset
confirmTermDeletion()
confirm term deletion
confirmDefinitionDeletion()
deletion confirmation screen
getTabs(&$tabs_gui)
get tabs
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
applyFilter()
Apply filter.
actTaxonomy()
Show Taxonomy.
showActions($a_actions)
show possible action (form buttons)
properties()
edit properties of object (admin form)
deleteTerms()
delete selected terms
& executeCommand()
execute command
moveDefinitionUp()
move a definiton up
viewObject()
list childs of current object
showTaxonomy()
Show taxonomy.
editStyleProperties()
Edit style properties.
publishExportFile()
download export file
saveObject()
save new content object to db
cancelDefinitionDeletion()
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
create()
create new (subobject) in glossary
quickList()
quick term list
deactTaxonomy()
Hide Taxonomy.
export()
export content object
saveStyleSettings()
Save style settings.
initCreateForm($a_new_type)
Init object creation form.
ilObjGlossaryGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
cancelTermDeletion()
cancel deletion of object
showInfoScreen()
Show info screen.
saveProperties()
save properties
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
Class ilObjStyleSheetGUI.
getContentStylePath($a_style_id)
get content style path
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
getSyntaxStylePath()
get syntax style path
_lookupStandard($a_id)
Lookup standard flag.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static loadLanguageModule()
Load language module.
GUI class for the workflow of copying objects.
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
initImportForm($a_new_type)
Init object import form.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
prepareOutput()
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
addHeaderAction()
Add header action menu.
createObject()
create new object form
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
_writeImportId($a_obj_id, $a_import_id)
write import id to db (static)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
Taxonomy explorer GUI class.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
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.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']