ILIAS  release_8 Revision v8.24
class.ilAssessmentFolderLogAdministrationTableGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
27 public function __construct(ilObjAssessmentFolderGUI $a_parent_obj, string $a_parent_cmd, bool $a_write_access = false)
28 {
29 parent::__construct($a_parent_obj, $a_parent_cmd);
30
31 global $DIC;
32 $lng = $DIC['lng'];
33 $ilCtrl = $DIC['ilCtrl'];
34
35 $this->lng = $lng;
36 $this->ctrl = $ilCtrl;
37
38 $this->setFormName('showlog');
39 $this->setStyle('table', 'fullwidth');
40
41 $this->addColumn('', '', '1%', true);
42 $this->addColumn($this->lng->txt("title"), 'title', '50%');
43 $this->addColumn($this->lng->txt("ass_log_count_datasets"), 'nr', '15%');
44 $this->addColumn($this->lng->txt("ass_location"), '', '30%');
45
46 $this->setRowTemplate("tpl.il_as_tst_assessment_log_administration_row.html", "Modules/Test");
47
48 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
49
50 if ($a_write_access) {
51 $this->addMultiCommand('deleteLog', $this->lng->txt('ass_log_delete_entries'));
52 $this->setSelectAllCheckbox('chb_test');
53 $this->enable('select_all');
54 }
55
56 $this->setDefaultOrderField("title");
57 $this->setDefaultOrderDirection("asc");
58
59 $this->setPrefix('chb_test');
60
61 $this->enable('header');
62 $this->enable('sort');
63 }
64
65 protected function fillRow(array $a_set): void
66 {
67 $this->tpl->setVariable("TITLE", ilLegacyFormElementsUtil::prepareFormOutput($a_set['title']));
68 $this->tpl->setVariable("NR", $a_set['nr']);
69 $this->tpl->setVariable("TEST_ID", $a_set['id']);
70 $this->tpl->setVariable("LOCATION_HREF", $a_set['location_href']);
71 $this->tpl->setVariable("LOCATION_TXT", $a_set['location_txt']);
72 }
73
74 public function numericOrdering(string $a_field): bool
75 {
76 return 'nr' === $a_field;
77 }
78}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
numericOrdering(string $a_field)
Should this field be sorted numeric?
__construct(ilObjAssessmentFolderGUI $a_parent_obj, string $a_parent_cmd, bool $a_write_access=false)
static prepareFormOutput($a_str, bool $a_strip=false)
Class ilObjAssessmentFolderGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormName(string $a_name="")
addMultiCommand(string $a_cmd, string $a_text)
setPrefix(string $a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
ilLanguage $lng
enable(string $a_module_name)
setStyle(string $a_element, string $a_style)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc