ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
4include_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 $tmp = array();
48 $tmp['title'] = $row->getTitle();
49 $tmp['id'] = $row->getId();
50
51 $data[] = $tmp;
52 }
53 $this->setData($data);
54 }
55
56
61 protected function fillRow($a_set)
62 {
63 global $ilCtrl;
64
65 $this->tpl->setVariable('TXT_ITEM_TITLE', $a_set['title']);
66 $ilCtrl->setParameter($this->getParentObject(), 'obj_id', $a_set['id']);
67 $this->tpl->setVariable('LINK_ITEM', $ilCtrl->getLinkTarget($this->getParentObject(), 'showTrackingItemSco'));
68 }
69
73 protected function initTable()
74 {
75 global $ilCtrl;
76
77
78 $this->setFormAction($ilCtrl->getFormAction($this->getParentObject()));
79 $this->setRowTemplate('tpl.scorm_track_items_sco.html', 'Modules/ScormAicc');
80 $this->setTitle($this->lng->txt('cont_tracking_items'));
81
82 $this->addColumn($this->lng->txt('title'), 'title', '100%');
83 }
84}
An exception for terminatinating execution or to throw for unit testing.
__construct($a_obj_id, $a_parent_obj, $a_parent_cmd)
Constructor.
Class ilTable2GUI.
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18