ILIAS  release_7 Revision v7.30-3-g800a261c036
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
5include_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}
An exception for terminatinating execution or to throw for unit testing.
__construct($a_parent_obj, $a_parent_cmd, $a_write_access=false)
Constructor.
numericOrdering($a_field)
{Should this field be sorted numeric?boolean numeric ordering; default is false}
Class ilTable2GUI.
setPrefix($a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
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.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setFormName($a_formname="")
Set Form name.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc