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");
97 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
102 $this->ctrl =
$DIC->ctrl();
103 $this->lng =
$DIC->language();
104 $this->
user = $DIC->user();
105 $this->toolbar =
$DIC->toolbar();
106 $this->tabs =
$DIC->tabs();
107 $this->setting =
$DIC[
"ilSetting"];
108 $this->access =
$DIC->access();
109 $this->rbacsystem =
$DIC->rbac()->system();
110 $this->help =
$DIC[
"ilHelp"];
114 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermPermission.php");
117 $this->ctrl->saveParameter($this, array(
"ref_id",
"offset"));
119 $this->lng->loadLanguageModule(
"content");
120 $this->lng->loadLanguageModule(
"glo");
123 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
127 $this->term_id = (int)
$_GET[
"term_id"];
129 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
130 if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
135 $this->tax_id = $this->
object->getTaxonomyId();
136 if ($this->tax_id > 0) {
137 $this->ctrl->saveParameter($this, array(
"show_tax",
"tax_node"));
139 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
142 if ((
int)
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() !=
$_GET[
"tax_node"]) {
143 $this->tax_node = (int)
$_GET[
"tax_node"];
152 $cmd = $this->ctrl->getCmd();
153 $next_class = $this->ctrl->getNextClass($this);
155 $this->log->debug(
"glossary term, next class " . $next_class .
", cmd: " . $cmd);
157 switch ($next_class) {
158 case 'ilobjectmetadatagui':
166 $this->tabs_gui->activateTab(
'meta_data');
167 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
169 $this->ctrl->forwardCommand($md_gui);
172 case "ilglossarytermgui":
173 if (!$this->term_perm->checkPermission(
"edit_content", $this->term_id) &&
174 !$this->term_perm->checkPermission(
"write", $this->term_id)) {
175 include_once(
"./Modules/Glossary/exceptions/class.ilGlossaryException.php");
180 $this->ctrl->setReturn($this,
"listTerms");
182 $term_gui->setGlossary($this->
object);
184 $ret = $this->ctrl->forwardCommand($term_gui);
187 case "ilinfoscreengui":
192 case "ilobjstylesheetgui":
193 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
194 $this->ctrl->setReturn($this,
"editStyleProperties");
195 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
196 $style_gui->omitLocator();
197 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
198 $style_gui->setCreationMode(
true);
201 if ($cmd ==
"confirmedDelete") {
202 $this->
object->setStyleSheetId(0);
203 $this->
object->update();
206 $ret = $this->ctrl->forwardCommand($style_gui);
208 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
210 $this->
object->setStyleSheetId($style_id);
211 $this->
object->update();
212 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
217 case 'ilpermissiongui':
218 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
226 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
228 $ret = $this->ctrl->forwardCommand($perm_gui);
231 case "ilcommonactiondispatchergui":
232 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
234 $this->ctrl->forwardCommand($gui);
237 case "ilobjtaxonomygui":
242 $this->tabs->activateTab(
"settings");
245 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
246 $this->ctrl->setReturn($this,
"properties");
248 $tax_gui->setMultiple(
false);
254 $tax_gui->setAssignedObject($this->object->getId());
255 $ret = $this->ctrl->forwardCommand($tax_gui);
261 $this->tabs->activateTab(
"export");
263 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
266 $exp_gui->addFormat(
"xml");
267 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
268 $exp_gui->addCustomColumn(
269 $this->lng->txt(
"cont_public_access"),
271 "getPublicAccessColValue"
273 $exp_gui->addCustomMultiCommand(
274 $this->lng->txt(
"cont_public_access"),
278 $ret = $this->ctrl->forwardCommand($exp_gui);
281 case 'ilobjectcopygui':
283 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
286 $this->ctrl->forwardCommand($cp);
289 case "ilglossaryforeigntermcollectorgui":
290 $this->ctrl->setReturn($this,
"");
295 include_once(
"./Modules/Glossary/classes/class.ilGlossaryForeignTermCollectorGUI.php");
297 $this->ctrl->forwardCommand($coll);
301 $cmd = $this->ctrl->getCmd(
"listTerms");
303 if (($cmd ==
"create") && (
$_POST[
"new_type"] ==
"term")) {
304 $this->ctrl->setCmd(
"create");
305 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
309 if (!in_array($cmd, array(
"quickList"))) {
310 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
320 if ($cmd ==
"redrawHeaderAction") {
321 $cmd =
"redrawHeaderActionObject";
325 $ret = $this->$cmd();
330 if (!in_array($cmd, array(
"quickList"))) {
331 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui") {
337 $this->tpl->show(
false);
343 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
360 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
362 $form->setTarget(
"_top");
363 $form->setFormAction($this->ctrl->getFormAction($this));
364 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
370 $ti->setRequired(
true);
381 "none" => $this->lng->txt(
"glo_mode_normal"),
382 "level" => $this->lng->txt(
"glo_mode_level"),
383 "subtree" => $this->lng->txt(
"glo_mode_subtree")
386 $tm->setOptions($stati);
387 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
388 $tm->setRequired(
true);
391 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
392 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
409 $new_type = $_REQUEST[
"new_type"];
413 $ilErr->raiseError($this->lng->txt(
"no_create_permission"),
$ilErr->MESSAGE);
416 $this->lng->loadLanguageModule($new_type);
417 $this->ctrl->setParameter($this,
"new_type", $new_type);
420 if (
$form->checkInput()) {
421 $this->ctrl->setParameter($this,
"new_type",
"");
423 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
425 $newObj->setType($new_type);
426 $newObj->setTitle(
$form->getInput(
"title"));
427 $newObj->setDescription(
$form->getInput(
"desc"));
428 $newObj->setVirtualMode(
$form->getInput(
"glo_mode"));
434 ilUtil::sendSuccess($this->lng->txt(
"glo_added"),
true);
435 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
439 $form->setValuesByPost();
440 $this->tpl->setContent(
$form->getHtml());
454 $this->lng->loadLanguageModule(
"meta");
455 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
458 $info->enablePrivateNotes();
460 if ($this->access->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
461 $info->enableNewsEditing();
463 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
464 if ($enable_internal_rss) {
465 $info->setBlockProperty(
"news",
"settings",
true);
468 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
472 $this->ctrl->forwardCommand(
$info);
486 $ilAccess =
$DIC->access();
488 $info->addSection(
$lng->txt(
"glo_usages"));
489 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
491 foreach ($sms as $sm) {
494 foreach ($refs as $ref) {
495 if ($link ===
false) {
496 if ($ilAccess->checkAccess(
"write",
"", $ref)) {
497 include_once(
"./Services/Link/classes/class.ilLink.php");
504 if ($link !==
false) {
505 $entry =
"<a href='" . $link .
"' target='_top'>" . $entry .
"</a>";
508 $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
517 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
518 parent::viewObject();
522 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
523 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
541 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
543 $ecs->addSettingsToForm($this->form,
'glo');
545 $this->tpl->setContent($this->form->getHTML());
557 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
562 $title->setRequired(
true);
563 $this->form->addItem(
$title);
567 $this->form->addItem($desc);
569 $this->lng->loadLanguageModule(
"rep");
571 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
576 $online->setValue(
"y");
577 $online->setInfo($this->lng->txt(
"glo_online_info"));
578 $this->form->addItem($online);
581 $section->setTitle($this->lng->txt(
'glo_content_settings'));
587 $op1 =
new ilRadioOption($this->lng->txt(
"glo_mode_normal"),
"none", $this->lng->txt(
"glo_mode_normal_info"));
588 $glo_mode->addOption($op1);
589 $op2 =
new ilRadioOption($this->lng->txt(
"glo_mode_level"),
"level", $this->lng->txt(
"glo_mode_level_info"));
590 $glo_mode->addOption($op2);
591 $op3 =
new ilRadioOption($this->lng->txt(
"glo_mode_subtree"),
"subtree", $this->lng->txt(
"glo_mode_subtree_info"));
592 $glo_mode->addOption($op3);
593 $this->form->addItem($glo_mode);
608 $section->setTitle($this->lng->txt(
'cont_presentation'));
612 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
616 $pres_mode->setValue(
"table");
617 $op1 =
new ilRadioOption($this->lng->txt(
"glo_table_form"),
"table", $this->lng->txt(
"glo_table_form_info"));
620 $snl =
new ilNumberInputGUI($this->lng->txt(
"glo_text_snippet_length"),
"snippet_length");
621 $snl->setMaxValue(3000);
622 $snl->setMinValue(100);
623 $snl->setMaxLength(4);
625 $snl->setInfo($this->lng->txt(
"glo_text_snippet_length_info"));
627 $op1->addSubItem($snl);
629 $pres_mode->addOption($op1);
630 $op2 =
new ilRadioOption($this->lng->txt(
"glo_full_definitions"),
"full_def", $this->lng->txt(
"glo_full_definitions_info"));
631 $pres_mode->addOption($op2);
632 $this->form->addItem($pres_mode);
635 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
637 if (count($tax_ids) > 0) {
639 $show_tax->setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
640 $this->form->addItem($show_tax);
644 $down =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"glo_act_downloads");
645 $down->setValue(
"y");
646 $down->setInfo($this->lng->txt(
"cont_downloads_desc"));
647 $this->form->addItem($down);
649 if ($a_mode ==
"edit") {
650 $title->setValue($this->object->getTitle());
651 $desc->setValue($this->object->getDescription());
652 $online->setChecked($this->object->getOnline());
653 $glo_mode->setValue($this->object->getVirtualMode());
654 $pres_mode->setValue($this->object->getPresentationMode());
655 $snl->setValue($this->object->getSnippetLength());
656 if (count($tax_ids) > 0) {
657 $show_tax->setChecked($this->object->getShowTaxonomy());
660 $down->setChecked($this->object->isActiveDownloads());
664 $feat->setTitle($this->lng->txt(
'obj_features'));
665 $this->form->addItem($feat);
667 include_once
'./Services/Container/classes/class.ilContainer.php';
668 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
670 $this->object->getId(),
679 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
681 $cols = $adv_ap->getColumnOrder();
682 if (count(
$cols) > 1) {
683 include_once
'./Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
685 $this->form->addItem($ti);
686 $ti->setValue(
$cols);
690 $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
692 $this->form->setTitle($this->lng->txt(
"cont_glo_properties"));
693 $this->form->setFormAction($this->ctrl->getFormAction($this));
705 if ($this->form->checkInput()) {
706 $this->
object->setTitle(
$_POST[
'title']);
707 $this->
object->setDescription(
$_POST[
'description']);
709 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
712 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
713 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
714 $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
715 $this->
object->update();
718 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
721 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
723 $cols = $adv_ap->getColumnOrder();
724 if (count(
$cols) > 1) {
725 $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
729 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
732 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
734 $this->object->getId(),
742 include_once
'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
744 if ($ecs->handleSettingsUpdate()) {
745 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
746 $this->ctrl->redirect($this,
"properties");
749 $this->form->setValuesByPost();
750 $this->tpl->setContent($this->form->getHTML());
759 if (
$_GET[
"show_tax"]) {
764 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
765 $ti =
new ilTextInputGUI($this->lng->txt(
"cont_new_term"),
"new_term");
766 $ti->setMaxLength(80);
768 $this->toolbar->addInputItem($ti,
true);
771 $this->lng->loadLanguageModule(
"meta");
776 $s_lang = $this->
user->getLanguage();
778 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
781 $si->setValue($s_lang);
782 $this->toolbar->addInputItem(
$si,
true);
784 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
785 $this->toolbar->addFormButton($this->lng->txt(
"glo_add_new_term"),
"addTerm");
787 $this->toolbar->addSeparator();
790 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
791 if ($this->
user->clipboardHasObjectsOfType(
"term")) {
792 $this->toolbar->addButton(
793 $this->lng->txt(
"paste"),
794 $this->ctrl->getLinkTarget($this,
"pasteTerms")
796 $this->toolbar->addButton(
797 $this->lng->txt(
"clear_clipboard"),
798 $this->ctrl->getLinkTarget($this,
"clearClipboard")
801 $this->toolbar->addButton(
802 $this->lng->txt(
"glo_add_from_other"),
803 $this->ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"")
807 if (is_object($this->tax)) {
808 $this->toolbar->addSeparator();
809 if (
$_GET[
"show_tax"]) {
810 $this->toolbar->addButton(
811 $this->lng->txt(
"glo_hide_taxonomy"),
812 $this->ctrl->getLinkTarget($this,
"deactTaxonomy")
815 $this->toolbar->addButton(
816 $this->lng->txt(
"glo_show_taxonomy"),
817 $this->ctrl->getLinkTarget($this,
"actTaxonomy")
822 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
824 $this->tpl->setContent(
$tab->getHTML());
835 $this->ctrl->setParameter($this,
"show_tax", 1);
836 $this->ctrl->redirect($this,
"listTerms");
847 $this->ctrl->setParameter($this,
"show_tax",
"");
848 $this->ctrl->redirect($this,
"listTerms");
863 $notoperations = array();
864 $operations = array();
868 if (count($operations) > 0) {
869 foreach ($operations as $val) {
870 $this->tpl->setCurrentBlock(
"tbl_action_btn");
871 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
872 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
873 $this->tpl->parseCurrentBlock();
876 $this->tpl->setCurrentBlock(
"tbl_action_row");
878 $this->tpl->parseCurrentBlock();
887 if (trim(
$_POST[
"new_term"]) ==
"") {
889 $this->ctrl->redirect($this,
"listTerms");
893 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
895 $term->setGlossary($this->
object);
907 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
908 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def",
$def->getId());
909 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
910 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
918 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
921 $definition->moveUp();
923 $this->ctrl->redirect($this,
"listTerms");
931 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
934 $definition->moveDown();
936 $this->ctrl->redirect($this,
"listTerms");
953 $this->ctrl->setParameterByClass(
958 $link =
"[<a href='" .
959 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
960 "'>" . $this->lng->txt(
"glo_list_usages") .
"</a>]";
961 $add =
"<br/>" . sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link;
964 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
966 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure") . $add);
968 $cgui->setFormAction($this->ctrl->getFormAction($this));
969 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDefinitionDeletion");
970 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteDefinition");
976 $this->tpl->setCurrentBlock(
"SyntaxStyle");
977 $this->tpl->setVariable(
978 "LOCATION_SYNTAX_STYLESHEET",
981 $this->tpl->parseCurrentBlock();
985 $page_gui->setTemplateOutput(
false);
986 $page_gui->setStyleId($this->object->getStyleSheetId());
987 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
988 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
989 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
990 $output = $page_gui->preview();
994 $this->tpl->setContent($cgui->getHTML());
999 $this->ctrl->redirect($this,
"listTerms");
1006 $definition->delete();
1007 $this->ctrl->redirect($this,
"listTerms");
1029 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1030 $this->ctrl->redirect($this,
"listTerms");
1042 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1044 $glo_exp->buildExportFile();
1045 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1053 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1055 $glo_exp->buildExportFile();
1057 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1067 if (!isset(
$_POST[
"file"])) {
1068 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1070 if (count(
$_POST[
"file"]) > 1) {
1071 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
1074 $file = explode(
":",
$_POST[
"file"][0]);
1075 $export_dir = $this->
object->getExportDirectory($file[0]);
1077 if ($this->object->getPublicExportFile($file[0]) ==
1079 $this->
object->setPublicExportFile($file[0],
"");
1081 $this->
object->setPublicExportFile($file[0], $file[1]);
1083 $this->
object->update();
1084 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1100 if (!isset(
$_POST[
"id"])) {
1102 $this->ctrl->redirect($this,
"listTerms");
1106 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1107 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1112 $this->ctrl->redirect($this,
"listTerms");
1117 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1119 $cgui->setFormAction($this->ctrl->getFormAction($this));
1120 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1121 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelTermDeletion");
1122 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteTerms");
1124 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1132 $this->ctrl->setParameterByClass(
1133 "ilglossarytermgui",
1139 $add =
" (" . $this->lng->txt(
"glo_term_reference") .
")";
1141 $link =
"[<a href='" .
1142 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
1143 "'>" . $this->lng->txt(
"glo_list_usages") .
"</a>]";
1144 $add =
"<div class='small'>" .
1145 sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link .
"</div>";
1149 $cgui->addItem(
"id[]",
$id,
$term->getTerm() . $add);
1152 $this->tpl->setContent($cgui->getHTML());
1162 $this->ctrl->redirect($this,
"listTerms");
1170 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1174 $refs->deleteTerm(
$id);
1181 $this->ctrl->redirect($this,
"listTerms");
1193 if (strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui") {
1194 parent::setLocator($a_tree, $a_id);
1196 if (is_object($this->
object)) {
1197 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1199 if (is_object($this->term)) {
1200 $gloss_loc->setTerm($this->term);
1202 $gloss_loc->setGlossary($this->
object);
1204 $gloss_loc->display();
1223 switch (
$_POST[
"new_type"]) {
1226 $term_gui->create();
1234 $term_gui->setGlossary($this->
object);
1237 ilUtil::sendSuccess($this->lng->txt(
"cont_added_term"),
true);
1240 $this->ctrl->redirect($this,
"listTerms");
1251 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1253 if ($term_glo_id != $this->object->getId()) {
1255 $this->ctrl->redirect($this,
"listTerms");
1259 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1268 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
1269 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def",
$def->getId());
1270 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
1271 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1276 $this->tpl->getStandardTemplate();
1278 $title = $this->
object->getTitle();
1281 if ($this->term_id > 0) {
1282 $this->tpl->setTitle($this->lng->txt(
"term") .
": " .
1285 parent::setTitleAndDescription();
1287 $this->tpl->setTitle($this->lng->txt(
"glo") .
": " .
$title);
1304 $this->help->setScreenIdComponent(
"glo");
1307 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"listTerms")
1310 $this->tabs_gui->addTarget(
1312 $this->ctrl->getLinkTarget($this,
"listTerms"),
1313 array(
"listTerms",
""),
1319 $force_active =
false;
1320 if ($this->ctrl->getCmd() ==
"showSummary" ||
1321 strtolower($this->ctrl->getNextClass()) ==
"ilinfoscreengui") {
1322 $force_active =
true;
1324 $this->tabs_gui->addTarget(
1326 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
1334 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
1335 $this->tabs_gui->addTarget(
1337 $this->ctrl->getLinkTarget($this,
"properties"),
1343 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
1345 $mdtab = $mdgui->getTab();
1347 $this->tabs_gui->addTarget(
1351 "ilobjectmetadatagui"
1361 $this->tabs_gui->addTarget(
1363 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1370 if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
1376 $this->tabs_gui->addTarget(
1378 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1379 array(
"perm",
"info",
"owner"),
1384 $this->tabs_gui->addNonTabbedLink(
1385 "presentation_view",
1386 $this->lng->txt(
"glo_presentation_view"),
1387 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->object->getRefID(),
1399 array(
"general_settings",
"style",
"taxonomy",
"glossaries")
1402 $this->tabs->addSubTab(
1404 $this->lng->txt(
"settings"),
1405 $this->ctrl->getLinkTarget($this,
'properties')
1409 $this->tabs->addSubTab(
1411 $this->lng->txt(
"obj_sty"),
1412 $this->ctrl->getLinkTarget($this,
'editStyleProperties')
1416 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1418 $this->tabs->addSubTab(
1420 $this->lng->txt(
"tax_taxonomy"),
1421 $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
'')
1425 $this->tabs->addSubTab(
1427 $this->lng->txt(
"cont_auto_glossaries"),
1428 $this->ctrl->getLinkTarget($this,
'editGlossaries')
1431 $this->tabs->activateSubTab($a_active);
1446 $ilAccess =
$DIC->access();
1449 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1450 $_GET[
"ref_id"] = $a_target;
1451 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1452 include(
"ilias.php");
1454 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1455 $_GET[
"ref_id"] = $a_target;
1456 $_GET[
"cmd"] =
"infoScreen";
1457 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1458 include(
"ilias.php");
1460 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1462 $lng->txt(
"msg_no_perm_read_item"),
1476 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1478 $prtab->resetOffset();
1479 $prtab->writeFilterToSession();
1489 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1491 $prtab->resetOffset();
1492 $prtab->resetFilter();
1506 if ($a_tpl !=
null) {
1512 $ctpl->setCurrentBlock(
"ContentStyle");
1514 "LOCATION_CONTENT_STYLESHEET",
1517 $ctpl->parseCurrentBlock();
1529 $this->tpl->setContent($this->form->getHTML());
1531 $this->tabs->activateTab(
"settings");
1540 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1541 $this->lng->loadLanguageModule(
"style");
1543 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1546 $fixed_style = $this->setting->get(
"fixed_content_style_id");
1547 $style_id = $this->
object->getStyleSheetId();
1549 if ($fixed_style > 0) {
1552 $this->lng->txt(
"global_fixed") .
")");
1553 $this->form->addItem($st);
1561 $st_styles[0] = $this->lng->txt(
"default");
1564 if ($style_id > 0) {
1569 $this->form->addItem($st);
1574 $this->form->addCommandButton(
1576 $this->lng->txt(
"style_edit_style")
1578 $this->form->addCommandButton(
1580 $this->lng->txt(
"style_delete_style")
1594 $style_sel =
new ilSelectInputGUI($this->lng->txt(
"style_current_style"),
"style_id");
1595 $style_sel->setOptions($st_styles);
1596 $style_sel->setValue($style_id);
1597 $this->form->addItem($style_sel);
1599 $this->form->addCommandButton(
1600 "saveStyleSettings",
1601 $this->lng->txt(
"save")
1603 $this->form->addCommandButton(
1605 $this->lng->txt(
"sty_create_ind_style")
1609 $this->form->setTitle($this->lng->txt(
"glo_style"));
1610 $this->form->setFormAction($this->ctrl->getFormAction($this));
1618 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1626 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1634 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1642 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1643 if ($this->setting->get(
"fixed_content_style_id") <= 0 &&
1645 || $this->object->getStyleSheetId() == 0)) {
1647 $this->
object->update();
1648 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1650 $this->ctrl->redirect($this,
"editStyleProperties");
1658 if ($this->object->getPublicExportFile(
$a_type) == $a_file) {
1659 return $this->lng->txt(
"yes");
1673 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1675 if (count($tax_ids) > 0) {
1676 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1684 if (!$tax_exp->handleCommand()) {
1686 $this->tpl->setLeftNavContent($tax_exp->getHTML() .
" ");
1703 $this->tabs->setTabActive(
"settings");
1706 $this->toolbar->addButton(
1707 $this->lng->txt(
"add"),
1708 $this->ctrl->getLinkTarget($this,
"showGlossarySelector")
1711 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAutoLinkTableGUI.php");
1714 $this->tpl->setContent(
$tab->getHTML());
1725 $this->tabs->setTabActive(
"settings");
1728 include_once
'Services/Search/classes/class.ilSearchRootSelector.php';
1731 $exp->setExpand(
$_GET[
"search_root_expand"] ?
$_GET[
"search_root_expand"] : $this->tree->readRootId());
1732 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showGlossarySelector'));
1733 $exp->setTargetClass(get_class($this));
1734 $exp->setCmd(
'confirmGlossarySelection');
1735 $exp->setClickableTypes(array(
"glo"));
1736 $exp->addFilter(
"glo");
1740 $this->tpl->setContent($exp->getOutput());
1748 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1750 $this->ctrl->setParameter($this,
"glo_ref_id",
$_GET[
"root_id"]);
1751 $cgui->setFormAction($this->ctrl->getFormAction($this));
1752 $cgui->setHeaderText($this->lng->txt(
"glo_link_glo_in_glo"));
1753 $cgui->setCancel($this->lng->txt(
"no"),
"selectGlossary");
1754 $cgui->setConfirm($this->lng->txt(
"yes"),
"selectGlossaryLink");
1755 $this->tpl->setContent($cgui->getHTML());
1766 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1768 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
1781 $glos = $this->
object->getAutoGlossaries();
1782 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1784 if (!in_array($glo_id, $glos)) {
1787 $this->
object->setAutoGlossaries($glos);
1788 $this->
object->update();
1790 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1791 $this->ctrl->redirect($this,
"editGlossaries");
1802 $this->
object->removeAutoGlossary((
int)
$_GET[
"glo_id"]);
1803 $this->
object->update();
1805 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1806 $this->ctrl->redirect($this,
"editGlossaries");
1818 if (!is_array($items)) {
1820 $this->ctrl->redirect($this,
"listTerms");
1823 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1824 $this->
user->clipboardDeleteObjectsOfType(
"term");
1827 $time = date(
"Y-m-d H:i:s", time());
1829 foreach ($items as
$id) {
1830 $this->
user->addObjectToClipboard(
1841 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1842 $this->ctrl->redirect($this,
"listTerms");
1854 if (!is_array($items)) {
1856 $this->ctrl->redirect($this,
"listTerms");
1859 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1860 $this->
user->clipboardDeleteObjectsOfType(
"term");
1863 $time = date(
"Y-m-d H:i:s", time());
1865 foreach ($items as
$id) {
1866 $this->
user->addObjectToClipboard(
1877 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1878 $this->ctrl->redirect($this,
"listTerms");
1890 $this->
user->clipboardDeleteObjectsOfType(
"term");
1891 $this->ctrl->redirect($this,
"listTerms");
1899 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1901 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1906 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
1908 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1909 $refs->addTerm($item[
"id"]);
1913 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1914 $this->ctrl->redirect($this,
"listTerms");
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
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 _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
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
getObjectService()
Get object service.
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 redirect($a_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 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 sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
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.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
if(!array_key_exists('StateId', $_REQUEST)) $id
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
if(isset($_POST['submit'])) $form