3 declare(strict_types=1);
35 public function __construct(
int $a_group_id,
object $a_parent_obj,
string $a_parent_cmd =
'')
38 $this->group_id = $a_group_id;
39 $this->
setId(
'sc_groups');
40 $this->
access = $DIC->access();
43 $this->renderer = $DIC->ui()->renderer();
44 $this->uiFactory = $DIC->ui()->factory();
52 public function init(): void
54 $this->
lng->loadLanguageModule(
'sysc');
55 $this->
addColumn($this->
lng->txt(
'title'),
'title',
'60%');
56 $this->
addColumn($this->
lng->txt(
'last_update'),
'last_update_sort',
'20%');
57 $this->
addColumn($this->
lng->txt(
'status'),
'status',
'10%');
60 $this->
setTitle($this->
lng->txt(
'sysc_task_overview'));
62 $this->
setRowTemplate(
'tpl.syscheck_tasks_row.html',
'components/ILIAS/SystemCheck');
69 protected function fillRow(array $a_set): void
71 $this->tpl->setVariable(
'VAL_TITLE', (
string) ($a_set[
'title'] ??
''));
72 $this->tpl->setVariable(
'VAL_DESC', (
string) ($a_set[
'description'] ??
''));
74 $status = (
int) ($a_set[
'status'] ?? 0);
78 $this->tpl->setVariable(
'VAL_STATUS_SUCCESS',
$text);
82 $this->tpl->setCurrentBlock(
'warning');
83 $this->tpl->setVariable(
'VAL_STATUS_WARNING',
$text);
84 $this->tpl->parseCurrentBlock();
88 $this->tpl->setVariable(
'VAL_STATUS_STANDARD',
$text);
92 $this->tpl->setVariable(
'VAL_LAST_UPDATE', (
string) ($a_set[
'last_update'] ??
''));
95 if ($this->
access->checkAccess(
'write',
'', $this->parent_obj->getObject()->getRefId())) {
96 $id = (
int) ($a_set[
'id'] ?? 0);
98 $dropDownItems = array();
102 $this->
ctrl->setParameterByClass(get_class($task_handler),
'task_id',
$id);
103 foreach ($task_handler->getActions() as $actions) {
104 $dropDownItems[] = $this->uiFactory->button()->shy(
105 (
string) ($actions[
'txt'] ??
''),
106 $this->
ctrl->getLinkTargetByClass(get_class($task_handler), (
string) ($actions[
'command'] ??
''))
109 $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
110 ->withLabel($this->
lng->txt(
'actions'));
111 $this->tpl->setVariable(
'ACTIONS', $this->renderer->render($dropDown));
122 if (!$task->isActive()) {
127 $item[
'id'] = $task->getId();
128 $item[
'title'] = $task_handler->getTitle();
129 $item[
'description'] = $task_handler->getDescription();
131 $item[
'last_update_sort'] = $task->getLastUpdate()->get(
IL_CAL_UNIX);
132 $item[
'status'] = $task->getStatus();
static getInstanceByGroupId(int $a_group_id)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
static taskStatus2Text(int $a_status)
setFormAction(string $a_form_action, bool $a_multipart=false)
static getComponentTask(int $a_task_id)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
UIImplementationFactory $uiFactory
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(int $a_group_id, object $a_parent_obj, string $a_parent_cmd='')