ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilGlossaryTermGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
5 require_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
6 
18 {
19  var $ilias;
20  var $lng;
21  var $tpl;
22  var $glossary;
23  var $term;
24  var $link_xml;
25 
30  function ilGlossaryTermGUI($a_id = 0)
31  {
32  global $lng, $ilias, $tpl, $ilCtrl;
33 
34  $this->lng =& $lng;
35  $this->ilias =& $ilias;
36  $this->tpl =& $tpl;
37  $this->ctrl =& $ilCtrl;
38  $this->ctrl->saveParameter($this, array("term_id"));
39 
40  if($a_id != 0)
41  {
42  $this->term =& new ilGlossaryTerm($a_id);
43  }
44  }
45 
49  function executeCommand()
50  {
51  $next_class = $this->ctrl->getNextClass($this);
52  $cmd = $this->ctrl->getCmd();
53 
54  switch ($next_class)
55  {
56 
57  case "iltermdefinitioneditorgui":
58  //$this->ctrl->setReturn($this, "listDefinitions");
59  $def_edit =& new ilTermDefinitionEditorGUI();
60  //$ret =& $def_edit->executeCommand();
61  $ret =& $this->ctrl->forwardCommand($def_edit);
62  $this->quickList("edit", $def_edit);
63  break;
64 
65  case "ilpropertyformgui";
66  $form = $this->getEditTermForm();
67  $this->ctrl->forwardCommand($form);
68  break;
69 
70  default:
71  $ret =& $this->$cmd();
72  break;
73  }
74  }
75 
81  function setOfflineDirectory ($offdir) {
82  $this->offline_directory = $offdir;
83  }
84 
85 
90  function getOfflineDirectory () {
91  return $this->offline_directory;
92  }
93 
94 
95  function setGlossary($a_glossary)
96  {
97  $this->glossary = $a_glossary;
98  }
99 
100  function setLinkXML($a_link_xml)
101  {
102  $this->link_xml = $a_link_xml;
103  }
104 
105  function getLinkXML()
106  {
107  return $this->link_xml;
108  }
109 
113  function create()
114  {
115  // deprecated
116  }
117 
121  function saveTerm()
122  {
123  // deprecated
124  }
125 
126 
130  function editTerm()
131  {
132  global $ilTabs, $ilCtrl;
133 
134  $this->getTemplate();
135  $this->displayLocator();
136  $this->setTabs();
137  $ilTabs->activateTab("properties");
138 
139  $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
140  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
141 
142  $form = $this->getEditTermForm();
143 
144  $this->tpl->setContent($ilCtrl->getHTML($form));
145 
146  $this->quickList();
147  }
148 
155  function getEditTermForm()
156  {
157  global $ilTabs, $ilCtrl;
158 
159  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
160  $form = new ilPropertyFormGUI();
161  $form->setFormAction($this->ctrl->getFormAction($this, "updateTerm"));
162  $form->setTitle($this->lng->txt("cont_edit_term"));
163 
164  $term = new ilTextInputGUI($this->lng->txt("cont_term"), "term");
165  $term->setRequired(true);
166  $term->setValue($this->term->getTerm());
167  $form->addItem($term);
168 
169  $lang = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
170  $lang->setRequired(true);
171  $lang->setOptions(ilMDLanguageItem::_getLanguages());
172  $lang->setValue($this->term->getLanguage());
173  $form->addItem($lang);
174 
175  // taxonomy
176  if ($this->glossary->getTaxonomyId() > 0)
177  {
178  include_once("./Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php");
179  $tax_node_assign = new ilTaxSelectInputGUI($this->glossary->getTaxonomyId(), "tax_node", true);
180 
181  include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
182  $ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
183  $assgnmts = $ta->getAssignmentsOfItem($this->term->getId());
184  $node_ids = array();
185  foreach ($assgnmts as $a)
186  {
187  $node_ids[] = $a["node_id"];
188  }
189  $tax_node_assign->setValue($node_ids);
190 
191  $form->addItem($tax_node_assign);
192 
193  }
194 
195  // advanced metadata
196  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
197  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'glo',$this->glossary->getId(),'term',
198  $this->term->getId());
199  $record_gui->setPropertyForm($form);
200  $record_gui->setSelectedOnly(true);
201  $record_gui->parse();
202 
203  $form->addCommandButton("updateTerm", $this->lng->txt("save"));
204 
205  return $form;
206  }
207 
208 
209 
213  function updateTerm()
214  {
215  // update term
216  $this->term->setTerm(ilUtil::stripSlashes($_POST["term"]));
217  $this->term->setLanguage($_POST["term_language"]);
218  $this->term->update();
219 
220  // update taxonomy assignment
221  if ($this->glossary->getTaxonomyId() > 0)
222  {
223  include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
224  $ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
225  $ta->deleteAssignmentsOfItem($this->term->getId());
226  if (is_array($_POST["tax_node"]))
227  {
228  foreach ($_POST["tax_node"] as $node_id)
229  {
230  $ta->addAssignment($node_id, $this->term->getId());
231  }
232  }
233 
234  }
235 
236  // advanced metadata
237  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
239  'glo',$this->glossary->getId(),'term', $this->term->getId());
240  $record_gui->loadFromPost();
241  $record_gui->saveValues();
242 
243  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
244  $this->ctrl->redirect($this, "editTerm");
245  }
246 
253  function getOverlayHTML($a_close_el_id, $a_glo_ov_id = "", $a_lang = "", $a_outputmode = "offline")
254  {
255  global $lng;
256 
257  if ($a_lang == "")
258  {
259  $a_lang = $lng->getLangKey();
260  }
261 
262  $tpl = new ilTemplate("tpl.glossary_overlay.html", true, true, "Modules/Glossary");
263 // $this->output(true, $tpl);
264  if ($a_outputmode == "preview")
265  {
266  $a_outputmode = "presentation";
267  }
268  if ($a_outputmode == "offline")
269  {
270  $this->output(true, $tpl, $a_outputmode);
271  }
272  else
273  {
274  $this->output(false, $tpl, $a_outputmode);
275  }
276  if ($a_glo_ov_id != "")
277  {
278  $tpl->setCurrentBlock("glovlink");
279  $tpl->setVariable("TXT_LINK", $lng->txtlng("content", "cont_sco_glossary", $a_lang));
280  $tpl->setVariable("ID_LINK", $a_glo_ov_id);
281  $tpl->parseCurrentBlock();
282  }
283  $tpl->setVariable("TXT_CLOSE", $lng->txtlng("common", "close", $a_lang));
284  $tpl->setVariable("ID_CLOSE", $a_close_el_id);
285  return $tpl->get();
286  }
287 
293  function output($a_offline = false, $a_tpl = "", $a_outputmode = "presentation")
294  {
295  if ($a_tpl != "")
296  {
297  $tpl = $a_tpl;
298  }
299  else
300  {
301  $tpl = $this->tpl;
302  }
303 
304  require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
305  require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
306 
307  $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
308 
309  $tpl->setVariable("TXT_TERM", $this->term->getTerm());
310 
311  for($j=0; $j<count($defs); $j++)
312  {
313  $def = $defs[$j];
314  $page_gui = new ilGlossaryDefPageGUI($def["id"]);
315  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
316  if (!$a_offline)
317  {
318  //$page_gui->setFullscreenLink(
319  // "ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=".$_GET["ref_id"]);
320  }
321  else
322  {
323  $page_gui->setFullscreenLink("fullscreen.html"); // id is set by xslt
324  }
325  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=downloadFile&amp;ref_id=".$_GET["ref_id"]);
326 
327  if (!$a_offline)
328  {
329  $page_gui->setOutputMode($a_outputmode);
330  }
331  else
332  {
333  $page_gui->setOutputMode("offline");
334  $page_gui->setOfflineDirectory($this->getOfflineDirectory());
335  }
336 
337  //$page_gui->setOutputMode("edit");
338  //$page_gui->setPresentationTitle($this->term->getTerm());
339  $page_gui->setLinkXML($this->getLinkXML());
340  $page_gui->setTemplateOutput(false);
341  $output = $page_gui->presentation($page_gui->getOutputMode());
342 
343  if (count($defs) > 1)
344  {
345  $tpl->setCurrentBlock("definition_header");
346  $tpl->setVariable("TXT_DEFINITION",
347  $this->lng->txt("cont_definition")." ".($j+1));
348  $tpl->parseCurrentBlock();
349  }
350 
352 
353  $tpl->setCurrentBlock("definition");
354  $tpl->setVariable("PAGE_CONTENT", $output);
355  $tpl->parseCurrentBlock();
356  }
357  }
358 
362  function getInternalLinks()
363  {
364  require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
365  require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
366 
367  $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
368 
369  $term_links = array();
370  for($j=0; $j<count($defs); $j++)
371  {
372  $def = $defs[$j];
373  $page = new ilGlossaryDefPage($def["id"]);
374  $page->buildDom();
375  $page_links = $page->getInternalLinks();
376  foreach($page_links as $key => $page_link)
377  {
378  $term_links[$key] = $page_link;
379  }
380  }
381 
382  return $term_links;
383  }
384 
388  function listDefinitions()
389  {
390  global $ilTabs;
391 
392  $this->getTemplate();
393  $this->displayLocator();
394  $this->setTabs();
395  $ilTabs->activateTab("definitions");
396  require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
397 
398  // content style
399  $this->tpl->setCurrentBlock("ContentStyle");
400  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
401  ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
402  $this->tpl->parseCurrentBlock();
403 
404  // syntax style
405  $this->tpl->setCurrentBlock("SyntaxStyle");
406  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
408  $this->tpl->parseCurrentBlock();
409 
410  // load template for table
411  $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
412  //$this->tpl->addBlockfile("CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
413  //ilUtil::sendInfo();
414  $this->tpl->addBlockfile("STATUSLINE", "statusline", "tpl.statusline.html");
415  $this->tpl->setTitle(
416  $this->lng->txt("cont_term").": ".$this->term->getTerm());
417  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
418 
419  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
420 
421  $this->tpl->setCurrentBlock("add_def");
422  $this->tpl->setVariable("TXT_ADD_DEFINITION",
423  $this->lng->txt("cont_add_definition"));
424  $this->tpl->setVariable("BTN_ADD", "addDefinition");
425  $this->tpl->parseCurrentBlock();
426  $this->tpl->setCurrentBlock("def_list");
427 
429 
430  $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
431 
432  for($j=0; $j<count($defs); $j++)
433  {
434  $def = $defs[$j];
435  $page_gui = new ilGlossaryDefPageGUI($def["id"]);
436  $page_gui->setStyleId($this->glossary->getStyleSheetId());
437  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
438  $page_gui->setTemplateOutput(false);
439  $output = $page_gui->preview();
440 
441  if (count($defs) > 1)
442  {
443  $this->tpl->setCurrentBlock("definition_header");
444  $this->tpl->setVariable("TXT_DEFINITION",
445  $this->lng->txt("cont_definition")." ".($j+1));
446  $this->tpl->parseCurrentBlock();
447  }
448 
449  if ($j > 0)
450  {
451  $this->tpl->setCurrentBlock("up");
452  $this->tpl->setVariable("TXT_UP", $this->lng->txt("up"));
453  $this->ctrl->setParameter($this, "def", $def["id"]);
454  $this->tpl->setVariable("LINK_UP",
455  $this->ctrl->getLinkTarget($this, "moveUp"));
456  $this->tpl->parseCurrentBlock();
457  }
458 
459  if ($j+1 < count($defs))
460  {
461  $this->tpl->setCurrentBlock("down");
462  $this->tpl->setVariable("TXT_DOWN", $this->lng->txt("down"));
463  $this->ctrl->setParameter($this, "def", $def["id"]);
464  $this->tpl->setVariable("LINK_DOWN",
465  $this->ctrl->getLinkTarget($this, "moveDown"));
466  $this->tpl->parseCurrentBlock();
467  }
468  $this->tpl->setCurrentBlock("submit_btns");
469  $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
470  $this->ctrl->setParameter($this, "def", $def["id"]);
471  $this->ctrl->setParameterByClass("ilTermDefinitionEditorGUI", "def", $def["id"]);
472  $this->tpl->setVariable("LINK_EDIT",
473  $this->ctrl->getLinkTargetByClass(array("ilTermDefinitionEditorGUI", "ilGlossaryDefPageGUI"), "edit"));
474  $this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
475  $this->tpl->setVariable("LINK_DELETE",
476  $this->ctrl->getLinkTarget($this, "confirmDefinitionDeletion"));
477  $this->tpl->parseCurrentBlock();
478 
479  $this->tpl->setCurrentBlock("definition");
480  $this->tpl->setVariable("PAGE_CONTENT", $output);
481  $this->tpl->parseCurrentBlock();
482  }
483  //$this->tpl->setCurrentBlock("def_list");
484  //$this->tpl->parseCurrentBlock();
485 
486  $this->quickList();
487  }
488 
489 
494  {
495  global $ilTabs;
496 
497  $this->getTemplate();
498  $this->displayLocator();
499  $this->setTabs();
500  $ilTabs->activateTab("definitions");
501 
502  // content style
503  $this->tpl->setCurrentBlock("ContentStyle");
504  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
505  ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
506  $this->tpl->parseCurrentBlock();
507 
508  // syntax style
509  $this->tpl->setCurrentBlock("SyntaxStyle");
510  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
512  $this->tpl->parseCurrentBlock();
513 
514  $this->tpl->setTitle(
515  $this->lng->txt("cont_term").": ".$this->term->getTerm());
516  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
517 
518  $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_delete.html", true);
519  ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
520 
521  $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
522 
523  $definition =& new ilGlossaryDefinition($_GET["def"]);
524  $page_gui = new ilGlossaryDefPageGUI($definition->getId());
525  $page_gui->setTemplateOutput(false);
526  $page_gui->setStyleId($this->glossary->getStyleSheetId());
527  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
528  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
529  $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
530  $output = $page_gui->preview();
531 
532  $this->tpl->setCurrentBlock("definition");
533  $this->tpl->setVariable("PAGE_CONTENT", $output);
534  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
535  $this->tpl->setVariable("LINK_CANCEL",
536  $this->ctrl->getLinkTarget($this, "cancelDefinitionDeletion"));
537  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("confirm"));
538  $this->ctrl->setParameter($this, "def", $definition->getId());
539  $this->tpl->setVariable("LINK_CONFIRM",
540  $this->ctrl->getLinkTarget($this, "deleteDefinition"));
541  $this->tpl->parseCurrentBlock();
542  }
543 
545  {
546  $this->ctrl->redirect($this, "listDefinitions");
547  }
548 
549 
550  function deleteDefinition()
551  {
552  $definition =& new ilGlossaryDefinition($_GET["def"]);
553  $definition->delete();
554  $this->ctrl->redirect($this, "listDefinitions");
555  }
556 
557 
561  function moveUp()
562  {
563  $definition =& new ilGlossaryDefinition($_GET["def"]);
564  $definition->moveUp();
565  $this->ctrl->redirect($this, "listDefinitions");
566  }
567 
568 
572  function moveDown()
573  {
574  $definition =& new ilGlossaryDefinition($_GET["def"]);
575  $definition->moveDown();
576  $this->ctrl->redirect($this, "listDefinitions");
577  }
578 
579 
583  function addDefinition()
584  {
585  global $ilTabs;
586 
587  $this->getTemplate();
588  $this->displayLocator();
589  $this->setTabs();
590  $ilTabs->activateTab("definitions");
591 
592  $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
593  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
594 
595  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
596  $form = new ilPropertyFormGUI();
597  $form->setFormAction($this->ctrl->getFormAction($this, "saveDefinition"));
598  $form->setTitle($this->lng->txt("gdf_new"));
599 
600  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
601  $title->setRequired(true);
602  $form->addItem($title);
603 
604  $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
605  $form->addItem($desc);
606 
607  $form->addCommandButton("saveDefinition", $this->lng->txt("gdf_add"));
608  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
609 
610  $this->tpl->setContent($form->getHTML());
611  }
612 
616  function cancel()
617  {
618  $this->ctrl->redirect($this, "listDefinitions");
619  }
620 
624  function saveDefinition()
625  {
626  $def =& new ilGlossaryDefinition();
627  $def->setTermId($_GET["term_id"]);
628  $def->setTitle(ilUtil::stripSlashes($_POST["title"]));#"content object ".$newObj->getId()); // set by meta_gui->save
629  $def->setDescription(ilUtil::stripSlashes($_POST["desc"])); // set by meta_gui->save
630  $def->create();
631 
632  $this->ctrl->redirect($this, "listDefinitions");
633  }
634 
635 
639  function getTemplate()
640  {
641  $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
642  $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
643  }
644 
648  function setTabs()
649  {
650  global $ilTabs;
651  $this->getTabs($ilTabs);
652  }
653 
657  function displayLocator()
658  {
659  require_once ("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
660  $gloss_loc =& new ilGlossaryLocatorGUI();
661  $gloss_loc->setTerm($this->term);
662  $gloss_loc->setGlossary($this->glossary);
663  //$gloss_loc->setDefinition($this->definition);
664  $gloss_loc->display();
665  }
666 
667 
671  function getTabs(&$tabs_gui)
672  {
673  global $lng, $ilHelp;
674 
675 
676  $ilHelp->setScreenIdComponent("glo_term");
677 
678 //echo ":".$_GET["term_id"].":";
679  if ($_GET["term_id"] != "")
680  {
681  $tabs_gui->addTab("properties",
682  $lng->txt("properties"),
683  $this->ctrl->getLinkTarget($this, "editTerm"));
684 
685  $tabs_gui->addTab("definitions",
686  $lng->txt("cont_definitions"),
687  $this->ctrl->getLinkTarget($this, "listDefinitions"));
688 
689  $tabs_gui->addTab("usage",
690  $lng->txt("cont_usage")." (".ilGlossaryTerm::getNumberOfUsages($_GET["term_id"]).")",
691  $this->ctrl->getLinkTarget($this, "listUsages"));
692 
693  $tabs_gui->addNonTabbedLink("presentation_view",
694  $this->lng->txt("glo_presentation_view"),
695  ILIAS_HTTP_PATH.
696  "/goto.php?target=".
697  "git".
698  "_".$_GET["term_id"]."_".$_GET["ref_id"]."&client_id=".CLIENT_ID,
699  "_top"
700  );
701 
702  }
703 
704  // back to glossary
705  $tabs_gui->setBackTarget($this->lng->txt("glossary"),
706  $this->ctrl->getLinkTargetByClass("ilobjglossarygui", "listTerms"));
707 
708  }
709 
715  function _goto($a_target, $a_ref_id = "")
716  {
717  global $rbacsystem, $ilErr, $lng, $ilAccess;
718 
719  $glo_id = ilGlossaryTerm::_lookGlossaryID($a_target);//::_lookupContObjID($a_target);
720 
721  // get all references
722  if ($a_ref_id > 0)
723  {
724  $ref_ids = array($a_ref_id);
725  }
726  else
727  {
728  $ref_ids = ilObject::_getAllReferences($glo_id);
729  }
730 
731  // check read permissions
732  foreach ($ref_ids as $ref_id)
733  {
734  // Permission check
735  if ($ilAccess->checkAccess("read", "", $ref_id))
736  {
737  $_GET["baseClass"] = "ilGlossaryPresentationGUI";
738  $_GET["term_id"] = $a_target;
739  $_GET["ref_id"] = $ref_id;
740  $_GET["cmd"] = "listDefinitions";
741  include_once("ilias.php");
742  exit;
743  }
744  }
745  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
746  {
747  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
748  ilObject::_lookupTitle($glo_id)), true);
750  }
751 
752 
753  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
754  }
755 
759  function listUsages()
760  {
761  global $ilTabs, $tpl;
762 
763  //$this->displayLocator();
764  $this->getTemplate();
765  $this->displayLocator();
766  $this->setTabs();
767  $ilTabs->activateTab("usage");
768 
769  $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
770  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
771 
772  include_once("./Modules/Glossary/classes/class.ilTermUsagesTableGUI.php");
773  $tab = new ilTermUsagesTableGUI($this, "listUsages", $_GET["term_id"]);
774 
775  $tpl->setContent($tab->getHTML());
776 
777  $this->quickList();
778  }
779 
783  function quickList()
784  {
785  global $tpl, $ilCtrl;
786 
787  //$tpl->setLeftNavUrl($ilCtrl->getLinkTarget($this, "showQuickList"));
788 
789  include_once("./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php");
790  $tab = new ilTermQuickListTableGUI($this, "editTerm");
791  $tpl->setLeftNavContent($tab->getHTML());
792  }
793 }
794 
795 ?>