ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilAssessmentFolderLogAdministrationTableGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
27  public function __construct(
29  string $parent_cmd,
30  bool $write_access = false
31  ) {
32  parent::__construct($parent_obj, $parent_cmd);
33 
34  $this->setFormName('showlog');
35  $this->setStyle('table', 'fullwidth');
36 
37  $this->addColumn('', '', '1%', true);
38  $this->addColumn($this->lng->txt("title"), 'title', '50%');
39  $this->addColumn($this->lng->txt("ass_log_count_datasets"), 'nr', '15%');
40  $this->addColumn($this->lng->txt("ass_location"), '', '30%');
41 
42  $this->setRowTemplate("tpl.il_as_tst_assessment_log_administration_row.html", "Modules/Test");
43 
44  $this->setFormAction($this->ctrl->getFormAction($parent_obj, $parent_cmd));
45 
46  if ($write_access) {
47  $this->addMultiCommand('deleteLog', $this->lng->txt('ass_log_delete_entries'));
48  $this->setSelectAllCheckbox('chb_test');
49  $this->enable('select_all');
50  }
51 
52  $this->setDefaultOrderField("title");
53  $this->setDefaultOrderDirection("asc");
54 
55  $this->setPrefix('chb_test');
56 
57  $this->enable('header');
58  $this->enable('sort');
59  }
60 
61  protected function fillRow(array $a_set): void
62  {
63  $this->tpl->setVariable("TITLE", ilLegacyFormElementsUtil::prepareFormOutput($a_set['title']));
64  $this->tpl->setVariable("NR", $a_set['nr']);
65  $this->tpl->setVariable("TEST_ID", $a_set['id']);
66  $this->tpl->setVariable("LOCATION_HREF", $a_set['location_href']);
67  $this->tpl->setVariable("LOCATION_TXT", $a_set['location_txt']);
68  }
69 
70  public function numericOrdering(string $a_field): bool
71  {
72  return 'nr' === $a_field;
73  }
74 }
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
Class ilObjAssessmentFolderGUI.
static prepareFormOutput($a_str, bool $a_strip=false)
setFormName(string $a_name="")
setStyle(string $a_element, string $a_style)
__construct(VocabulariesInterface $vocabularies)
setDefaultOrderField(string $a_defaultorderfield)
__construct(ilObjAssessmentFolderGUI $parent_obj, string $parent_cmd, bool $write_access=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
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)
addMultiCommand(string $a_cmd, string $a_text)
setPrefix(string $a_prefix)