30 bool $confirmdelete =
false 36 $lng = $DIC->language();
37 $ilCtrl = $DIC->ctrl();
40 $this->
ctrl = $ilCtrl;
45 $this->
setStyle(
'table',
'fullwidth');
47 if (!$confirmdelete) {
52 $this->
addColumn($this->
lng->txt(
"last_access"),
'last_access',
'');
53 $this->
addColumn($this->
lng->txt(
"workingtime"),
'workingtime',
'');
55 $this->
addColumn($this->
lng->txt(
"survey_results_finished"),
'finished',
'');
57 $this->
setRowTemplate(
"tpl.il_svy_svy_maintenance_row.html",
"Modules/Survey/Participants");
63 $this->
addMultiCommand(
'deleteSingleUserResults', $this->
lng->txt(
'svy_remove_participants'));
80 $this->
enable(
'select_all');
85 protected function fillRow(array $a_set): void
87 if (!$this->confirmdelete) {
88 $this->tpl->setCurrentBlock(
'checkbox');
89 if ($a_set[
"invited"]) {
90 $this->tpl->setVariable(
"CB_USER_ID",
"inv" . $a_set[
'usr_id']);
92 $this->tpl->setVariable(
"CB_USER_ID", $a_set[
'id']);
95 $this->tpl->setCurrentBlock(
'hidden');
96 if ($a_set[
"invited"]) {
97 $this->tpl->setVariable(
"HIDDEN_USER_ID",
"inv" . $a_set[
'usr_id']);
99 $this->tpl->setVariable(
"HIDDEN_USER_ID", $a_set[
'id']);
102 $this->tpl->parseCurrentBlock();
103 $this->tpl->setVariable(
"USER_ID", $a_set[
"id"]);
104 $this->tpl->setVariable(
"VALUE_USER_NAME", $a_set[
'name']);
105 $this->tpl->setVariable(
"VALUE_USER_LOGIN", $a_set[
'login']);
107 $this->tpl->setVariable(
"WORKINGTIME", $this->
formatTime($a_set[
'workingtime'] ?? null));
109 $state = $this->
lng->txt(
"svy_status_in_progress");
110 if ($a_set[
'last_access'] ==
"" && $a_set[
"invited"]) {
111 $state = $this->
lng->txt(
"svy_status_invited");
113 if (($a_set[
"finished"] ??
false) !==
false) {
114 $state = $this->
lng->txt(
"svy_status_finished");
116 $this->tpl->setVariable(
"STATUS", $state);
118 if ((
int) ($a_set[
"finished"] ?? 0) > 0) {
123 $this->tpl->setVariable(
"FINISHED", $finished);
132 if (is_null($timeinseconds)) {
136 if ($timeinseconds == 0) {
137 return $this->
lng->txt(
'not_available');
140 return sprintf(
"%02d:%02d:%02d", ($timeinseconds / 3600), ($timeinseconds / 60) % 60, $timeinseconds % 60);
__construct(object $a_parent_obj, string $a_parent_cmd, bool $confirmdelete=false)
enable(string $a_module_name)
setFormAction(string $a_form_action, bool $a_multipart=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
setFormName(string $a_name="")
setStyle(string $a_element, string $a_style)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
numericOrdering(string $a_field)
__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)
disable(string $a_module_name)
addMultiCommand(string $a_cmd, string $a_text)
formatTime($timeinseconds)
setPrefix(string $a_prefix)