ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilLMGlossaryTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  function __construct($a_lm, $a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  $this->lm = $a_lm;
25  $this->id = "lm_glo";
26 
27  parent::__construct($a_parent_obj, $a_parent_cmd);
28  $data = array();
29  foreach ($a_lm->getAutoGlossaries() as $glo_id)
30  {
31  $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
32  }
33  $this->setData($data);
34  $this->setTitle($lng->txt("cont_auto_glossaries"));
35 
36  $this->addColumn($this->lng->txt("title"), "title");
37  $this->addColumn($this->lng->txt("actions"));
38 
39  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
40  $this->setRowTemplate("tpl.lm_glossary_row.html", "Modules/LearningModule");
41 
42 // $this->addMultiCommand("", $lng->txt(""));
43 // $this->addCommandButton("", $lng->txt(""));
44  }
45 
49  protected function fillRow($a_set)
50  {
51  global $lng, $ilCtrl;
52 
53  $ilCtrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
54  $this->tpl->setCurrentBlock("cmd");
55  $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj, "removeLMGlossary"));
56  $this->tpl->setVariable("CMD_TXT", $lng->txt("remove"));
57  $this->tpl->parseCurrentBlock();
58 
59  $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
60  }
61 
62 
63 }
64 ?>