ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSCORMTrackingItemsPerScoTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Table/classes/class.ilTable2GUI.php';
5 
13 {
14  private $obj_id = 0;
15 
19  public function __construct($a_obj_id,$a_parent_obj,$a_parent_cmd)
20  {
21  $this->obj_id = $a_obj_id;
22 
23  $this->setId('sco_trs_usr_'.$this->obj_id);
24  parent::__construct($a_parent_obj, $a_parent_cmd);
25  }
26 
31  public function getObjId()
32  {
33  return $this->obj_id;
34  }
35 
39  public function parse()
40  {
41  $this->initTable();
42 
43  $scos = $this->getParentObject()->object->getTrackedItems();
44 
45  $data = array();
46  foreach($scos as $row)
47  {
48  $tmp = array();
49  $tmp['title'] = $row->getTitle();
50  $tmp['id'] = $row->getId();
51 
52  $data[] = $tmp;
53  }
54  $this->setData($data);
55  }
56 
57 
62  protected function fillRow($a_set)
63  {
64  global $ilCtrl;
65 
66  $this->tpl->setVariable('TXT_ITEM_TITLE', $a_set['title']);
67  $ilCtrl->setParameter($this->getParentObject(),'obj_id',$a_set['id']);
68  $this->tpl->setVariable('LINK_ITEM', $ilCtrl->getLinkTarget($this->getParentObject(),'showTrackingItemSco'));
69  }
70 
74  protected function initTable()
75  {
76  global $ilCtrl;
77 
78 
79  $this->setFormAction($ilCtrl->getFormAction($this->getParentObject()));
80  $this->setRowTemplate('tpl.scorm_track_items_sco.html', 'Modules/ScormAicc');
81  $this->setTitle($this->lng->txt('cont_tracking_items'));
82 
83  $this->addColumn($this->lng->txt('title'), 'title','100%');
84  }
85 }
86 ?>