ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestHistoryTableGUI.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
5include_once('./Services/Table/classes/class.ilTable2GUI.php');
6
16{
17 protected $tstObject;
18
26 public function __construct($a_parent_obj, $a_parent_cmd)
27 {
28 parent::__construct($a_parent_obj, $a_parent_cmd);
29
30 global $lng, $ilCtrl;
31
32 $this->lng = $lng;
33 $this->ctrl = $ilCtrl;
34
35 $this->setFormName('questionbrowser');
36 $this->setStyle('table', 'fullwidth');
37
38 $this->addColumn($this->lng->txt("assessment_log_datetime"),'datetime', '25%');
39 $this->addColumn($this->lng->txt("user"),'user', '25%');
40 $this->addColumn($this->lng->txt("assessment_log_text"),'log', '50%');
41
42 $this->setRowTemplate("tpl.il_as_tst_history_row.html", "Modules/Test");
43
44 $this->setDefaultOrderField("datetime");
45 $this->setDefaultOrderDirection("asc");
46
47 $this->enable('header');
48 }
49
50 public function setTestObject($obj)
51 {
52 $this->tstObject = $obj;
53 }
54
62 public function fillRow($data)
63 {
64 global $ilUser,$ilAccess;
65
66 $username = $this->tstObject->userLookupFullName($data["user_fi"], TRUE);
67 $this->tpl->setVariable("DATETIME", ilDatePresentation::formatDate(new ilDateTime($data["tstamp"],IL_CAL_UNIX)));
68 $this->tpl->setVariable("USER", $username);
69 $this->tpl->setVariable("LOG", trim(ilUtil::prepareFormOutput($data["logtext"])));
70 }
71}
72?>
const IL_CAL_UNIX
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Class ilTable2GUI.
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.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormName($a_formname)
Set Form name.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15