24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
44 public function __construct($a_parent_obj, $a_parent_cmd, $detail)
46 $this->
setId(
"svy_cum");
54 $this->totalcount = 0;
57 $this->
setStyle(
'table',
'fullwidth');
59 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
62 if (strcmp($c,
'question') == 0) $this->
addColumn($this->lng->txt(
"question"),
'question',
'');
63 if (strcmp($c,
'question_type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'question_type',
'');
64 if (strcmp($c,
'users_answered') == 0) $this->
addColumn($this->lng->txt(
"users_answered"),
'users_answered',
'');
65 if (strcmp($c,
'users_skipped') == 0) $this->
addColumn($this->lng->txt(
"users_skipped"),
'users_skipped',
'');
66 if (strcmp($c,
'mode') == 0) $this->
addColumn($this->lng->txt(
"mode"),
'mode',
'');
67 if (strcmp($c,
'mode_nr_of_selections') == 0) $this->
addColumn($this->lng->txt(
"mode_nr_of_selections"),
'mode_nr_of_selections',
'');
68 if (strcmp($c,
'median') == 0) $this->
addColumn($this->lng->txt(
"median"),
'median',
'');
69 if (strcmp($c,
'arithmetic_mean') == 0) $this->
addColumn($this->lng->txt(
"arithmetic_mean"),
'arithmetic_mean',
'');
72 $this->
setRowTemplate(
"tpl.il_svy_svy_results_cumulated_row.html",
"Modules/Survey");
74 $this->
addCommandButton(
'printEvaluation', $this->lng->txt(
'print'),
'javascript:window.print();');
76 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
86 $cols[
"question"] = array(
87 "txt" => $lng->txt(
"question"),
90 $cols[
"question_type"] = array(
91 "txt" => $lng->txt(
"question_type"),
94 $cols[
"users_answered"] = array(
95 "txt" => $lng->txt(
"users_answered"),
98 $cols[
"users_skipped"] = array(
99 "txt" => $lng->txt(
"users_skipped"),
102 $cols[
"mode"] = array(
103 "txt" => $lng->txt(
"mode"),
106 $cols[
"mode_nr_of_selections"] = array(
107 "txt" => $lng->txt(
"mode_nr_of_selections"),
110 $cols[
"median"] = array(
111 "txt" => $lng->txt(
"median"),
114 $cols[
"arithmetic_mean"] = array(
115 "txt" => $lng->txt(
"arithmetic_mean"),
130 if (strlen(
$data[
'counter']))
132 $this->tpl->setCurrentBlock(
'counter');
133 $this->tpl->setVariable(
"COUNTER",
$data[
'counter']);
134 $this->tpl->parseCurrentBlock();
137 $this->tpl->setVariable(
"TITLE",
$data[
'title']);
138 $this->tpl->setVariable(
"CSS_ROW", ($this->totalcount % 2 == 1) ?
'tblrow1' :
'tblrow2');
141 if (strcmp($c,
'question') == 0)
143 $this->tpl->setCurrentBlock(
'question');
144 $this->tpl->setVariable(
"QUESTION",
$data[
'question']);
145 $this->tpl->parseCurrentBlock();
147 if (strcmp($c,
'question_type') == 0)
149 $this->tpl->setCurrentBlock(
'question_type');
150 $this->tpl->setVariable(
"QUESTION_TYPE",
$data[
'question_type']);
151 $this->tpl->parseCurrentBlock();
153 if (strcmp($c,
'users_answered') == 0)
155 $this->tpl->setCurrentBlock(
'users_answered');
156 $this->tpl->setVariable(
"USERS_ANSWERED",
$data[
'users_answered']);
157 $this->tpl->parseCurrentBlock();
159 if (strcmp($c,
'users_skipped') == 0)
161 $this->tpl->setCurrentBlock(
'users_skipped');
162 $this->tpl->setVariable(
"USERS_SKIPPED",
$data[
'users_skipped']);
163 $this->tpl->parseCurrentBlock();
165 if (strcmp($c,
'mode') == 0)
167 $this->tpl->setCurrentBlock(
'mode');
168 $this->tpl->setVariable(
"MODE",
$data[
'mode']);
169 $this->tpl->parseCurrentBlock();
171 if (strcmp($c,
'mode_nr_of_selections') == 0)
173 $this->tpl->setCurrentBlock(
'mode_nr_of_selections');
174 $this->tpl->setVariable(
"MODE_NR_OF_SELECTIONS", strlen(
$data[
'mode_nr_of_selections']) ?
$data[
'mode_nr_of_selections'] : 0);
175 $this->tpl->parseCurrentBlock();
177 if (strcmp($c,
'median') == 0)
179 $this->tpl->setCurrentBlock(
'median');
180 $this->tpl->setVariable(
"MEDIAN",
$data[
'median']);
181 $this->tpl->parseCurrentBlock();
183 if (strcmp($c,
'arithmetic_mean') == 0)
185 $this->tpl->setCurrentBlock(
'arithmetic_mean');
186 $this->tpl->setVariable(
"ARITHMETIC_MEAN",
$data[
'arithmetic_mean']);
187 $this->tpl->parseCurrentBlock();