ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilSCORMOfflineModeUsersTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15include_once './Services/Table/classes/class.ilTable2GUI.php';
16
23{
24 private $obj_id = 0;
25
29 public function __construct($a_obj_id, $a_parent_obj, $a_parent_cmd)
30 {
31 $this->obj_id = $a_obj_id;
32
33 parent::__construct($a_parent_obj, $a_parent_cmd);
34 }
35
40 public function getObjId()
41 {
42 return $this->obj_id;
43 }
44
48 public function parse()
49 {
50 $this->initTable();
51
52 include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
54 foreach ($users as $user) {
55 $tmp = array();
56 $tmp['user'] = $user['user_id'];
57 $tmp['firstname'] = $user['firstname'];
58 $tmp['lastname'] = $user['lastname'];
59
60 $data[] = $tmp;
61 }
62 $this->setData($data);
63 }
64
69 protected function fillRow($a_set)
70 {
71 global $DIC;
72 $ilCtrl = $DIC['ilCtrl'];
73
74 $this->tpl->setVariable('CHECKBOX_ID', $a_set['user']);
75 $this->tpl->setVariable('VAL_USERNAME', $a_set['lastname'] . ', ' . $a_set['firstname']);
76
77 $ilCtrl->setParameter($this->getParentObject(), 'user_id', $a_set['user']);
78 }
79
83 protected function initTable()
84 {
85 global $DIC;
86 $ilCtrl = $DIC['ilCtrl'];
87
88 $this->setFormAction($ilCtrl->getFormAction($this->getParentObject()));
89 $this->setRowTemplate('tpl.scorm_offline_mode_users.html', 'Modules/ScormAicc');
90 $this->setTitle($this->lng->txt('offline_mode_users'));
91 $this->setDescription($this->lng->txt("offline_mode_users_info"));
92
93 $this->addColumn('', '', '1px');
94 $this->addColumn($this->lng->txt('name'), 'name');
95
96 $this->enable('select_all');
97 $this->setSelectAllCheckbox('user');
98
99 $this->addMultiCommand('stopUserOfflineMode', $this->lng->txt('stop_user_offline_mode'));
100 }
101}
An exception for terminatinating execution or to throw for unit testing.
GUI class ilSCORMOfflineModeUsersTableGUI.
__construct($a_obj_id, $a_parent_obj, $a_parent_cmd)
Constructor.
static usersInOfflineMode($obj_id)
Class ilTable2GUI.
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
setDescription($a_val)
Set description.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
enable($a_module_name)
enables particular modules of table
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46