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',
'');
61 $this->
addColumn($this->lng->txt(
"question"),
'',
'');
62 $this->
addColumn($this->lng->txt(
"results"),
'',
'');
63 $this->
addColumn($this->lng->txt(
"workingtime"),
'workingtime',
'');
64 $this->
addColumn($this->lng->txt(
"survey_results_finished"),
'finished',
'');
66 $this->
setRowTemplate(
"tpl.il_svy_svy_results_user_row.html",
"Modules/Survey");
68 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
80 if (is_null($timeinseconds))
84 else if ($timeinseconds == 0)
86 return $this->lng->txt(
'not_available');
90 return sprintf(
"%02d:%02d:%02d", ($timeinseconds / 3600), ($timeinseconds / 60) % 60, $timeinseconds % 60);
103 $this->tpl->setVariable(
"USERNAME",
$data[
'username']);
104 $this->tpl->setVariable(
"QUESTION",
$data[
'question']);
105 $this->tpl->setVariable(
"RESULTS",
$data[
'results']
106 ? implode(
"<br />",
$data[
'results'])
108 $this->tpl->setVariable(
"WORKINGTIME", $this->
formatTime(
$data[
'workingtime']));
110 if(
$data[
"finished"] !== null)
112 if(
$data[
"finished"] !==
false)
120 $this->tpl->setVariable(
"FINISHED", $finished);
124 $this->tpl->setVariable(
"FINISHED",
" ");
127 if(
$data[
"subitems"])
129 $this->tpl->setCurrentBlock(
"tbl_content");
130 $this->tpl->parseCurrentBlock();
132 foreach(
$data[
"subitems"] as $subitem)
136 $this->tpl->setCurrentBlock(
"tbl_content");
137 $this->css_row = ($this->css_row !=
"tblrow1")
140 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
141 $this->tpl->parseCurrentBlock();
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
static getSurveySkippedValue()
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.
setFormName($a_formname="")
Set Form name.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.