ILIAS  release_4-4 Revision
class.ilTimingOverviewTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/Utilities/classes/class.ilFormat.php';
5 require_once 'Services/Table/classes/class.ilTable2GUI.php';
6 
11 {
16  public function __construct($a_parent_obj, $a_parent_cmd)
17  {
18  global $lng, $ilCtrl;
19 
20  parent::__construct($a_parent_obj, $a_parent_cmd);
21 
22  $this->lng = $lng;
23  $this->ctrl = $ilCtrl;
24 
25  $this->setTitle($this->lng->txt('timing'));
26  $this->setRowTemplate("tpl.il_as_tst_timing_overview_row.html", "Modules/Test");
27  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
28 
29  $this->addColumn($this->lng->txt("login"),'login', '');
30  $this->addColumn($this->lng->txt("name"),'name', '');
31  $this->addColumn($this->lng->txt("tst_started"),'started', '');
32  $this->addColumn($this->lng->txt("timing"),'extratime', '');
33 
34  $this->addCommandButton('showTimingForm', $this->lng->txt('timing'));
35  }
36 
40  public function fillRow(array $data)
41  {
42  $this->tpl->setVariable("LOGIN", $data['login']);
43  $this->tpl->setVariable("NAME", $data['name']);
44  $this->tpl->setVariable("STARTED", $data['started']);
45  $this->tpl->setVariable("EXTRATIME", ilFormat::_secondsToString($data['extratime'] * 60));
46  }
47 }
__construct($a_parent_obj, $a_parent_cmd)
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
Class ilTimingOverviewTableGUI.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="")
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
global $lng
Definition: privfeed.php:40
setFormAction($a_form_action)
Set Form action parameter.