38 $ilCtrl = $DIC[
'ilCtrl'];
39 $this->ui_factory = $DIC->ui()->factory();
40 $this->ui_renderer = $DIC->ui()->renderer();
47 $this->
addColumn($this->
lng->txt(
'title'),
'category',
'99%');
52 $ref_id = $DIC->testQuestionPool()->internal()->request()->getRefId();
54 if ($type ===
'assf') {
55 $hasAccess = $DIC->rbac()->system()->checkAccess(
'edit',
$ref_id);
57 $hasAccess = $DIC->access()->checkAccess(
'edit', $cmd,
$ref_id);
69 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject(), $cmd));
71 $this->
setRowTemplate(
'tpl.unit_category_row.html',
'Modules/TestQuestionPool');
79 public function fillRow(array $row):
void 85 $ilCtrl = $DIC[
'ilCtrl'];
91 $ilCtrl->setParameter($this->
getParentObject(),
'category_id', $row[
'category_id']);
92 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'un_show_units'), $ilCtrl->getLinkTarget($this->
getParentObject(),
'showUnitsOfCategory'));
93 $ref_id = $DIC->testQuestionPool()->internal()->request()->getRefId();
95 if ($type ===
'assf') {
96 $hasAccess = $DIC->rbac()->system()->checkAccess(
'edit',
$ref_id);
98 $hasAccess = $DIC->access()->checkAccess(
'edit',
'showUnitCategoryModificationForm',
$ref_id) &&
99 $DIC->access()->checkAccess(
'edit',
'confirmDeleteCategory',
$ref_id);
103 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'edit'), $ilCtrl->getLinkTarget($this->
getParentObject(),
'showUnitCategoryModificationForm'));
104 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'delete'), $ilCtrl->getLinkTarget($this->
getParentObject(),
'confirmDeleteCategory'));
107 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'import'), $ilCtrl->getLinkTarget($this->
getParentObject(),
'confirmImportGlobalCategory'));
109 $row[
'title_href'] = $ilCtrl->getLinkTarget($this->
getParentObject(),
'showUnitsOfCategory');
111 $dropdown = $this->ui_factory->dropdown()->standard($actions)->withLabel($this->
lng->txt(
'actions'));
112 $row[
'actions'] = $this->ui_renderer->render($dropdown);
114 parent::fillRow($row);
setFormAction(string $a_form_action, bool $a_multipart=false)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Standard Version of Fill Row.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS UI Factory $ui_factory
ILIAS UI Renderer $ui_renderer
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)
__construct(?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
static _lookupType(int $id, bool $reference=false)
addMultiCommand(string $a_cmd, string $a_text)