5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
31 $this->
setId(
"tst_eval_all");
37 $this->
setStyle(
'table',
'fullwidth');
38 $this->
addColumn($lng->txt(
"name"),
"name",
"");
39 $this->
addColumn($lng->txt(
"login"),
"login",
"");
44 if (!$this->anonymity)
48 if (strcmp($c,
'gender') == 0) $this->
addColumn($this->lng->txt(
"gender"),
'gender',
'');
49 if (strcmp($c,
'email') == 0) $this->
addColumn($this->lng->txt(
"email"),
'email',
'');
50 if (strcmp($c,
'institution') == 0) $this->
addColumn($this->lng->txt(
"institution"),
'institution',
'');
51 if (strcmp($c,
'street') == 0) $this->
addColumn($this->lng->txt(
"street"),
'street',
'');
52 if (strcmp($c,
'city') == 0) $this->
addColumn($this->lng->txt(
"city"),
'city',
'');
53 if (strcmp($c,
'zipcode') == 0) $this->
addColumn($this->lng->txt(
"zipcode"),
'zipcode',
'');
54 if (strcmp($c,
'country') == 0) $this->
addColumn($this->lng->txt(
"country"),
'country',
'');
55 if (strcmp($c,
'department') == 0) $this->
addColumn($this->lng->txt(
"department"),
'department',
'');
56 if (strcmp($c,
'matriculation') == 0) $this->
addColumn($this->lng->txt(
"matriculation"),
'matriculation',
'');
60 $this->
addColumn($lng->txt(
"tst_reached_points"),
"reached",
"");
62 if( $this->offeringQuestionHintsEnabled )
64 $this->
addColumn($lng->txt(
"tst_question_hints_requested_hint_count_header"),
"hint_count",
"");
67 $this->
addColumn($lng->txt(
"tst_mark"),
"mark",
"");
69 if ($this->parent_obj->object->ects_output)
73 if (strcmp($c,
'ects_grade') == 0) $this->
addColumn($this->lng->txt(
"ects_grade"),
'ects_grade',
'');
76 $this->
addColumn($lng->txt(
"tst_answered_questions"),
"answered",
"");
77 $this->
addColumn($lng->txt(
"working_time"),
"working_time",
"");
78 $this->
addColumn($lng->txt(
"detailed_evaluation"),
"details",
"");
80 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
81 $this->
setRowTemplate(
"tpl.table_evaluation_all.html",
"Modules/Test");
102 if ($this->anonymity)
125 if (!$this->anonymity)
127 $cols[
"gender"] = array(
128 "txt" => $lng->txt(
"gender"),
131 $cols[
"email"] = array(
132 "txt" => $lng->txt(
"email"),
135 $cols[
"institution"] = array(
136 "txt" => $lng->txt(
"institution"),
139 $cols[
"street"] = array(
140 "txt" => $lng->txt(
"street"),
143 $cols[
"city"] = array(
144 "txt" => $lng->txt(
"city"),
147 $cols[
"zipcode"] = array(
148 "txt" => $lng->txt(
"zipcode"),
151 $cols[
"country"] = array(
152 "txt" => $lng->txt(
"country"),
155 $cols[
"department"] = array(
156 "txt" => $lng->txt(
"department"),
159 $cols[
"matriculation"] = array(
160 "txt" => $lng->txt(
"matriculation"),
164 if ($this->parent_obj->object->ects_output)
166 $cols[
"ects_grade"] = array(
167 "txt" => $lng->txt(
"ects_grade"),
182 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
185 $ti->setValidationRegexp(
'/^[^%]+$/is');
188 $ti->readFromSession();
189 $this->filter[
"name"] = $ti->getValue();
194 $ti->setValidationRegexp(
'/^[^%]+$/is');
197 $ti->readFromSession();
198 $this->filter[
"group"] = $ti->getValue();
204 $ti->setValidationRegexp(
'/^[^%]+$/is');
206 $ti->readFromSession();
207 $this->filter[
"course"] = $ti->getValue();
210 include_once(
"./Services/Form/classes/class.ilCheckboxInputGUI.php");
214 $si->readFromSession();
215 $this->filter[
"passedonly"] =
$si->getValue();
224 $this->tpl->setVariable(
"NAME",
$data[
'name']);
225 $this->tpl->setVariable(
"LOGIN",
$data[
'login']);
228 if (!$this->anonymity)
230 if (strcmp($c,
'gender') == 0)
232 $this->tpl->setCurrentBlock(
'gender');
233 $this->tpl->setVariable(
"GENDER", $this->lng->txt(
'gender_' .
$data[
'gender']));
234 $this->tpl->parseCurrentBlock();
236 if (strcmp($c,
'email') == 0)
238 $this->tpl->setCurrentBlock(
'email');
239 $this->tpl->setVariable(
"EMAIL", strlen(
$data[
'email']) ?
$data[
'email'] :
' ');
240 $this->tpl->parseCurrentBlock();
242 if (strcmp($c,
'institution') == 0)
244 $this->tpl->setCurrentBlock(
'institution');
245 $this->tpl->setVariable(
"INSTITUTION", strlen(
$data[
'institution']) ?
$data[
'institution'] :
' ');
246 $this->tpl->parseCurrentBlock();
248 if (strcmp($c,
'street') == 0)
250 $this->tpl->setCurrentBlock(
'street');
251 $this->tpl->setVariable(
"STREET", strlen(
$data[
'street']) ?
$data[
'street'] :
' ');
252 $this->tpl->parseCurrentBlock();
254 if (strcmp($c,
'city') == 0)
256 $this->tpl->setCurrentBlock(
'city');
257 $this->tpl->setVariable(
"CITY", strlen(
$data[
'city']) ?
$data[
'city'] :
' ');
258 $this->tpl->parseCurrentBlock();
260 if (strcmp($c,
'zipcode') == 0)
262 $this->tpl->setCurrentBlock(
'zipcode');
263 $this->tpl->setVariable(
"ZIPCODE", strlen(
$data[
'zipcode']) ?
$data[
'zipcode'] :
' ');
264 $this->tpl->parseCurrentBlock();
266 if (strcmp($c,
'country') == 0)
268 $this->tpl->setCurrentBlock(
'country');
269 $this->tpl->setVariable(
"COUNTRY", strlen(
$data[
'country']) ?
$data[
'country'] :
' ');
270 $this->tpl->parseCurrentBlock();
272 if (strcmp($c,
'department') == 0)
274 $this->tpl->setCurrentBlock(
'department');
275 $this->tpl->setVariable(
"DEPARTMENT", strlen(
$data[
'department']) ?
$data[
'department'] :
' ');
276 $this->tpl->parseCurrentBlock();
278 if (strcmp($c,
'matriculation') == 0)
280 $this->tpl->setCurrentBlock(
'matriculation');
281 $this->tpl->setVariable(
"MATRICULATION", strlen(
$data[
'matriculation']) ?
$data[
'matriculation'] :
' ');
282 $this->tpl->parseCurrentBlock();
285 if ($this->parent_obj->object->ects_output)
287 if (strcmp($c,
'ects_grade') == 0)
289 $this->tpl->setCurrentBlock(
'ects_grade');
290 $this->tpl->setVariable(
"ECTS_GRADE",
$data[
'ects_grade']);
291 $this->tpl->parseCurrentBlock();
295 $this->tpl->setVariable(
"REACHED",
$data[
'reached'] .
" " . strtolower($this->lng->txt(
"of")) .
" " .
$data[
'max']);
297 if( $this->offeringQuestionHintsEnabled )
299 $this->tpl->setVariable(
"HINT_COUNT",
$data[
'hint_count']);
302 $data[
'answered'] =
$data[
'questions_worked_through'] .
" " . strtolower($this->lng->txt(
"of")) .
" " .
$data[
'number_of_questions'] .
" (" . sprintf(
"%2.2f",
$data[
'answered']) .
" %" .
")";
304 $this->tpl->setVariable(
"MARK",
$data[
'mark']);
305 $this->tpl->setVariable(
"ANSWERED",
$data[
'answered']);
306 $this->tpl->setVariable(
"WORKING_TIME",
$data[
'working_time']);
307 $this->tpl->setVariable(
"DETAILED",
$data[
'details']);
315 if (!is_array($cols)) {
319 $fields_to_unset = array_diff(array_keys($scol), array_keys($cols));
321 foreach($fields_to_unset as $key) {