5 require_once(
"classes/class.ilObjectGUI.php");
6 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
7 require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
8 require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
9 require_once(
"./Modules/Glossary/classes/class.ilTermDefinitionEditorGUI.php");
10 require_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
35 function ilObjGlossaryGUI($a_data,$a_id = 0,$a_call_by_reference =
true, $a_prepare_output =
true)
40 $this->ctrl->saveParameter($this, array(
"ref_id",
"offset"));
41 $lng->loadLanguageModule(
"content");
52 global
$lng, $ilAccess;
54 $cmd = $this->ctrl->getCmd();
55 $next_class = $this->ctrl->getNextClass($this);
65 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
67 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
68 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
70 $this->ctrl->forwardCommand($md_gui);
73 case "ilglossarytermgui":
74 $this->ctrl->setReturn($this,
"listTerms");
76 $term_gui->setGlossary($this->
object);
78 $ret =& $this->ctrl->forwardCommand($term_gui);
81 case "ilinfoscreengui":
86 case 'ilpermissiongui':
87 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
98 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
100 $ret =& $this->ctrl->forwardCommand($perm_gui);
103 case "ilcommonactiondispatchergui":
104 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
106 $this->ctrl->forwardCommand($gui);
110 $cmd = $this->ctrl->getCmd(
"frameset");
112 if ((
$cmd ==
"create") && (
$_POST[
"new_type"] ==
"term"))
114 $this->ctrl->setCmd(
"create");
115 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
121 if (!in_array(
$cmd, array(
"frameset",
"quickList")))
123 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
142 if (!in_array(
$cmd, array(
"frameset",
"quickList")))
144 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")
154 $this->tpl->show(
false);
160 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
177 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
179 $form->setTarget(
"_top");
180 $form->setFormAction($this->ctrl->getFormAction($this));
181 $form->setTitle($this->lng->txt($a_new_type.
"_new"));
187 $ti->setRequired(
true);
198 "none"=>$this->lng->txt(
"glo_mode_normal"),
199 "level"=>$this->lng->txt(
"glo_mode_level"),
200 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
204 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
205 $tm->setRequired(
true);
208 $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
209 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
231 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
234 $this->lng->loadLanguageModule($new_type);
235 $this->ctrl->setParameter($this,
"new_type", $new_type);
238 if ($form->checkInput())
240 $this->ctrl->setParameter($this,
"new_type",
"");
242 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
244 $newObj->setType($new_type);
245 $newObj->setTitle($form->getInput(
"title"));
246 $newObj->setDescription($form->getInput(
"desc"));
247 $newObj->setVirtualMode($form->getInput(
"glo_mode"));
254 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
258 $form->setValuesByPost();
259 $tpl->setContent($form->getHtml());
275 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
278 $this->lng->loadLanguageModule($new_type);
279 $this->ctrl->setParameter($this,
"new_type", $new_type);
282 if ($form->checkInput())
284 $this->ctrl->setParameter($this,
"new_type",
"");
285 $upload = $_FILES[
"importfile"];
288 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
290 $newObj->setType($new_type);
291 $newObj->setTitle($upload[
"name"]);
292 $newObj->create(
true);
297 $newObj->createImportDirectory();
300 $file = pathinfo($upload[
"name"]);
301 $full_path = $newObj->getImportDirectory().
"/".$upload[
"name"];
310 $subdir = basename(
$file[
"basename"],
".".
$file[
"extension"]);
311 $xml_file = $newObj->getImportDirectory().
"/".$subdir.
"/".$subdir.
".xml";
314 if (!is_dir($newObj->getImportDirectory().
"/".$subdir))
316 $this->ilias->raiseError(sprintf($this->lng->txt(
"cont_no_subdir_in_zip"), $subdir),
317 $this->ilias->error_obj->MESSAGE);
321 if (!is_file($xml_file))
323 $this->ilias->raiseError(sprintf($this->lng->txt(
"cont_zip_file_invalid"), $subdir.
"/".$subdir.
".xml"),
324 $this->ilias->error_obj->MESSAGE);
327 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
329 $contParser->startParsing();
336 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
340 $form->setValuesByPost();
341 $tpl->setContent($form->getHtml());
357 $this->lng->loadLanguageModule(
"meta");
358 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
361 $info->enablePrivateNotes();
363 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
365 $info->enableNewsEditing();
367 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
368 if ($enable_internal_rss)
370 $info->setBlockProperty(
"news",
"settings",
true);
373 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
377 $this->ctrl->forwardCommand($info);
388 global
$lng, $ilAccess;
390 $info->addSection($lng->txt(
"glo_usages"));
391 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
393 foreach ($sms as $sm)
397 foreach ($refs as $ref)
401 if ($ilAccess->checkAccess(
"write",
"", $ref))
403 include_once(
"./classes/class.ilLink.php");
412 $entry =
"<a href='".$link.
"' target='_top'>".$entry.
"</a>";
415 $info->addProperty($lng->txt(
"obj_sahs"), $entry);
424 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
430 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
432 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
436 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
438 $this->tpl->setCurrentBlock(
"btn_cell");
439 $this->tpl->setVariable(
"BTN_LINK",
440 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID());
441 $this->tpl->setVariable(
"BTN_TARGET",
" target=\"".
443 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
"view"));
444 $this->tpl->parseCurrentBlock();
460 $tpl->setContent($this->form->getHTML());
472 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
478 $this->form->addItem($cb);
482 "none"=>$this->lng->txt(
"glo_mode_normal"),
483 "level"=>$this->lng->txt(
"glo_mode_level"),
484 "subtree"=>$this->lng->txt(
"glo_mode_subtree")
488 $si->setInfo($lng->txt(
"glo_mode_desc"));
489 $this->form->addItem($si);
494 $op1 =
new ilRadioOption($lng->txt(
"glo_table_form"),
"table", $lng->txt(
"glo_table_form_info"));
497 $ni =
new ilNumberInputGUI($lng->txt(
"glo_text_snippet_length"),
"snippet_length");
498 $ni->setMaxValue(3000);
499 $ni->setMinValue(100);
500 $ni->setMaxLength(4);
502 $ni->
setInfo($lng->txt(
"glo_text_snippet_length_info"));
504 $op1->addSubItem($ni);
506 $radg->addOption($op1);
507 $op2 =
new ilRadioOption($lng->txt(
"glo_full_definitions"),
"full_def", $lng->txt(
"glo_full_definitions_info"));
508 $radg->addOption($op2);
509 $this->form->addItem($radg);
521 $cb->setInfo($lng->txt(
"cont_downloads_desc"));
522 $this->form->addItem($cb);
525 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
527 $this->form->setTitle($lng->txt(
"cont_glo_properties"));
528 $this->form->setFormAction($ilCtrl->getFormAction($this));
538 $values[
"cobj_online"] = $this->
object->getOnline();
539 $values[
"glo_mode"] = $this->
object->getVirtualMode();
541 $values[
"glo_act_downloads"] = $this->
object->isActiveDownloads();
542 $values[
"pres_mode"] = $this->
object->getPresentationMode();
543 $values[
"snippet_length"] = $this->
object->getSnippetLength();
545 $this->form->setValuesByArray($values);
556 if ($this->form->checkInput())
559 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
562 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
563 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
564 $this->
object->update();
567 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
571 $this->ctrl->redirect($this,
"properties");
573 $this->form->setValuesByPost();
574 $tpl->setContent($this->form->getHTML());
582 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
584 $fs_gui->setFramesetTitle($this->object->getTitle());
585 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this,
"listTerms"));
586 $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this,
"quickList"));
587 $fs_gui->setMainFrameName(
"content");
588 $fs_gui->setSideFrameName(
"tree");
600 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.glossary_short_list.html",
606 $this->tpl->setVariable(
"FORMACTION1", $this->ctrl->getFormAction($this));
607 $this->tpl->setVariable(
"CMD_REFR",
"quickList");
608 $this->tpl->setVariable(
"TXT_REFR", $this->lng->txt(
"refresh"));
609 $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_terms"));
611 include_once
"./Services/Table/classes/class.ilTableGUI.php";
616 $this->tpl->addBlockfile(
"SHORT_LIST",
"list",
"tpl.table.html");
619 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.term_short_tbl_row.html",
true);
623 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
632 $tbl->setHeaderNames(array($this->lng->txt(
"cont_term")));
634 $cols = array(
"term");
635 $header_params = $this->ctrl->getParameterArrayByClass(
"ilobjglossarygui",
"listTerms");
636 $header_params[
"cmd"] =
"quickList";
637 $tbl->setHeaderVars($cols, $header_params);
638 $tbl->setColumnWidth(array(
"100%"));
639 $tbl->disable(
"title");
642 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
643 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
644 $tbl->setLimit(
$_GET[
"limit"]);
645 $tbl->setOffset(
$_GET[
"offset"]);
646 $tbl->disable(
"header");
648 $term_list = $this->
object->getTermList();
649 $tbl->setMaxCount(count($term_list));
651 $this->tpl->setVariable(
"COLUMN_COUNT", 1);
654 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
658 $term_list = array_slice($term_list,
$_GET[
"offset"],
$_GET[
"limit"]);
663 if (count($term_list) > 0)
666 foreach($term_list as $key =>
$term)
671 for($j=0; $j<count($defs); $j++)
676 $this->tpl->setCurrentBlock(
"definition");
677 $this->tpl->setVariable(
"SEP", $sep);
678 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"term_id",
$term[
"id"]);
679 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"def", $def[
"id"]);
680 $this->tpl->setVariable(
"LINK_EDIT_DEF",
681 $this->ctrl->getLinkTargetByClass(array(
"ilglossarytermgui",
682 "iltermdefinitioneditorgui",
683 "ilpageobjectgui"),
"edit"));
684 $this->tpl->setVariable(
"TEXT_DEF", $this->lng->txt(
"glo_definition_abbr").($j+1));
685 $this->tpl->parseCurrentBlock();
689 $this->tpl->setCurrentBlock(
"tbl_content");
693 $this->tpl->setVariable(
"TEXT_TERM",
$term[
"term"]);
694 $this->ctrl->setParameter($this,
"term_id",
$term[
"id"]);
695 $this->tpl->setVariable(
"LINK_EDIT_TERM",
696 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"editTerm"));
698 $this->tpl->setVariable(
"CSS_ROW", $css_row);
699 $this->tpl->parseCurrentBlock();
705 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
706 $this->tpl->setVariable(
"NUM_COLS", $num);
720 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
724 $ilToolbar->addInputItem($ti,
true);
727 $this->lng->loadLanguageModule(
"meta");
731 $s_lang =
$_SESSION[
"il_text_lang_".$_GET[
"ref_id"]];
735 $s_lang = $ilUser->getLanguage();
737 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
740 $si->setValue($s_lang);
741 $ilToolbar->addInputItem($si,
true);
743 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
744 $ilToolbar->addFormButton($lng->txt(
"glo_add_new_term"),
"addTerm");
748 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
750 $tpl->setContent(
$tab->getHTML());
760 foreach ($a_actions as $name =>
$lng)
762 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
765 $notoperations = array();
766 $operations = array();
770 if (count($operations) > 0)
772 foreach ($operations as $val)
774 $this->tpl->setCurrentBlock(
"tbl_action_btn");
775 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
776 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
777 $this->tpl->parseCurrentBlock();
780 $this->tpl->setCurrentBlock(
"tbl_action_row");
782 $this->tpl->parseCurrentBlock();
793 if (trim(
$_POST[
"new_term"]) ==
"")
796 $ilCtrl->redirect($this,
"listTerms");
800 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
802 $term->setGlossary($this->
object);
810 $def->setTermId(
$term->getId());
814 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"term_id",
$term->getId());
815 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"def", $def->getId());
816 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
817 "iltermdefinitioneditorgui",
"ilpageobjectgui"),
"edit");
825 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
828 $definition->moveUp();
830 $this->ctrl->redirect($this,
"listTerms");
838 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
841 $definition->moveDown();
843 $this->ctrl->redirect($this,
"listTerms");
863 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
864 "term_id",
$_GET[
"term_id"]);
865 $link =
"[<a href='".
866 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
867 "'>".$lng->txt(
"glo_list_usages").
"</a>]";
868 $add =
"<br/>".sprintf($lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link;
873 $this->tpl->setCurrentBlock(
"ContentStyle");
874 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
876 $this->tpl->parseCurrentBlock();
879 $this->tpl->setCurrentBlock(
"SyntaxStyle");
880 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
882 $this->tpl->parseCurrentBlock();
888 $this->tpl->addBlockfile(
"ADM_CONTENT",
"def_list",
"tpl.glossary_definition_delete.html",
true);
891 $this->tpl->setVariable(
"TXT_TERM",
$term->getTerm());
897 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
898 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
899 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".
$_GET[
"ref_id"]);
900 $output = $page_gui->preview();
902 $this->tpl->setCurrentBlock(
"definition");
903 $this->tpl->setVariable(
"PAGE_CONTENT", $output);
904 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
905 $this->tpl->setVariable(
"LINK_CANCEL",
906 $this->ctrl->getLinkTarget($this,
"cancelDefinitionDeletion"));
907 $this->tpl->setVariable(
"TXT_CONFIRM", $this->lng->txt(
"confirm"));
908 $this->ctrl->setParameter($this,
"def", $definition->getId());
909 $this->tpl->setVariable(
"LINK_CONFIRM",
910 $this->ctrl->getLinkTarget($this,
"deleteDefinition"));
911 $this->tpl->parseCurrentBlock();
927 $this->ctrl->redirect($this,
"listTerms");
934 $definition->delete();
935 $this->ctrl->redirect($this,
"listTerms");
976 $this->ctrl->redirect($this,
"listTerms");
990 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
993 $this->tpl->setCurrentBlock(
"btn_cell");
994 $this->tpl->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this,
"export"));
995 $this->tpl->setVariable(
"BTN_TXT", $this->lng->txt(
"cont_create_export_file_xml"));
996 $this->tpl->parseCurrentBlock();
999 $this->tpl->setCurrentBlock(
"btn_cell");
1000 $this->tpl->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this,
"exportHTML"));
1001 $this->tpl->setVariable(
"BTN_TXT", $this->lng->txt(
"cont_create_export_file_html"));
1002 $this->tpl->parseCurrentBlock();
1005 if (is_file($this->object->getExportDirectory().
"/export.log"))
1007 $this->tpl->setCurrentBlock(
"btn_cell");
1008 $this->tpl->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this,
"viewExportLog"));
1009 $this->tpl->setVariable(
"BTN_TXT", $this->lng->txt(
"cont_view_last_export_log"));
1010 $this->tpl->parseCurrentBlock();
1014 $export_dir = $this->
object->getExportDirectory();
1016 $export_files = $this->
object->getExportFiles();
1019 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
1023 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
1026 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.glo_export_file_row.html",
true);
1030 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1032 $tbl->setTitle($this->lng->txt(
"cont_export_files"));
1034 $tbl->setHeaderNames(array(
"", $this->lng->txt(
"type"),
1035 $this->lng->txt(
"cont_file"),
1036 $this->lng->txt(
"cont_size"), $this->lng->txt(
"date") ));
1038 $cols = array(
"",
"type",
"file",
"size",
"date");
1039 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
1040 "cmd" =>
"exportList",
"cmdClass" => get_class($this));
1041 $tbl->setHeaderVars($cols, $header_params);
1042 $tbl->setColumnWidth(array(
"1%",
"9%",
"40%",
"25%",
"25%"));
1043 $tbl->disable(
"sort");
1046 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1047 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1048 $tbl->setLimit(
$_GET[
"limit"]);
1049 $tbl->setOffset(
$_GET[
"offset"]);
1050 $tbl->setMaxCount($this->maxcount);
1052 $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
1056 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1057 $this->tpl->setVariable(
"BTN_NAME",
"confirmDeleteExportFile");
1058 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
1059 $this->tpl->parseCurrentBlock();
1061 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1062 $this->tpl->setVariable(
"BTN_NAME",
"downloadExportFile");
1063 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"download"));
1064 $this->tpl->parseCurrentBlock();
1067 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1068 $this->tpl->setVariable(
"BTN_NAME",
"publishExportFile");
1069 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"cont_public_access"));
1070 $this->tpl->parseCurrentBlock();
1073 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1076 $tbl->setMaxCount(count($export_files));
1077 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
1080 if(count($export_files) > 0)
1083 foreach($export_files as $exp_file)
1085 $this->tpl->setCurrentBlock(
"tbl_content");
1086 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
1089 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1091 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
1093 $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($exp_file[
"type"]))
1094 ?
" <b>(".$this->lng->txt(
"public").
")<b>"
1096 $this->tpl->setVariable(
"TXT_TYPE", $exp_file[
"type"].$public_str);
1097 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
1099 $file_arr = explode(
"__", $exp_file[
"file"]);
1100 $this->tpl->setVariable(
"TXT_DATE", date(
"Y-m-d H:i:s",$file_arr[0]));
1102 $this->tpl->parseCurrentBlock();
1108 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1109 $this->tpl->setVariable(
"NUM_COLS", 3);
1113 $this->tpl->parseCurrentBlock();
1122 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1124 $glo_exp->buildExportFile();
1125 $this->ctrl->redirect($this,
"exportList");
1133 require_once(
"./Modules/Glossary/classes/class.ilGlossaryExport.php");
1135 $glo_exp->buildExportFile();
1137 $this->ctrl->redirect($this,
"exportList");
1146 if(!isset(
$_POST[
"file"]))
1148 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1151 if (count(
$_POST[
"file"]) > 1)
1153 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1157 $export_dir = $this->
object->getExportDirectory(
$file[0]);
1167 if(!isset(
$_POST[
"file"]))
1169 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1171 if (count(
$_POST[
"file"]) > 1)
1173 $this->ilias->raiseError($this->lng->txt(
"cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1177 $export_dir = $this->
object->getExportDirectory(
$file[0]);
1179 if ($this->object->getPublicExportFile(
$file[0]) ==
1182 $this->
object->setPublicExportFile(
$file[0],
"");
1186 $this->
object->setPublicExportFile(
$file[0],
$file[1]);
1188 $this->
object->update();
1189 $this->ctrl->redirect($this,
"exportList");
1202 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
1205 $this->tpl->setCurrentBlock(
"btn_cell");
1206 $this->tpl->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this,
"exportList"));
1207 $this->tpl->setVariable(
"BTN_TXT", $this->lng->txt(
"cont_export_files"));
1208 $this->tpl->parseCurrentBlock();
1211 $this->tpl->setVariable(
"ADM_CONTENT",
1212 nl2br(file_get_contents($this->object->getExportDirectory().
"/export.log")));
1214 $this->tpl->parseCurrentBlock();
1222 if(!isset(
$_POST[
"file"]))
1224 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1232 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.confirm_deletion.html",
"Modules/Glossary");
1236 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1239 $this->tpl->setCurrentBlock(
"table_header");
1240 $this->tpl->setVariable(
"TEXT",$this->lng->txt(
"objects"));
1241 $this->tpl->parseCurrentBlock();
1247 $file = explode(
":", $file);
1248 $this->tpl->setCurrentBlock(
"table_row");
1250 $this->tpl->setVariable(
"TEXT_CONTENT", $file[1].
" (".$file[0].
")");
1251 $this->tpl->parseCurrentBlock();
1256 $buttons = array(
"cancelDeleteExportFile" => $this->lng->txt(
"cancel"),
1257 "deleteExportFile" => $this->lng->txt(
"confirm"));
1258 foreach ($buttons as $name => $value)
1260 $this->tpl->setCurrentBlock(
"operation_btn");
1261 $this->tpl->setVariable(
"BTN_NAME",$name);
1262 $this->tpl->setVariable(
"BTN_VALUE",$value);
1263 $this->tpl->parseCurrentBlock();
1272 session_unregister(
"ilExportFiles");
1273 $this->ctrl->redirect($this,
"exportList");
1283 $file = explode(
":", $file);
1284 $export_dir = $this->
object->getExportDirectory($file[0]);
1286 $exp_file = $export_dir.
"/".$file[1];
1287 $exp_dir = $export_dir.
"/".substr($file, 0, strlen($file) - 4);
1288 if (@is_file($exp_file))
1292 if (@is_dir($exp_dir))
1297 $this->ctrl->redirect($this,
"exportList");
1308 if (!isset(
$_POST[
"id"]))
1311 $ilCtrl->redirect($this,
"listTerms");
1317 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.obj_confirm.html");
1320 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1323 $cols = array(
"cont_term");
1324 foreach ($cols as $key)
1326 $this->tpl->setCurrentBlock(
"table_header");
1327 $this->tpl->setVariable(
"TEXT",$this->lng->txt($key));
1328 $this->tpl->parseCurrentBlock();
1331 foreach(
$_POST[
"id"] as $id)
1339 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
1341 $link =
"[<a href='".
1342 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages").
1343 "'>".$lng->txt(
"glo_list_usages").
"</a>]";
1344 $add =
"<div class='small'>".
1345 sprintf($lng->txt(
"glo_term_is_used_n_times"), $nr).
" ".$link.
"</div>";
1350 $this->tpl->setCurrentBlock(
"table_cell");
1351 $this->tpl->setVariable(
"TEXT_CONTENT",
$term->getTerm().$add);
1352 $this->tpl->parseCurrentBlock();
1355 $this->tpl->setCurrentBlock(
"table_row");
1357 $this->tpl->parseCurrentBlock();
1361 $buttons = array(
"deleteTerms" => $this->lng->txt(
"confirm"),
1362 "cancelTermDeletion" => $this->lng->txt(
"cancel"));
1364 foreach($buttons as $name => $value)
1366 $this->tpl->setCurrentBlock(
"operation_btn");
1367 $this->tpl->setVariable(
"BTN_NAME",$name);
1368 $this->tpl->setVariable(
"BTN_VALUE",$value);
1369 $this->tpl->parseCurrentBlock();
1381 session_unregister(
"term_delete");
1382 $this->ctrl->redirect($this,
"listTerms");
1390 foreach(
$_SESSION[
"term_delete"] as $id)
1395 session_unregister(
"term_delete");
1396 $this->ctrl->redirect($this,
"listTerms");
1408 global $ilias_locator;
1410 if(strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui")
1416 if(is_object($this->
object))
1418 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1420 if (is_object($this->term))
1422 $gloss_loc->setTerm($this->term);
1424 $gloss_loc->setGlossary($this->
object);
1426 $gloss_loc->display();
1446 switch(
$_POST[
"new_type"])
1450 $term_gui->create();
1458 $term_gui->setGlossary($this->
object);
1464 $ilCtrl->redirect($this,
"listTerms");
1475 if (count(
$_POST[
"id"]) < 1)
1478 $ilCtrl->redirect($this,
"listTerms");
1481 if (count(
$_POST[
"id"]) > 1)
1484 $ilCtrl->redirect($this,
"listTerms");
1488 include_once (
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1493 $def->setTermId(
$term->getId());
1497 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"term_id",
$term->getId());
1498 $this->ctrl->setParameterByClass(
"ilpageobjectgui",
"def", $def->getId());
1499 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
1500 "iltermdefinitioneditorgui",
"ilpageobjectgui"),
"edit");
1506 $this->tpl->getStandardTemplate();
1508 $title = $this->
object->getTitle();
1511 if (
$_GET[
"term_id"] > 0)
1513 $this->tpl->setTitle($this->lng->txt(
"term").
": ".
1519 $this->tpl->setTitle($this->lng->txt(
"glo").
": ".
$title);
1530 #include_once("classes/class.ilTabsGUI.php");
1531 #$tabs_gui =& new ilTabsGUI();
1532 $this->
getTabs($this->tabs_gui);
1534 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
1546 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"listTerms")
1549 $tabs_gui->addTarget(
"cont_terms",
1550 $this->ctrl->getLinkTarget($this,
"listTerms"), array(
"listTerms",
""),
1551 get_class($this),
"", $force_active);
1553 $force_active =
false;
1554 if ($this->ctrl->getCmd() ==
"showSummary" ||
1555 strtolower($this->ctrl->getNextClass()) ==
"ilinfoscreengui")
1557 $force_active =
true;
1559 $tabs_gui->addTarget(
"info_short",
1560 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
1561 "ilInfoScreenGUI",
"", $force_active);
1564 $tabs_gui->addTarget(
"settings",
1565 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
1569 $tabs_gui->addTarget(
"meta_data",
1570 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
'listSection'),
1571 "",
"ilmdeditorgui");
1574 $tabs_gui->addTarget(
"export",
1575 $this->ctrl->getLinkTarget($this,
"exportList"),
1576 array(
"exportList",
"viewExportLog"), get_class($this));
1579 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
1586 $tabs_gui->addTarget(
"perm_settings",
1587 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1591 $tabs_gui->addNonTabbedLink(
"presentation_view",
1592 $this->lng->txt(
"glo_presentation_view"),
1593 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$this->object->getRefID(),
1608 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1610 $_GET[
"ref_id"] = $a_target;
1611 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1612 include(
"ilias.php");
1615 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1617 $_GET[
"ref_id"] = $a_target;
1618 $_GET[
"cmd"] =
"infoScreen";
1619 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1620 include(
"ilias.php");
1623 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1625 $_GET[
"cmd"] =
"frameset";
1626 $_GET[
"target"] =
"";
1627 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1630 include(
"repository.php");
1634 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
1644 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1646 $prtab->resetOffset();
1647 $prtab->writeFilterToSession();
1658 include_once(
"./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1660 $prtab->resetOffset();
1661 $prtab->resetFilter();