ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilAssessmentFolderLogTableGUI.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 
5 include_once('./Services/Table/classes/class.ilTable2GUI.php');
6 
16 {
24  public function __construct($a_parent_obj, $a_parent_cmd)
25  {
26  parent::__construct($a_parent_obj, $a_parent_cmd);
27 
28  global $lng, $ilCtrl;
29 
30  $this->lng = $lng;
31  $this->ctrl = $ilCtrl;
32  $this->counter = 1;
33 
34  $this->setFormName('showlog');
35  $this->setStyle('table', 'fullwidth');
36 
37  $this->addColumn($this->lng->txt("assessment_log_datetime"), 'date', '');
38  $this->addColumn($this->lng->txt("user"), 'user', '');
39  $this->addColumn($this->lng->txt("assessment_log_text"), 'message', '');
40 
41  $this->setRowTemplate("tpl.il_as_tst_assessment_log_row.html", "Modules/Test");
42 
43  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
44 
45  $this->setDefaultOrderField("date");
46  $this->setDefaultOrderDirection("asc");
47 
48  $this->enable('header');
49  $this->enable('sort');
50  $this->disable('select_all');
51  }
52 
60  public function fillRow($data)
61  {
62  $this->tpl->setVariable("DATE", ilDatePresentation::formatDate(new ilDateTime($data['tstamp'], IL_CAL_UNIX)));
63  $user = ilObjUser::_lookupName($data["user_fi"]);
64  $this->tpl->setVariable("USER", ilUtil::prepareFormOutput(trim($user["title"] . " " . $user["firstname"] . " " . $user["lastname"])));
65  $title = "";
66  if ($data["question_fi"] || $data["original_fi"])
67  {
68  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
70  if (strlen($title) == 0)
71  {
73  }
74  $title = $this->lng->txt("assessment_log_question") . ": " . $title;
75  }
76  $this->tpl->setVariable("MESSAGE", ilUtil::prepareFormOutput($data['logtext']) . ((strlen($title)) ? " (" . $title . ")" : ''));
77  }
78 }
79 ?>