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");
92 function __construct($a_data,$a_id = 0,$a_call_by_reference =
true, $a_prepare_output =
true)
96 $this->ctrl =
$DIC->ctrl();
97 $this->lng =
$DIC->language();
98 $this->
user = $DIC->user();
99 $this->toolbar =
$DIC->toolbar();
100 $this->tabs =
$DIC->tabs();
101 $this->setting =
$DIC[
"ilSetting"];
102 $this->access =
$DIC->access();
103 $this->rbacsystem =
$DIC->rbac()->system();
104 $this->help =
$DIC[
"ilHelp"];
108 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermPermission.php");
111 $this->ctrl->saveParameter($this, array(
"ref_id",
"offset"));
113 $this->lng->loadLanguageModule(
"content");
114 $this->lng->loadLanguageModule(
"glo");
117 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
121 $this->term_id = (int)
$_GET[
"term_id"];
123 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
124 if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
130 $this->tax_id = $this->
object->getTaxonomyId();
131 if ($this->tax_id > 0)
133 $this->ctrl->saveParameter($this, array(
"show_tax",
"tax_node"));
135 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
138 if ((
int)
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() !=
$_GET[
"tax_node"])
140 $this->tax_node = (int)
$_GET[
"tax_node"];
149 $cmd = $this->ctrl->getCmd();
150 $next_class = $this->ctrl->getNextClass($this);
152 $this->log->debug(
"glossary term, next class ".$next_class.
", cmd: ".
$cmd);
156 case 'ilobjectmetadatagui';
164 $this->tabs_gui->activateTab(
'meta_data');
165 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
167 $this->ctrl->forwardCommand($md_gui);
170 case "ilglossarytermgui":
171 if (!$this->term_perm->checkPermission(
"edit_content", $this->term_id) &&
172 !$this->term_perm->checkPermission(
"write", $this->term_id))
174 include_once(
"./Modules/Glossary/exceptions/class.ilGlossaryException.php");
179 $this->ctrl->setReturn($this,
"listTerms");
181 $term_gui->setGlossary($this->
object);
183 $ret = $this->ctrl->forwardCommand($term_gui);
186 case "ilinfoscreengui":
191 case "ilobjstylesheetgui":
192 include_once (
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
193 $this->ctrl->setReturn($this,
"editStyleProperties");
194 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
195 $style_gui->omitLocator();
196 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
198 $style_gui->setCreationMode(
true);
201 if (
$cmd ==
"confirmedDelete")
203 $this->
object->setStyleSheetId(0);
204 $this->
object->update();
207 $ret = $this->ctrl->forwardCommand($style_gui);
209 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
212 $this->
object->setStyleSheetId($style_id);
213 $this->
object->update();
214 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
219 case 'ilpermissiongui':
220 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
231 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
233 $ret = $this->ctrl->forwardCommand($perm_gui);
236 case "ilcommonactiondispatchergui":
237 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
239 $this->ctrl->forwardCommand($gui);
242 case "ilobjtaxonomygui":
247 $this->tabs->activateTab(
"settings");
250 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
251 $this->ctrl->setReturn($this,
"properties");
253 $tax_gui->setMultiple(
false);
259 $tax_gui->setAssignedObject($this->object->getId());
260 $ret = $this->ctrl->forwardCommand($tax_gui);
266 $this->tabs->activateTab(
"export");
268 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
271 $exp_gui->addFormat(
"xml");
272 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
273 $exp_gui->addCustomColumn($this->lng->txt(
"cont_public_access"),
274 $this,
"getPublicAccessColValue");
275 $exp_gui->addCustomMultiCommand($this->lng->txt(
"cont_public_access"),
276 $this,
"publishExportFile");
277 $ret = $this->ctrl->forwardCommand($exp_gui);
280 case 'ilobjectcopygui':
282 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
285 $this->ctrl->forwardCommand($cp);
288 case "ilglossaryforeigntermcollectorgui":
289 $this->ctrl->setReturn($this,
"");
294 include_once(
"./Modules/Glossary/classes/class.ilGlossaryForeignTermCollectorGUI.php");
296 $this->ctrl->forwardCommand($coll);
300 $cmd = $this->ctrl->getCmd(
"listTerms");
302 if ((
$cmd ==
"create") && (
$_POST[
"new_type"] ==
"term"))
304 $this->ctrl->setCmd(
"create");
305 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
311 if (!in_array(
$cmd, array(
"quickList")))
313 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
326 if(
$cmd ==
"redrawHeaderAction")
328 $cmd =
"redrawHeaderActionObject";
337 if (!in_array(
$cmd, array(
"quickList")))
339 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")
349 $this->tpl->show(
false);
355 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
372 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
374 $form->setTarget(
"_top");
375 $form->setFormAction($this->ctrl->getFormAction($this));
376 $form->setTitle($this->lng->txt($a_new_type.
"_new"));
382 $ti->setRequired(
true);
393 "none"=>$this->lng->txt(
"glo_mode_normal"),
394 "level"=>$this->lng->txt(
"glo_mode_level"),
395 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
398 $tm->setOptions($stati);
399 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
400 $tm->setRequired(
true);
403 $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
404 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
419 $new_type = $_REQUEST[
"new_type"];
424 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
427 $this->lng->loadLanguageModule($new_type);
428 $this->ctrl->setParameter($this,
"new_type", $new_type);
431 if ($form->checkInput())
433 $this->ctrl->setParameter($this,
"new_type",
"");
435 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
437 $newObj->setType($new_type);
438 $newObj->setTitle($form->getInput(
"title"));
439 $newObj->setDescription($form->getInput(
"desc"));
440 $newObj->setVirtualMode($form->getInput(
"glo_mode"));
447 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
451 $form->setValuesByPost();
452 $this->tpl->setContent($form->getHtml());
466 $this->lng->loadLanguageModule(
"meta");
467 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
470 $info->enablePrivateNotes();
472 if ($this->access->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
474 $info->enableNewsEditing();
476 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
477 if ($enable_internal_rss)
479 $info->setBlockProperty(
"news",
"settings",
true);
482 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
486 $this->ctrl->forwardCommand(
$info);
497 global
$lng, $ilAccess;
499 $info->addSection(
$lng->txt(
"glo_usages"));
500 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
502 foreach ($sms as $sm)
506 foreach ($refs as $ref)
510 if ($ilAccess->checkAccess(
"write",
"", $ref))
512 include_once(
"./Services/Link/classes/class.ilLink.php");
521 $entry =
"<a href='".$link.
"' target='_top'>".$entry.
"</a>";
524 $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
531 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
533 parent::viewObject();
537 if (!$this->rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
539 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
558 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
560 $ecs->addSettingsToForm($this->form,
'glo');
562 $this->tpl->setContent($this->form->getHTML());
572 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
577 $title->setRequired(
true);
578 $this->form->addItem(
$title);
582 $this->form->addItem($desc);
584 $this->lng->loadLanguageModule(
"rep");
586 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
591 $online->setValue(
"y");
592 $online->setInfo($this->lng->txt(
"glo_online_info"));
593 $this->form->addItem($online);
596 $section->setTitle($this->lng->txt(
'glo_content_settings'));
602 $op1 =
new ilRadioOption($this->lng->txt(
"glo_mode_normal"),
"none",$this->lng->txt(
"glo_mode_normal_info"));
603 $glo_mode->addOption($op1);
604 $op2 =
new ilRadioOption($this->lng->txt(
"glo_mode_level"),
"level",$this->lng->txt(
"glo_mode_level_info"));
605 $glo_mode->addOption($op2);
606 $op3 =
new ilRadioOption($this->lng->txt(
"glo_mode_subtree"),
"subtree",$this->lng->txt(
"glo_mode_subtree_info"));
607 $glo_mode->addOption($op3);
608 $this->form->addItem($glo_mode);
623 $section->setTitle($this->lng->txt(
'cont_presentation'));
628 $pres_mode->setValue(
"table");
629 $op1 =
new ilRadioOption($this->lng->txt(
"glo_table_form"),
"table", $this->lng->txt(
"glo_table_form_info"));
632 $snl =
new ilNumberInputGUI($this->lng->txt(
"glo_text_snippet_length"),
"snippet_length");
633 $snl->setMaxValue(3000);
634 $snl->setMinValue(100);
635 $snl->setMaxLength(4);
637 $snl->setInfo($this->lng->txt(
"glo_text_snippet_length_info"));
639 $op1->addSubItem($snl);
641 $pres_mode->addOption($op1);
642 $op2 =
new ilRadioOption($this->lng->txt(
"glo_full_definitions"),
"full_def", $this->lng->txt(
"glo_full_definitions_info"));
643 $pres_mode->addOption($op2);
644 $this->form->addItem($pres_mode);
647 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
649 if (count($tax_ids) > 0)
652 $show_tax->setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
653 $this->form->addItem($show_tax);
657 $down =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"glo_act_downloads");
658 $down->setValue(
"y");
659 $down->setInfo($this->lng->txt(
"cont_downloads_desc"));
660 $this->form->addItem($down);
662 if ($a_mode ==
"edit")
664 $title->setValue($this->object->getTitle());
665 $desc->setValue($this->object->getDescription());
666 $online->setChecked($this->object->getOnline());
667 $glo_mode->setValue($this->object->getVirtualMode());
668 $pres_mode->setValue($this->object->getPresentationMode());
669 $snl->setValue($this->object->getSnippetLength());
670 if (count($tax_ids) > 0)
672 $show_tax->setChecked($this->object->getShowTaxonomy());
675 $down->setChecked($this->object->isActiveDownloads());
679 $feat->setTitle($this->lng->txt(
'obj_features'));
680 $this->form->addItem($feat);
682 include_once
'./Services/Container/classes/class.ilContainer.php';
683 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
685 $this->object->getId(),
694 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
696 $cols = $adv_ap->getColumnOrder();
697 if (count($cols) > 1)
699 include_once
'./Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
701 $this->form->addItem($ti);
702 $ti->setValue($cols);
706 $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
708 $this->form->setTitle($this->lng->txt(
"cont_glo_properties"));
709 $this->form->setFormAction($this->ctrl->getFormAction($this));
719 if ($this->form->checkInput())
721 $this->
object->setTitle(
$_POST[
'title']);
722 $this->
object->setDescription(
$_POST[
'description']);
724 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
727 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
728 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
729 $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
730 $this->
object->update();
733 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
735 $cols = $adv_ap->getColumnOrder();
736 if (count($cols) > 1)
738 $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
742 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
745 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
747 $this->object->getId(),
755 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
757 if($ecs->handleSettingsUpdate())
760 $this->ctrl->redirect($this,
"properties");
764 $this->form->setValuesByPost();
765 $this->tpl->setContent($this->form->getHTML());
774 if (
$_GET[
"show_tax"])
780 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
781 $ti =
new ilTextInputGUI($this->lng->txt(
"cont_new_term"),
"new_term");
782 $ti->setMaxLength(80);
784 $this->toolbar->addInputItem($ti,
true);
787 $this->lng->loadLanguageModule(
"meta");
791 $s_lang =
$_SESSION[
"il_text_lang_".$_GET[
"ref_id"]];
795 $s_lang = $this->
user->getLanguage();
797 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
800 $si->setValue($s_lang);
801 $this->toolbar->addInputItem(
$si,
true);
803 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
804 $this->toolbar->addFormButton($this->lng->txt(
"glo_add_new_term"),
"addTerm");
806 $this->toolbar->addSeparator();
809 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
810 if ($this->
user->clipboardHasObjectsOfType(
"term"))
812 $this->toolbar->addButton($this->lng->txt(
"paste"),
813 $this->ctrl->getLinkTarget($this,
"pasteTerms"));
814 $this->toolbar->addButton($this->lng->txt(
"clear_clipboard"),
815 $this->ctrl->getLinkTarget($this,
"clearClipboard"));
819 $this->toolbar->addButton($this->lng->txt(
"glo_add_from_other"),
820 $this->ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
""));
823 if (is_object($this->tax))
825 $this->toolbar->addSeparator();
826 if (
$_GET[
"show_tax"])
828 $this->toolbar->addButton($this->lng->txt(
"glo_hide_taxonomy"),
829 $this->ctrl->getLinkTarget($this,
"deactTaxonomy"));
833 $this->toolbar->addButton($this->lng->txt(
"glo_show_taxonomy"),
834 $this->ctrl->getLinkTarget($this,
"actTaxonomy"));
838 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
840 $this->tpl->setContent(
$tab->getHTML());
851 $this->ctrl->setParameter($this,
"show_tax", 1);
852 $this->ctrl->redirect($this,
"listTerms");
863 $this->ctrl->setParameter($this,
"show_tax",
"");
864 $this->ctrl->redirect($this,
"listTerms");
875 foreach ($a_actions as $name =>
$lng)
877 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
880 $notoperations = array();
881 $operations = array();
885 if (count($operations) > 0)
887 foreach ($operations as $val)
889 $this->tpl->setCurrentBlock(
"tbl_action_btn");
890 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
891 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
892 $this->tpl->parseCurrentBlock();
895 $this->tpl->setCurrentBlock(
"tbl_action_row");
897 $this->tpl->parseCurrentBlock();
906 if (trim(
$_POST[
"new_term"]) ==
"")
909 $this->ctrl->redirect($this,
"listTerms");
913 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
915 $term->setGlossary($this->
object);
923 $def->setTermId(
$term->getId());
927 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
928 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
929 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
930 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
938 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
941 $definition->moveUp();
943 $this->ctrl->redirect($this,
"listTerms");
951 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
954 $definition->moveDown();
956 $this->ctrl->redirect($this,
"listTerms");
974 $this->ctrl->setParameterByClass(
"ilglossarytermgui",
975 "term_id", $this->term_id);
976 $link =
"[<a href='".
977 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
978 "'>".$this->lng->txt(
"glo_list_usages").
"</a>]";
979 $add =
"<br/>".sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link;
982 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
984 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure").$add);
986 $cgui->setFormAction($this->ctrl->getFormAction($this));
987 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDefinitionDeletion");
988 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteDefinition");
994 $this->tpl->setCurrentBlock(
"SyntaxStyle");
995 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
997 $this->tpl->parseCurrentBlock();
1001 $page_gui->setTemplateOutput(
false);
1002 $page_gui->setStyleId($this->object->getStyleSheetId());
1003 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1004 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1005 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
1006 $output = $page_gui->preview();
1008 $cgui->addItem(
"def",
$_GET[
"def"],
$term->getTerm().$output);
1010 $this->tpl->setContent($cgui->getHTML());
1015 $this->ctrl->redirect($this,
"listTerms");
1022 $definition->delete();
1023 $this->ctrl->redirect($this,
"listTerms");
1046 $this->ctrl->redirect($this,
"listTerms");
1058 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1060 $glo_exp->buildExportFile();
1061 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1069 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1071 $glo_exp->buildExportFile();
1073 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1081 if(!isset(
$_POST[
"file"]))
1083 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1085 if (count(
$_POST[
"file"]) > 1)
1087 $this->
ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1091 $export_dir = $this->
object->getExportDirectory(
$file[0]);
1093 if ($this->object->getPublicExportFile(
$file[0]) ==
1096 $this->
object->setPublicExportFile(
$file[0],
"");
1100 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
1102 $this->
object->update();
1103 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1119 if (!isset(
$_POST[
"id"]))
1122 $this->ctrl->redirect($this,
"listTerms");
1126 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1127 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1134 $this->ctrl->redirect($this,
"listTerms");
1139 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1141 $cgui->setFormAction($this->ctrl->getFormAction($this));
1142 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1143 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelTermDeletion");
1144 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteTerms");
1146 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1148 foreach(
$_POST[
"id"] as $id)
1156 $this->ctrl->setParameterByClass(
"ilglossarytermgui",
1161 $add =
" (".$this->lng->txt(
"glo_term_reference").
")";
1165 $link =
"[<a href='".
1166 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
1167 "'>".$this->lng->txt(
"glo_list_usages").
"</a>]";
1168 $add =
"<div class='small'>".
1169 sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link.
"</div>";
1174 $cgui->addItem(
"id[]", $id,
$term->getTerm().$add);
1177 $this->tpl->setContent($cgui->getHTML());
1187 $this->ctrl->redirect($this,
"listTerms");
1195 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1196 foreach(
$_POST[
"id"] as $id)
1201 $refs->deleteTerm($id);
1210 $this->ctrl->redirect($this,
"listTerms");
1222 if(strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui")
1224 parent::setLocator($a_tree, $a_id);
1228 if(is_object($this->
object))
1230 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1232 if (is_object($this->term))
1234 $gloss_loc->setTerm($this->term);
1236 $gloss_loc->setGlossary($this->
object);
1238 $gloss_loc->display();
1258 switch(
$_POST[
"new_type"])
1262 $term_gui->create();
1270 $term_gui->setGlossary($this->
object);
1276 $this->ctrl->redirect($this,
"listTerms");
1287 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1289 if ($term_glo_id != $this->object->getId())
1292 $this->ctrl->redirect($this,
"listTerms");
1296 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1301 $def->setTermId(
$term->getId());
1305 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
1306 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
1307 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
1308 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1314 $this->tpl->getStandardTemplate();
1316 $title = $this->
object->getTitle();
1319 if ($this->term_id > 0)
1321 $this->tpl->setTitle($this->lng->txt(
"term").
": ".
1326 parent::setTitleAndDescription();
1328 $this->tpl->setTitle($this->lng->txt(
"glo").
": ".
$title);
1345 $this->help->setScreenIdComponent(
"glo");
1348 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"listTerms")
1351 $this->tabs_gui->addTarget(
"cont_terms",
1352 $this->ctrl->getLinkTarget($this,
"listTerms"), array(
"listTerms",
""),
1353 get_class($this),
"", $force_active);
1355 $force_active =
false;
1356 if ($this->ctrl->getCmd() ==
"showSummary" ||
1357 strtolower($this->ctrl->getNextClass()) ==
"ilinfoscreengui")
1359 $force_active =
true;
1361 $this->tabs_gui->addTarget(
"info_short",
1362 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
1363 "ilInfoScreenGUI",
"", $force_active);
1366 if ($this->rbacsystem->checkAccess(
'write',$this->object->getRefId()))
1368 $this->tabs_gui->addTarget(
"settings",
1369 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
1373 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
1375 $mdtab = $mdgui->getTab();
1378 $this->tabs_gui->addTarget(
"meta_data", $mdtab,
1379 "",
"ilobjectmetadatagui");
1388 $this->tabs_gui->addTarget(
"export",
1389 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1394 if ($this->rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
1401 $this->tabs_gui->addTarget(
"perm_settings",
1402 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1406 $this->tabs_gui->addNonTabbedLink(
"presentation_view",
1407 $this->lng->txt(
"glo_presentation_view"),
1408 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID(),
1419 if (in_array($a_active,
1420 array(
"general_settings",
"style",
"taxonomy",
"glossaries")))
1423 $this->tabs->addSubTab(
"general_settings",
1424 $this->lng->txt(
"settings"),
1425 $this->ctrl->getLinkTarget($this,
'properties'));
1428 $this->tabs->addSubTab(
"style",
1429 $this->lng->txt(
"obj_sty"),
1430 $this->ctrl->getLinkTarget($this,
'editStyleProperties'));
1433 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1435 $this->tabs->addSubTab(
"taxonomy",
1436 $this->lng->txt(
"tax_taxonomy"),
1437 $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
''));
1440 $this->tabs->addSubTab(
"glossaries",
1441 $this->lng->txt(
"cont_auto_glossaries"),
1442 $this->ctrl->getLinkTarget($this,
'editGlossaries'));
1444 $this->tabs->activateSubTab($a_active);
1459 $ilAccess =
$DIC->access();
1462 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1464 $_GET[
"ref_id"] = $a_target;
1465 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1466 include(
"ilias.php");
1469 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1471 $_GET[
"ref_id"] = $a_target;
1472 $_GET[
"cmd"] =
"infoScreen";
1473 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1474 include(
"ilias.php");
1477 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1492 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1494 $prtab->resetOffset();
1495 $prtab->writeFilterToSession();
1505 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1507 $prtab->resetOffset();
1508 $prtab->resetFilter();
1531 $ctpl->setCurrentBlock(
"ContentStyle");
1532 $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1534 $ctpl->parseCurrentBlock();
1546 $this->tpl->setContent($this->form->getHTML());
1548 $this->tabs->activateTab(
"settings");
1557 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1558 $this->lng->loadLanguageModule(
"style");
1560 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1563 $fixed_style = $this->setting->get(
"fixed_content_style_id");
1564 $style_id = $this->
object->getStyleSheetId();
1566 if ($fixed_style > 0)
1570 $this->lng->txt(
"global_fixed").
")");
1571 $this->form->addItem($st);
1578 $st_styles[0] = $this->lng->txt(
"default");
1588 $this->form->addItem($st);
1593 $this->form->addCommandButton(
"editStyle",
1594 $this->lng->txt(
"style_edit_style"));
1595 $this->form->addCommandButton(
"deleteStyle",
1596 $this->lng->txt(
"style_delete_style"));
1604 $st_styles,
false,
true);
1605 $style_sel =
new ilSelectInputGUI($this->lng->txt(
"style_current_style"),
"style_id");
1606 $style_sel->setOptions($st_styles);
1607 $style_sel->setValue($style_id);
1608 $this->form->addItem($style_sel);
1610 $this->form->addCommandButton(
"saveStyleSettings",
1611 $this->lng->txt(
"save"));
1612 $this->form->addCommandButton(
"createStyle",
1613 $this->lng->txt(
"sty_create_ind_style"));
1616 $this->form->setTitle($this->lng->txt(
"glo_style"));
1617 $this->form->setFormAction($this->ctrl->getFormAction($this));
1625 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1633 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1641 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1649 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1650 if ($this->setting->get(
"fixed_content_style_id") <= 0 &&
1652 || $this->object->getStyleSheetId() == 0))
1655 $this->
object->update();
1658 $this->ctrl->redirect($this,
"editStyleProperties");
1666 if ($this->object->getPublicExportFile(
$a_type) == $a_file)
1668 return $this->lng->txt(
"yes");
1682 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1684 if (count($tax_ids) > 0)
1686 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1688 "ilobjglossarygui",
"listTerms");
1689 if (!$tax_exp->handleCommand())
1692 $this->tpl->setLeftNavContent($tax_exp->getHTML().
" ");
1710 $this->tabs->setTabActive(
"settings");
1713 $this->toolbar->addButton($this->lng->txt(
"add"),
1714 $this->ctrl->getLinkTarget($this,
"showGlossarySelector"));
1716 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAutoLinkTableGUI.php");
1719 $this->tpl->setContent(
$tab->getHTML());
1730 $this->tabs->setTabActive(
"settings");
1733 include_once
'Services/Search/classes/class.ilSearchRootSelector.php';
1736 $exp->setExpand(
$_GET[
"search_root_expand"] ?
$_GET[
"search_root_expand"] : $this->tree->readRootId());
1737 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showGlossarySelector'));
1738 $exp->setTargetClass(get_class($this));
1739 $exp->setCmd(
'confirmGlossarySelection');
1740 $exp->setClickableTypes(array(
"glo"));
1741 $exp->addFilter(
"glo");
1745 $this->tpl->setContent($exp->getOutput());
1754 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1756 $this->ctrl->setParameter($this,
"glo_ref_id",
$_GET[
"root_id"]);
1757 $cgui->setFormAction($this->ctrl->getFormAction($this));
1758 $cgui->setHeaderText($this->lng->txt(
"glo_link_glo_in_glo"));
1759 $cgui->setCancel($this->lng->txt(
"no"),
"selectGlossary");
1760 $cgui->setConfirm($this->lng->txt(
"yes"),
"selectGlossaryLink");
1761 $this->tpl->setContent($cgui->getHTML());
1772 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1774 $this->
object->autoLinkGlossaryTerms($glo_id);
1787 $glos = $this->
object->getAutoGlossaries();
1788 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1790 if (!in_array($glo_id, $glos))
1794 $this->
object->setAutoGlossaries($glos);
1795 $this->
object->update();
1798 $this->ctrl->redirect($this,
"editGlossaries");
1809 $this->
object->removeAutoGlossary((
int)
$_GET[
"glo_id"]);
1810 $this->
object->update();
1813 $this->ctrl->redirect($this,
"editGlossaries");
1825 if (!is_array($items))
1828 $this->ctrl->redirect($this,
"listTerms");
1831 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1832 $this->
user->clipboardDeleteObjectsOfType(
"term");
1835 $time =
date(
"Y-m-d H:i:s", time());
1837 foreach ($items as $id)
1839 $this->
user->addObjectToClipboard($id,
1844 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1845 $this->ctrl->redirect($this,
"listTerms");
1857 if (!is_array($items))
1860 $this->ctrl->redirect($this,
"listTerms");
1863 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1864 $this->
user->clipboardDeleteObjectsOfType(
"term");
1867 $time =
date(
"Y-m-d H:i:s", time());
1869 foreach ($items as $id)
1871 $this->
user->addObjectToClipboard($id,
1876 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1877 $this->ctrl->redirect($this,
"listTerms");
1889 $this->
user->clipboardDeleteObjectsOfType(
"term");
1890 $this->ctrl->redirect($this,
"listTerms");
1898 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1901 foreach ($this->
user->getClipboardObjects(
"term") as $item)
1908 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1910 foreach ($this->
user->getClipboardObjects(
"term") as $item)
1912 $refs->addTerm($item[
"id"]);
1917 $this->ctrl->redirect($this,
"listTerms");
sprintf('%.4f', $callTime)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
for($col=0; $col< 50; $col++) $d
An exception for terminatinating execution or to throw for unit testing.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
Class ilECSGlossarySettings.
static setAction($a_action)
Export User Interface Class.
TableGUI class for auto link glossaries.
Glossary definition page GUI class.
Class ilGlossaryDefinition.
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
Export class for content objects.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
GUI class for glossary terms.
static getInstance()
Get instance.
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
static _lookGlossaryTerm($term_id)
get glossary term
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getLogger($a_component_id)
Get component logger.
This class represents a non editable value in a property form.
initSettingsForm($a_mode="edit")
Init settings form.
exportHTML()
create html package
addDefinition()
add definition
deleteStyle()
Delete Style.
referenceTerms()
Reference terms.
moveDefinitionDown()
move a definiton down
setLocator($a_tree="", $a_id="")
set Locator
static _goto($a_target)
redirect script
setContentStyleSheet($a_tpl=null)
Set content style sheet.
setSettingsSubTabs($a_active)
Set sub tabs.
createStyle()
Create Style.
initStylePropertiesForm()
Init style properties form.
confirmGlossarySelection()
Confirm glossary selection.
confirmTermDeletion()
confirm term deletion
confirmDefinitionDeletion()
deletion confirmation screen
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
static addUsagesToInfo($info, $glo_id)
Add usages to info.
applyFilter()
Apply filter.
actTaxonomy()
Show Taxonomy.
executeCommand()
execute command
showActions($a_actions)
show possible action (form buttons)
properties()
edit properties of object (admin form)
deleteTerms()
delete selected terms
moveDefinitionUp()
move a definiton up
viewObject()
list childs of current object
showTaxonomy()
Show taxonomy.
editStyleProperties()
Edit style properties.
selectGlossaryLink()
Select a glossary and link all its terms.
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
showGlossarySelector()
Select LM Glossary.
publishExportFile()
download export file
saveObject()
save new content object to db
selectGlossary()
Select lm glossary.
cancelDefinitionDeletion()
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
create()
create new (subobject) in glossary
deactTaxonomy()
Hide Taxonomy.
clearClipboard()
Clear clipboard.
export()
export content object
saveStyleSettings()
Save style settings.
initCreateForm($a_new_type)
Init object creation form.
cancelTermDeletion()
cancel deletion of object
removeGlossary()
Remove lm glossary.
showInfoScreen()
Show info screen.
saveProperties()
save properties
editGlossaries()
Edit automatically linked glossaries.
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
Class ilObjStyleSheetGUI.
static _lookupStandard($a_id)
Lookup standard flag.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
static _getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
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.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
prepareOutput($a_show_subobjects=true)
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 initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
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
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 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 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 sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
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)
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
redirection script todo: (a better solution should control the processing via a xml file)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file