ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAssessmentFolderLogAdministrationTableGUI.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, $a_write_access = false)
25  {
26  parent::__construct($a_parent_obj, $a_parent_cmd);
27 
28  global $DIC;
29  $lng = $DIC['lng'];
30  $ilCtrl = $DIC['ilCtrl'];
31 
32  $this->lng = $lng;
33  $this->ctrl = $ilCtrl;
34  $this->counter = 1;
35 
36  $this->setFormName('showlog');
37  $this->setStyle('table', 'fullwidth');
38 
39  $this->addColumn('', '', '1%', true);
40  $this->addColumn($this->lng->txt("title"), 'title', '50%');
41  $this->addColumn($this->lng->txt("ass_log_count_datasets"), 'nr', '15%');
42  $this->addColumn($this->lng->txt("ass_location"), '', '30%');
43 
44  $this->setRowTemplate("tpl.il_as_tst_assessment_log_administration_row.html", "Modules/Test");
45 
46  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
47 
48  if ($a_write_access) {
49  $this->addMultiCommand('deleteLog', $this->lng->txt('ass_log_delete_entries'));
50  $this->setSelectAllCheckbox('chb_test');
51  $this->enable('select_all');
52  }
53 
54  $this->numericOrdering('nr');
55  $this->setDefaultOrderField("title");
56  $this->setDefaultOrderDirection("asc");
57 
58  $this->setPrefix('chb_test');
59 
60  $this->enable('header');
61  $this->enable('sort');
62  }
63 
71  public function fillRow($data)
72  {
73  $this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($data['title']));
74  $this->tpl->setVariable("NR", $data['nr']);
75  $this->tpl->setVariable("TEST_ID", $data['id']);
76  $this->tpl->setVariable("LOCATION_HREF", $data['location_href']);
77  $this->tpl->setVariable("LOCATION_TXT", $data['location_txt']);
78  }
79 
83  public function numericOrdering($a_field)
84  {
85  return 'nr' == $a_field;
86  }
87 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
global $DIC
Definition: saml.php:7
__construct($a_parent_obj, $a_parent_cmd, $a_write_access=false)
Constructor.
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
Class ilTable2GUI.
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.
addMultiCommand($a_cmd, $a_text)
Add Command button.
enable($a_module_name)
enables particular modules of table
setPrefix($a_prefix)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
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.