24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
47 $this->
setId(
"svy_usr");
48 parent::__construct($a_parent_obj, $a_parent_cmd);
58 $this->
setStyle(
'table',
'fullwidth');
60 $this->
addColumn($this->lng->txt(
"username"),
'username',
'');
67 $this->
addColumn($this->lng->txt(
"question"),
'',
'');
68 $this->
addColumn($this->lng->txt(
"results"),
'',
'');
69 $this->
addColumn($this->lng->txt(
"workingtime"),
'workingtime',
'');
70 $this->
addColumn($this->lng->txt(
"survey_results_finished"),
'finished',
'');
72 $this->
setRowTemplate(
"tpl.il_svy_svy_results_user_row.html",
"Modules/Survey");
74 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
86 if (is_null($timeinseconds))
90 else if ($timeinseconds == 0)
92 return $this->lng->txt(
'not_available');
96 return sprintf(
"%02d:%02d:%02d", ($timeinseconds / 3600), ($timeinseconds / 60) % 60, $timeinseconds % 60);
117 $this->tpl->setVariable(
"USERNAME",
$data[
'username']);
118 $this->tpl->setVariable(
"QUESTION",
$data[
'question']);
119 $this->tpl->setVariable(
"RESULTS",
$data[
'results']);
120 $this->tpl->setVariable(
"WORKINGTIME", $this->
formatTime(
$data[
'workingtime']));
122 if(
$data[
"finished"] !== null)
124 if(
$data[
"finished"] !==
false)
132 $this->tpl->setVariable(
"FINISHED", $finished);
136 $this->tpl->setVariable(
"FINISHED",
" ");
139 if(
$data[
"subitems"])
141 $this->tpl->setCurrentBlock(
"tbl_content");
142 $this->tpl->parseCurrentBlock();
144 foreach(
$data[
"subitems"] as $subitem)
148 $this->tpl->setCurrentBlock(
"tbl_content");
149 $this->css_row = ($this->css_row !=
"tblrow1")
152 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
153 $this->tpl->parseCurrentBlock();
setFormName($a_formname)
Set Form name.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
enable($a_module_name)
enables particular modules of table
static formatDate(ilDateTime $date)
Format a date public.
formatTime($timeinseconds)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
__construct($a_parent_obj, $a_parent_cmd, $is_anonymized)
Constructor.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.