ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTestEvaluationGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
5 require_once './Modules/Test/classes/class.ilTestServiceGUI.php';
6 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
7 
25 {
34  public function __construct(ilObjTest $a_object)
35  {
36  parent::ilTestServiceGUI($a_object);
37  }
38 
42  public function &executeCommand()
43  {
44  $cmd = $this->ctrl->getCmd();
45  $next_class = $this->ctrl->getNextClass($this);
46  $this->ctrl->saveParameter($this, "sequence");
47  $this->ctrl->saveParameter($this, "active_id");
48  $cmd = $this->getCommand($cmd);
49  switch($next_class)
50  {
51  default:
52  $ret =& $this->$cmd();
53  break;
54  }
55  return $ret;
56  }
57 
58  function &getHeaderNames()
59  {
60  $headernames = array();
61  if ($this->object->getAnonymity())
62  {
63  array_push($headernames, $this->lng->txt("counter"));
64  }
65  else
66  {
67  array_push($headernames, $this->lng->txt("name"));
68  array_push($headernames, $this->lng->txt("login"));
69  }
70  $additionalFields = $this->object->getEvaluationAdditionalFields();
71  if (count($additionalFields))
72  {
73  foreach ($additionalFields as $fieldname)
74  {
75  array_push($headernames, $this->lng->txt($fieldname));
76  }
77  }
78  array_push($headernames, $this->lng->txt("tst_reached_points"));
79  array_push($headernames, $this->lng->txt("tst_mark"));
80  if ($this->object->ects_output)
81  {
82  array_push($headernames, $this->lng->txt("ects_grade"));
83  }
84  array_push($headernames, $this->lng->txt("tst_answered_questions"));
85  array_push($headernames, $this->lng->txt("working_time"));
86  array_push($headernames, $this->lng->txt("detailed_evaluation"));
87  return $headernames;
88  }
89 
90  function &getHeaderVars()
91  {
92  $headervars = array();
93  if ($this->object->getAnonymity())
94  {
95  array_push($headervars, "counter");
96  }
97  else
98  {
99  array_push($headervars, "name");
100  array_push($headervars, "login");
101  }
102  array_push($headervars, "resultspoints");
103  array_push($headervars, "resultsmarks");
104  if ($this->object->ects_output)
105  {
106  array_push($headervars, "ects_grade");
107  }
108  array_push($headervars, "qworkedthrough");
109  array_push($headervars, "timeofwork");
110  array_push($headervars, "");
111  return $headervars;
112  }
113 
114  public function filterEvaluation()
115  {
116  include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
117  $table_gui = new ilEvaluationAllTableGUI($this, 'outEvaluation');
118  $table_gui->writeFilterToSession();
119  $this->ctrl->redirect($this, "outEvaluation");
120  }
121 
122  public function resetfilterEvaluation()
123  {
124  include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
125  $table_gui = new ilEvaluationAllTableGUI($this, 'outEvaluation');
126  $table_gui->resetFilter();
127  $this->ctrl->redirect($this, "outEvaluation");
128  }
129 
135  function outEvaluation()
136  {
137  global $ilAccess;
138 
139  if ((!$ilAccess->checkAccess("tst_statistics", "", $this->ref_id)) && (!$ilAccess->checkAccess("write", "", $this->ref_id)))
140  {
141  // allow only evaluation access
142  ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
143  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
144  }
145 
146  include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
147 
148  $table_gui = new ilEvaluationAllTableGUI(
149  $this, 'outEvaluation', $this->object->getAnonymity(), $this->object->isOfferingQuestionHintsEnabled()
150  );
151 
152  $data = array();
153  $arrFilter = array();
154 
155  foreach ($table_gui->getFilterItems() as $item)
156  {
157  if ($item->getValue() !== false)
158  {
159  switch ($item->getPostVar())
160  {
161  case 'group':
162  case 'name':
163  case 'course':
164  $arrFilter[$item->getPostVar()] = $item->getValue();
165  break;
166  case 'passed_only':
167  $passedonly = $item->getChecked();
168  break;
169  }
170  }
171  }
172  include_once "./Modules/Test/classes/class.ilTestEvaluationData.php";
173  $eval = new ilTestEvaluationData($this->object);
174  $eval->setFilterArray($arrFilter);
175  $foundParticipants =& $eval->getParticipants();
176  $counter = 1;
177  if (count($foundParticipants) > 0)
178  {
179  if ($this->object->ects_output)
180  {
181  $passed_array =& $this->object->getTotalPointsPassedArray();
182  }
183  foreach ($foundParticipants as $active_id => $userdata)
184  {
185  /* @var $userdata ilTestEvaluationUserData */
186 
187  $remove = FALSE;
188  if ($passedonly)
189  {
190  $mark_obj = $this->object->getMarkSchema()->getMatchingMark($userdata->getReachedPointsInPercent());
191 
192  if( $mark_obj->getPassed() == FALSE || !$userdata->areObligationsAnswered() )
193  {
194  $remove = TRUE;
195  }
196  }
197  if (!$remove)
198  {
199  // build the evaluation row
200  $evaluationrow = array();
201  if ($this->object->getAnonymity())
202  {
203  $evaluationrow['name'] = $counter;
204  $evaluationrow['login'] = '';
205  }
206  else
207  {
208  $evaluationrow['name'] = $userdata->getName();
209  if (strlen($userdata->getLogin()))
210  {
211  $evaluationrow['login'] = "[" . $userdata->getLogin() . "]";
212  }
213  else
214  {
215  $evaluationrow['login'] = '';
216  }
217  }
218 
219  $evaluationrow['reached'] = $userdata->getReached();
220  $evaluationrow['max'] = $userdata->getMaxpoints();
221  $evaluationrow['hint_count'] = $userdata->getRequestedHintsCountFromScoredPass();
222  $percentage = $userdata->getReachedPointsInPercent();
223  $mark = $this->object->getMarkSchema()->getMatchingMark($percentage);
224  if (is_object($mark))
225  {
226  $evaluationrow['mark'] = $mark->getShortName();
227  }
228  if ($this->object->ects_output)
229  {
230  $ects_mark = $this->object->getECTSGrade($passed_array, $userdata->getReached(), $userdata->getMaxPoints());
231  $evaluationrow['ects_grade'] = $ects_mark;
232  }
233  $evaluationrow['answered'] = $userdata->getQuestionsWorkedThroughInPercent();
234  $evaluationrow['questions_worked_through'] = $userdata->getQuestionsWorkedThrough();
235  $evaluationrow['number_of_questions'] = $userdata->getNumberOfQuestions();
236  $time_seconds = $userdata->getTimeOfWork();
237  $time_hours = floor($time_seconds/3600);
238  $time_seconds -= $time_hours * 3600;
239  $time_minutes = floor($time_seconds/60);
240  $time_seconds -= $time_minutes * 60;
241  $evaluationrow['working_time'] = sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds);
242  $this->ctrl->setParameter($this, "active_id", $active_id);
243  $href = $this->ctrl->getLinkTarget($this, "detailedEvaluation");
244  $detailed_evaluation = $this->lng->txt("detailed_evaluation_show");
245  $evaluationrow['details'] = "<a class=\"il_ContainerItemCommand\" href=\"$href\">$detailed_evaluation</a>";
246  $userfields = ilObjUser::_lookupFields($userdata->getUserID());
247  $evaluationrow['gender'] = $userfields['gender'];
248  $evaluationrow['email'] = $userfields['email'];
249  $evaluationrow['institution'] = $userfields['institution'];
250  $evaluationrow['street'] = $userfields['street'];
251  $evaluationrow['city'] = $userfields['city'];
252  $evaluationrow['zipcode'] = $userfields['zipcode'];
253  $evaluationrow['country'] = $userfields['country'];
254  $evaluationrow['department'] = $userfields['department'];
255  $evaluationrow['matriculation'] = $userfields['matriculation'];
256  $counter++;
257  $data[] = $evaluationrow;
258  }
259  }
260  }
261 
262  $table_gui->setData($data);
263  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_evaluation.html", "Modules/Test");
264  $this->tpl->setVariable('EVALUATION_DATA', $table_gui->getHTML());
265  if (count($foundParticipants) > 0)
266  {
267  $template = new ilTemplate("tpl.il_as_tst_evaluation_export.html", TRUE, TRUE, "Modules/Test");
268  $template->setVariable("EXPORT_DATA", $this->lng->txt("exp_eval_data"));
269  if (!$this->object->getAnonymity())
270  {
271  include_once "./Services/Certificate/classes/class.ilCertificate.php";
272  include_once "./Modules/Test/classes/class.ilTestCertificateAdapter.php";
274  {
275  $template->setVariable("TEXT_CERTIFICATE", $this->lng->txt("exp_type_certificate"));
276  }
277  }
278  $template->setVariable("TEXT_EXCEL", $this->lng->txt("exp_type_excel"));
279  $template->setVariable("TEXT_CSV", $this->lng->txt("exp_type_spss"));
280  $template->setVariable("CMD_EXPORT", "exportEvaluation");
281  $template->setVariable("BTN_EXPORT", $this->lng->txt("export"));
282  $template->setVariable("BTN_PRINT", $this->lng->txt("print"));
283  $template->setVariable("BTN_COMMAND", $this->ctrl->getCmd());
284  $template->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "exportEvaluation"));
285  $exportoutput = $template->get();
286  $this->tpl->setVariable("EVALUATION_EXPORT", $exportoutput);
287  }
288 
289  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
290  if ($this->object->getShowSolutionAnswersOnly())
291  {
292  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
293  }
294  }
295 
304  {
305  global $ilAccess;
306 
307  if ((!$ilAccess->checkAccess("tst_statistics", "", $this->ref_id)) && (!$ilAccess->checkAccess("write", "", $this->ref_id)))
308  {
309  ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), TRUE);
310  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
311  }
312 
313  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_evaluation_details.html", "Modules/Test");
314 
315  $active_id = $_GET["active_id"];
316  if (strlen($active_id) == 0)
317  {
318  ilUtil::sendInfo($this->lng->txt("detailed_evaluation_missing_active_id"), TRUE);
319  $this->ctrl->redirect($this, "outEvaluation");
320  }
321 
322  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
323 
324  $data =& $this->object->getCompleteEvaluationData();
325  $this->tpl->setVariable("TEXT_BACK", $this->lng->txt("back"));
326  $this->tpl->setVariable("URL_BACK", $this->ctrl->getLinkTarget($this, "outEvaluation"));
327  $this->tpl->setVariable("HEADING_DETAILED_EVALUATION", sprintf($this->lng->txt("detailed_evaluation_for"),
328  $data->getParticipant($active_id)->getName())
329  );
330  $this->tpl->setVariable("STATISTICAL_DATA", $this->lng->txt("statistical_data"));
331  $this->tpl->setVariable("TXT_RESULTSPOINTS", $this->lng->txt("tst_stat_result_resultspoints"));
332  $this->tpl->setVariable("VALUE_RESULTSPOINTS", $data->getParticipant($active_id)->getReached() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getMaxpoints() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getReachedPointsInPercent()) . " %" . ")");
333  if (strlen($data->getParticipant($active_id)->getMark()))
334  {
335  $this->tpl->setVariable("TXT_RESULTSMARKS", $this->lng->txt("tst_stat_result_resultsmarks"));
336  $this->tpl->setVariable("VALUE_RESULTSMARKS", $data->getParticipant($active_id)->getMark());
337  if (strlen($data->getParticipant($active_id)->getECTSMark()))
338  {
339  $this->tpl->setVariable("TXT_ECTS", $this->lng->txt("ects_grade"));
340  $this->tpl->setVariable("VALUE_ECTS", $data->getParticipant($active_id)->getECTSMark());
341  }
342  }
343 
344  if( $this->object->isOfferingQuestionHintsEnabled() )
345  {
346  $this->tpl->setVariable("TXT_REQUESTED_HINTS_COUNT", $this->lng->txt("tst_question_hints_requested_hint_count_header"));
347  $this->tpl->setVariable("VALUE_REQUESTED_HINTS_COUNT", $data->getParticipant($active_id)->getRequestedHintsCountFromScoredPass());
348  }
349 
350  $this->tpl->setVariable("TXT_QWORKEDTHROUGH", $this->lng->txt("tst_stat_result_qworkedthrough"));
351  $this->tpl->setVariable("VALUE_QWORKEDTHROUGH", $data->getParticipant($active_id)->getQuestionsWorkedThrough() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getNumberOfQuestions() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getQuestionsWorkedThroughInPercent()) . " %" . ")");
352 
353  $this->tpl->setVariable("TXT_TIMEOFWORK", $this->lng->txt("tst_stat_result_timeofwork"));
354  $time_seconds = $data->getParticipant($active_id)->getTimeOfWork();
355  $atime_seconds = $data->getParticipant($active_id)->getNumberOfQuestions() ? $time_seconds / $data->getParticipant($active_id)->getNumberOfQuestions() : 0;
356  $time_hours = floor($time_seconds/3600);
357  $time_seconds -= $time_hours * 3600;
358  $time_minutes = floor($time_seconds/60);
359  $time_seconds -= $time_minutes * 60;
360  $this->tpl->setVariable("VALUE_TIMEOFWORK", sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds));
361  $this->tpl->setVariable("TXT_ATIMEOFWORK", $this->lng->txt("tst_stat_result_atimeofwork"));
362  $time_hours = floor($atime_seconds/3600);
363  $atime_seconds -= $time_hours * 3600;
364  $time_minutes = floor($atime_seconds/60);
365  $atime_seconds -= $time_minutes * 60;
366  $this->tpl->setVariable("VALUE_ATIMEOFWORK", sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $atime_seconds));
367  $this->tpl->setVariable("TXT_FIRSTVISIT", $this->lng->txt("tst_stat_result_firstvisit"));
368  #$this->tpl->setVariable("VALUE_FIRSTVISIT",
369  # date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], $data->getParticipant($active_id)->getFirstVisit())
370  #);
371  $this->tpl->setVariable('VAL_FIRST_VISIT',ilDatePresentation::formatDate(
372  new ilDateTime($data->getParticipant($active_id)->getFirstVisit(),IL_CAL_UNIX)));
373  $this->tpl->setVariable("TXT_LASTVISIT", $this->lng->txt("tst_stat_result_lastvisit"));
374  #$this->tpl->setVariable("VALUE_LASTVISIT",
375  # date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], $data->getParticipant($active_id)->getLastVisit())
376  #);
377  $this->tpl->setVariable('VAL_FIRST_VISIT',ilDatePresentation::formatDate(
378  new ilDateTime($data->getParticipant($active_id)->getLastVisit(),IL_CAL_UNIX)));
379 
380  $this->tpl->setVariable("TXT_NROFPASSES", $this->lng->txt("tst_nr_of_passes"));
381  $this->tpl->setVariable("VALUE_NROFPASSES", $data->getParticipant($active_id)->getLastPass() + 1);
382  $this->tpl->setVariable("TXT_SCOREDPASS", $this->lng->txt("scored_pass"));
383  if ($this->object->getPassScoring() == SCORE_BEST_PASS)
384  {
385  $this->tpl->setVariable("VALUE_SCOREDPASS", $data->getParticipant($active_id)->getBestPass() + 1);
386  }
387  else
388  {
389  $this->tpl->setVariable("VALUE_SCOREDPASS", $data->getParticipant($active_id)->getLastPass() + 1);
390  }
391 
392  $median = $data->getStatistics()->getStatistics()->median();
393  $pct = $data->getParticipant($active_id)->getMaxpoints() ? ($median / $data->getParticipant($active_id)->getMaxpoints()) * 100.0 : 0;
394  $mark = $this->object->mark_schema->getMatchingMark($pct);
395  if (is_object($mark))
396  {
397  $this->tpl->setVariable("TXT_MARK_MEDIAN", $this->lng->txt("tst_stat_result_mark_median"));
398  $this->tpl->setVariable("VALUE_MARK_MEDIAN", $mark->getShortName());
399  }
400 
401  $this->tpl->setVariable("TXT_RANK_PARTICIPANT", $this->lng->txt("tst_stat_result_rank_participant"));
402  $this->tpl->setVariable("VALUE_RANK_PARTICIPANT", $data->getStatistics()->getStatistics()->rank($data->getParticipant($active_id)->getReached()));
403  $this->tpl->setVariable("TXT_RANK_MEDIAN", $this->lng->txt("tst_stat_result_rank_median"));
404  $this->tpl->setVariable("VALUE_RANK_MEDIAN", $data->getStatistics()->getStatistics()->rank_median());
405  $this->tpl->setVariable("TXT_TOTAL_PARTICIPANTS", $this->lng->txt("tst_stat_result_total_participants"));
406  $this->tpl->setVariable("VALUE_TOTAL_PARTICIPANTS", $data->getStatistics()->getStatistics()->count());
407  $this->tpl->setVariable("TXT_RESULT_MEDIAN", $this->lng->txt("tst_stat_result_median"));
408  $this->tpl->setVariable("VALUE_RESULT_MEDIAN", $median);
409 
410  for ($pass = 0; $pass <= $data->getParticipant($active_id)->getLastPass(); $pass++)
411  {
412  $finishdate = $this->object->getPassFinishDate($active_id, $pass);
413  if ($finishdate > 0)
414  {
415  $this->tpl->setCurrentBlock("question_header");
416  $this->tpl->setVariable("TXT_QUESTION_DATA", sprintf($this->lng->txt("tst_eval_question_points"), $pass+1));
417  $this->tpl->parseCurrentBlock();
418  global $ilAccess;
419  if (($ilAccess->checkAccess("write", "", $_GET["ref_id"])))
420  {
421  $this->tpl->setCurrentBlock("question_footer");
422  $this->tpl->setVariable("TEXT_TO_DETAILED_RESULTS", $this->lng->txt("tst_show_answer_sheet"));
423  $this->ctrl->setParameter($this, "statistics", "1");
424  $this->ctrl->setParameter($this, "active_id", $active_id);
425  $this->ctrl->setParameter($this, "pass", $pass);
426  $this->tpl->setVariable("URL_TO_DETAILED_RESULTS", $this->ctrl->getLinkTarget($this, "outParticipantsPassDetails"));
427  $this->tpl->parseCurrentBlock();
428  }
429  $questions = $data->getParticipant($active_id)->getQuestions($pass);
430  if (!is_array($questions))
431  {
432  $questions = $data->getParticipant($active_id)->getQuestions(0);
433  }
434  $counter = 1;
435  foreach ($questions as $question)
436  {
437  $this->tpl->setCurrentBlock("question_row");
438  $this->tpl->setVariable("QUESTION_COUNTER", $counter);
439  $this->tpl->setVariable("QUESTION_ID", $question["id"]);
440  $this->tpl->setVariable("QUESTION_ID_TXT", $this->lng->txt('question_id_short'));
441  $this->tpl->setVariable("QUESTION_TITLE", $data->getQuestionTitle($question["id"]));
442  $answeredquestion = $data->getParticipant($active_id)->getPass($pass)->getAnsweredQuestionByQuestionId($question["id"]);
443  if (is_array($answeredquestion))
444  {
445  $percent = $answeredquestion["points"] ? $answeredquestion["reached"] / $answeredquestion["points"] * 100.0 : 0;
446  $this->tpl->setVariable("QUESTION_POINTS", $answeredquestion["reached"] . " " . strtolower($this->lng->txt("of")) . " " . $answeredquestion["points"] . " (" . sprintf("%.2f", $percent) . " %)");
447  }
448  else
449  {
450  $this->tpl->setVariable("QUESTION_POINTS", "0 " . strtolower($this->lng->txt("of")) . " " . $question["points"] . " (" . sprintf("%.2f", 0) . " %) - " . $this->lng->txt("question_not_answered"));
451  }
452  $this->tpl->parseCurrentBlock();
453  $counter++;
454  }
455  $this->tpl->touchBlock("question_stats");
456  }
457  }
458  }
459 
465  {
466  $this->getQuestionResultForTestUsers($_GET["qid"], $this->object->getTestId());
467  }
468 
474  {
475  require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
476  $question_object = assQuestion::_instanciateQuestion($_GET["qid"]);
477  if ( $question_object instanceof ilObjFileHandlingQuestionType )
478  {
479  $question_object->getFileUploadZIPFile($this->object->getTestId());
480  }
481  else
482  {
483  $this->ctrl->redirect($this, "singleResults");
484  }
485  }
486 
494  function eval_a()
495  {
496  global $ilAccess;
497 
498  if ((!$ilAccess->checkAccess("tst_statistics", "", $this->ref_id)) && (!$ilAccess->checkAccess("write", "", $this->ref_id)))
499  {
500  // allow only evaluation access
501  ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
502  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
503  }
504 
505  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_eval_anonymous_aggregation.html", "Modules/Test");
506  $eval =& $this->object->getCompleteEvaluationData();
507  $data = array();
508  $foundParticipants =& $eval->getParticipants();
509  if (count($foundParticipants))
510  {
511  $template = new ilTemplate("tpl.il_as_tst_evaluation_export.html", TRUE, TRUE, "Modules/Test");
512  $template->setVariable("EXPORT_DATA", $this->lng->txt("exp_eval_data"));
513  $template->setVariable("TEXT_EXCEL", $this->lng->txt("exp_type_excel"));
514  $template->setVariable("TEXT_CSV", $this->lng->txt("exp_type_spss"));
515  $template->setVariable("CMD_EXPORT", "exportAggregatedResults");
516  $template->setVariable("BTN_EXPORT", $this->lng->txt("export"));
517  $template->setVariable("BTN_PRINT", $this->lng->txt("print"));
518  $template->setVariable("BTN_COMMAND", $this->ctrl->getCmd());
519  $template->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "exportAggregatedResults"));
520  $exportoutput = $template->get();
521  $this->tpl->setVariable("EVALUATION_EXPORT", $exportoutput);
522 
523  array_push($data, array(
524  'result' => $this->lng->txt("tst_eval_total_persons"),
525  'value' => count($foundParticipants)
526  ));
527  $total_finished = $this->object->evalTotalFinished();
528  array_push($data, array(
529  'result' => $this->lng->txt("tst_eval_total_finished"),
530  'value' => $total_finished
531  ));
532  $average_time = $this->object->evalTotalStartedAverageTime();
533  $diff_seconds = $average_time;
534  $diff_hours = floor($diff_seconds/3600);
535  $diff_seconds -= $diff_hours * 3600;
536  $diff_minutes = floor($diff_seconds/60);
537  $diff_seconds -= $diff_minutes * 60;
538  array_push($data, array(
539  'result' => $this->lng->txt("tst_eval_total_finished_average_time"),
540  'value' => sprintf("%02d:%02d:%02d", $diff_hours, $diff_minutes, $diff_seconds)
541  ));
542  $total_passed = 0;
543  $total_passed_reached = 0;
544  $total_passed_max = 0;
545  $total_passed_time = 0;
546  foreach ($foundParticipants as $userdata)
547  {
548  if ($userdata->getPassed())
549  {
550  $total_passed++;
551  $total_passed_reached += $userdata->getReached();
552  $total_passed_max += $userdata->getMaxpoints();
553  $total_passed_time += $userdata->getTimeOfWork();
554  }
555  }
556  $average_passed_reached = $total_passed ? $total_passed_reached / $total_passed : 0;
557  $average_passed_max = $total_passed ? $total_passed_max / $total_passed : 0;
558  $average_passed_time = $total_passed ? $total_passed_time / $total_passed : 0;
559  array_push($data, array(
560  'result' => $this->lng->txt("tst_eval_total_passed"),
561  'value' => $total_passed
562  ));
563  array_push($data, array(
564  'result' => $this->lng->txt("tst_eval_total_passed_average_points"),
565  'value' => sprintf("%2.2f", $average_passed_reached) . " " . strtolower($this->lng->txt("of")) . " " . sprintf("%2.2f", $average_passed_max)
566  ));
567  $average_time = $average_passed_time;
568  $diff_seconds = $average_time;
569  $diff_hours = floor($diff_seconds/3600);
570  $diff_seconds -= $diff_hours * 3600;
571  $diff_minutes = floor($diff_seconds/60);
572  $diff_seconds -= $diff_minutes * 60;
573  array_push($data, array(
574  'result' => $this->lng->txt("tst_eval_total_passed_average_time"),
575  'value' => sprintf("%02d:%02d:%02d", $diff_hours, $diff_minutes, $diff_seconds)
576  ));
577  }
578 
579  include_once "./Modules/Test/classes/tables/class.ilTestAggregatedResultsTableGUI.php";
580  $table_gui = new ilTestAggregatedResultsTableGUI($this, 'eval_a');
581  $table_gui->setData($data);
582  $this->tpl->setVariable('AGGREGATED_RESULTS', $table_gui->getHTML());
583 
584  $rows = array();
585  foreach ($eval->getQuestionTitles() as $question_id => $question_title)
586  {
587  $answered = 0;
588  $reached = 0;
589  $max = 0;
590  foreach ($foundParticipants as $userdata)
591  {
592  for ($i = 0; $i <= $userdata->getLastPass(); $i++)
593  {
594  if (is_object($userdata->getPass($i)))
595  {
596  $question =& $userdata->getPass($i)->getAnsweredQuestionByQuestionId($question_id);
597  if (is_array($question))
598  {
599  $answered++;
600  $reached += $question["reached"];
601  $max += $question["points"];
602  }
603  }
604  }
605  }
606  $percent = $max ? $reached/$max * 100.0 : 0;
607  $counter++;
608  $this->ctrl->setParameter($this, "qid", $question_id);
609  array_push($rows,
610  array(
611  'qid' => $question_id,
612  'title' => $question_title,
613  'points' => sprintf("%.2f", $answered ? $reached / $answered : 0) . " " . strtolower($this->lng->txt("of")) . " " . sprintf("%.2f", $answered ? $max / $answered : 0),
614  'percentage' => (float)$percent,
615  'answers' => $answered
616  )
617  );
618  }
619  include_once "./Modules/Test/classes/tables/class.ilTestAverageReachedPointsTableGUI.php";
620  $table_gui = new ilTestAverageReachedPointsTableGUI($this, 'eval_a');
621  $table_gui->setData($rows);
622  $this->tpl->setVariable('TBL_AVG_REACHED', $table_gui->getHTML());
623  }
624 
628  public function exportEvaluation()
629  {
630  $filterby = "";
631  if (array_key_exists("g_filterby", $_GET))
632  {
633  $filterby = $_GET["g_filterby"];
634  }
635 
636  $filtertext = "";
637  if (array_key_exists("g_userfilter", $_GET))
638  {
639  $filtertext = $_GET["g_userfilter"];
640  }
641 
642  $passedonly = FALSE;
643  if (array_key_exists("g_passedonly", $_GET))
644  {
645  if ($_GET["g_passedonly"] == 1)
646  {
647  $passedonly = TRUE;
648  }
649  }
650 
651  switch ($_POST["export_type"])
652  {
653  case "excel":
654  require_once './Modules/Test/classes/class.ilTestExport.php';
655  $exportObj = new ilTestExport($this->object, "results");
656  $exportObj->exportToExcel($deliver = TRUE, $filterby, $filtertext, $passedonly);
657  break;
658 
659  case "csv":
660  require_once './Modules/Test/classes/class.ilTestExport.php';
661  $exportObj = new ilTestExport($this->object, "results");
662  $exportObj->exportToCSV($deliver = TRUE, $filterby, $filtertext, $passedonly);
663  break;
664 
665  case "certificate":
666  if ($passedonly)
667  {
668  $this->ctrl->setParameterByClass("iltestcertificategui", "g_passedonly", "1");
669  }
670  if (strlen($filtertext))
671  {
672  $this->ctrl->setParameterByClass("iltestcertificategui", "g_userfilter", $filtertext);
673  }
674  $this->ctrl->redirect($this, "exportCertificate");
675  break;
676  }
677  }
678 
685  {
686  switch ($_POST["export_type"])
687  {
688  case "excel":
689  include_once "./Modules/Test/classes/class.ilTestExport.php";
690  $exportObj = new ilTestExport($this->object, "aggregated");
691  $exportObj->exportToExcel($deliver = TRUE);
692  break;
693  case "csv":
694  include_once "./Modules/Test/classes/class.ilTestExport.php";
695  $exportObj = new ilTestExport($this->object, "aggregated");
696  $exportObj->exportToCSV($deliver = TRUE);
697  break;
698  }
699  }
700 
707  public function exportCertificate()
708  {
709  global $ilUser;
710 
711  include_once "./Services/Utilities/classes/class.ilUtil.php";
712  include_once "./Services/Certificate/classes/class.ilCertificate.php";
713  include_once "./Modules/Test/classes/class.ilTestCertificateAdapter.php";
714  $certificate = new ilCertificate(new ilTestCertificateAdapter($this->object));
715  $archive_dir = $certificate->createArchiveDirectory();
716  $total_users = array();
717  $total_users =& $this->object->evalTotalPersonsArray();
718  if (count($total_users))
719  {
720  foreach ($total_users as $active_id => $name)
721  {
722  $user_id = $this->object->_getUserIdFromActiveId($active_id);
723  $pdf = $certificate->outCertificate(
724  array(
725  "active_id" => $active_id,
726  "userfilter" => $userfilter,
727  "passedonly" => $passedonly
728  ),
729  FALSE
730  );
731  if (strlen($pdf))
732  {
733  $certificate->addPDFtoArchiveDirectory($pdf, $archive_dir, $user_id . "_" . str_replace(" ", "_", ilUtil::getASCIIFilename($name)) . ".pdf");
734  }
735  }
736  $zipArchive = $certificate->zipCertificatesInArchiveDirectory($archive_dir, TRUE);
737  }
738 
739  }
740 
747  function getEvaluationQuestionId($question_id, $original_id = "")
748  {
749  if ($original_id > 0)
750  {
751  return $original_id;
752  }
753  else
754  {
755  return $question_id;
756  }
757  }
758 
767  {
768  global $ilTabs, $ilAccess;
769 
770  if (!$ilAccess->checkAccess('write', '', $this->ref_id))
771  {
772  // allow only write access
773  ilUtil::sendInfo($this->lng->txt('no_permission'), true);
774  $this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
775  }
776 
777  $this->ctrl->saveParameter($this, "active_id");
778  $active_id = (int)$_GET["active_id"];
779  $testSession = $this->testSessionFactory->getSession($active_id);
780 
781  // protect actives from other tests
782  if( $testSession->getTestId() != $this->object->getTestId() )
783  {
784  ilUtil::sendInfo($this->lng->txt('no_permission'), true);
785  $this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
786  }
787 
788  $this->ctrl->saveParameter($this, "pass");
789  $pass = (int)$_GET["pass"];
790 
791  $result_array =& $this->object->getTestResult($active_id, $pass);
792 
793  $overview = $this->getPassDetailsOverview($result_array, $active_id, $pass, "iltestevaluationgui", "outParticipantsPassDetails");
794  $user_data = $this->getResultsUserdata($testSession, $active_id, FALSE);
795  $user_id = $this->object->_getUserIdFromActiveId($active_id);
796 
797  $template = new ilTemplate("tpl.il_as_tst_pass_details_overview_participants.html", TRUE, TRUE, "Modules/Test");
798 
799  $this->ctrl->setParameter($this, "pdf", "1");
800  $template->setCurrentBlock("pdf_export");
801  $template->setVariable("PDF_URL", $this->ctrl->getLinkTarget($this, "outParticipantsPassDetails"));
802  $this->ctrl->setParameter($this, "pdf", "");
803  $template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
804  $template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
805  $template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
806  $template->parseCurrentBlock();
807 
808  if (array_key_exists("statistics", $_GET) && ($_GET["statistics"] == 1))
809  {
810  $template->setVariable("BACK_TEXT", $this->lng->txt("back"));
811  $this->ctrl->setParameterByClass("ilTestEvaluationGUI", "active_id", $active_id);
812  $template->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilTestEvaluationGUI", "detailedEvaluation"));
813  }
814  else
815  {
816  if ($this->object->getNrOfTries() == 1)
817  {
818  $template->setVariable("BACK_TEXT", $this->lng->txt("back"));
819  $template->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilobjtestgui", "participants"));
820  }
821  else
822  {
823  $template->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass(get_class($this), "outParticipantsResultsOverview"));
824  $template->setVariable("BACK_TEXT", $this->lng->txt("tst_results_back_overview"));
825  }
826  }
827  $template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
828  $template->setVariable("PRINT_URL", "javascript:window.print();");
829 
830  if ($this->object->getNrOfTries() == 1)
831  {
832  $statement = $this->getFinalStatement($active_id);
833  $template->setVariable("USER_MARK", $statement["mark"]);
834  if (strlen($statement["markects"]))
835  {
836  $template->setVariable("USER_MARK_ECTS", $statement["markects"]);
837  }
838  }
839 
840  $list_of_answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, TRUE);
841  $template->setVariable("LIST_OF_ANSWERS", $list_of_answers);
842  $template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results"));
843  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
844  $template->setVariable("PASS_DETAILS", $overview);
845  $template->setVariable("USER_DETAILS", $user_data);
846  $uname = $this->object->userLookupFullName($user_id);
847  $template->setVariable("USER_NAME", sprintf($this->lng->txt("tst_result_user_name_pass"), $pass + 1, $uname));
848 
849  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
850  if ($this->object->getShowSolutionAnswersOnly())
851  {
852  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
853  }
854 
855  if (array_key_exists("pdf", $_GET) && ($_GET["pdf"] == 1))
856  {
857  //$this->object->deliverPDFfromHTML($template->get());
858  require_once 'class.ilTestPDFGenerator.php';
859  ilTestPDFGenerator::generatePDF($template->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitle());
860  }
861  else
862  {
863  $this->tpl->setVariable("ADM_CONTENT", $template->get());
864  }
865  }
866 
873  {
874  global $ilAccess;
875 
876  if (!$ilAccess->checkAccess('write', '', $this->ref_id))
877  {
878  // allow only write access
879  ilUtil::sendInfo($this->lng->txt('no_permission'), true);
880  $this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
881  }
882 
883  $active_id = (int)$_GET["active_id"];
884  $testSession = $this->testSessionFactory->getSession($active_id);
885 
886  // protect actives from other tests
887  if( $testSession->getTestId() != $this->object->getTestId() )
888  {
889  ilUtil::sendInfo($this->lng->txt('no_permission'), true);
890  $this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
891  }
892 
893  if ($this->object->getNrOfTries() == 1)
894  {
895  $this->ctrl->setParameter($this, "active_id", $active_id);
896  $this->ctrl->setParameter($this, "pass", ilObjTest::_getResultPass($active_id));
897  $this->ctrl->redirect($this, "outParticipantsPassDetails");
898  }
899 
900  $template = new ilTemplate("tpl.il_as_tst_pass_overview_participants.html", TRUE, TRUE, "Modules/Test");
901 
902  $this->ctrl->setParameter($this, "pdf", "1");
903  $template->setCurrentBlock("pdf_export");
904  $template->setVariable("PDF_URL", $this->ctrl->getLinkTarget($this, "outParticipantsResultsOverview"));
905  $this->ctrl->setParameter($this, "pdf", "");
906  $template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
907  $template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
908  $template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
909  $template->parseCurrentBlock();
910 
911  $overview = $this->getPassOverview($active_id, "iltestevaluationgui", "outParticipantsPassDetails");
912  $template->setVariable("PASS_OVERVIEW", $overview);
913  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
914  $template->setVariable("BACK_TEXT", $this->lng->txt("back"));
915  $template->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilobjtestgui", "participants"));
916  $template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
917  $template->setVariable("PRINT_URL", "javascript:window.print();");
918 
919  $statement = $this->getFinalStatement($active_id);
920  $user_id = $this->object->_getUserIdFromActiveId($active_id);
921  $user_data = $this->getResultsUserdata($testSession, $active_id);
922  $template->setVariable("USER_DATA", $user_data);
923  $template->setVariable("TEXT_OVERVIEW", $this->lng->txt("tst_results_overview"));
924  $template->setVariable("USER_MARK", $statement["mark"]);
925  if (strlen($statement["markects"]))
926  {
927  $template->setVariable("USER_MARK_ECTS", $statement["markects"]);
928  }
929  $template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results"));
930  $template->parseCurrentBlock();
931 
932  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
933  if ($this->object->getShowSolutionAnswersOnly())
934  {
935  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
936  }
937 
938  if (array_key_exists("pdf", $_GET) && ($_GET["pdf"] == 1))
939  {
940  //$this->object->deliverPDFfromHTML($template->get(), $this->object->getTitle());
941 
942  $name = ilObjUser::_lookupName($user_id);
943  $filename = $name['lastname'] . '_' . $name['firstname'] . '_' . $name['login'] . '__'. $this->object->getTitle();
944  require_once 'class.ilTestPDFGenerator.php';
946  //ilUtil::deliverData($file, ilUtil::getASCIIFilename($this->object->getTitle()) . ".pdf", "application/pdf", false, true);
947  //$template->setVariable("PDF_FILE_LOCATION", $filename);
948  }
949  else
950  {
951  $this->tpl->setVariable("ADM_CONTENT", $template->get());
952  }
953  }
954 
963  {
964  $testSession = $this->testSessionFactory->getSession();
965 
966  $active_id = $testSession->getActiveId();
967  $user_id = $testSession->getUserId();
968 
969  $this->ctrl->saveParameter($this, "pass");
970  $pass = $_GET["pass"];
971  $result_array =& $this->object->getTestResult($active_id, $pass);
972 
973  $command_solution_details = "";
974  if ($this->object->getShowSolutionDetails())
975  {
976  $command_solution_details = "outCorrectSolution";
977  }
978  $overview = $this->getPassDetailsOverview($result_array, $active_id, $pass, "iltestevaluationgui", "outUserPassDetails", $command_solution_details);
979 
980  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_pass_details_overview_participants.html", "Modules/Test");
981 
982  if ($this->object->getNrOfTries() == 1)
983  {
984 
985  $this->tpl->setVariable("BACK_TEXT", $this->lng->txt("tst_results_back_introduction"));
986  $this->tpl->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilobjtestgui", "infoScreen"));
987  }
988  else
989  {
990  $this->tpl->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass(get_class($this), "outUserResultsOverview"));
991  $this->tpl->setVariable("BACK_TEXT", $this->lng->txt("tst_results_back_overview"));
992  }
993 
994  $this->tpl->parseCurrentBlock();
995 
996  if ($this->object->getNrOfTries() == 1)
997  {
998  $statement = $this->getFinalStatement($active_id);
999  $this->tpl->setVariable("USER_MARK", $statement["mark"]);
1000  if (strlen($statement["markects"]))
1001  {
1002  $this->tpl->setVariable("USER_MARK_ECTS", $statement["markects"]);
1003  }
1004  }
1005 
1006  $list_of_answers = $this->getPassListOfAnswers($result_array, $active_id, $pass);
1007 
1008  $this->tpl->setCurrentBlock("adm_content");
1009  $this->tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
1010  $this->tpl->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results"));
1011  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1012  $this->tpl->setVariable("PASS_DETAILS", $overview);
1013  $uname = $this->object->userLookupFullName($user_id, TRUE);
1014  $this->tpl->setVariable("USER_NAME", sprintf($this->lng->txt("tst_result_user_name_pass"), $pass + 1, $uname));
1015  $this->tpl->parseCurrentBlock();
1016 
1017  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1018  if ($this->object->getShowSolutionAnswersOnly())
1019  {
1020  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1021  }
1022  }
1023 
1032  {
1033  global $ilUser, $ilias, $ilLog;
1034 
1035  $testSession = $this->testSessionFactory->getSession();
1036 
1037  if (!$this->object->canShowTestResults($testSession, $ilUser->getId())) $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1038  include_once("./Services/UICore/classes/class.ilTemplate.php");
1039  $templatehead = new ilTemplate("tpl.il_as_tst_results_participants.html", TRUE, TRUE, "Modules/Test");
1040  $template = new ilTemplate("tpl.il_as_tst_results_participant.html", TRUE, TRUE, "Modules/Test");
1041 
1042  $pass = null;
1043  $user_id = $ilUser->getId();
1044  $uname = $this->object->userLookupFullName($user_id, TRUE);
1045  $active_id = $testSession->getActiveId();
1046  $hide_details = !$this->object->getShowPassDetails();
1047  if ($hide_details)
1048  {
1049  $executable = $this->object->isExecutable($testSession, $ilUser->getId());
1050  if (!$executable["executable"]) $hide_details = FALSE;
1051  }
1052  $begin = microtime(true);
1053  if (($this->object->getNrOfTries() == 1) && (!$hide_details))
1054  {
1055  $pass = 0;
1056  }
1057  else
1058  {
1059  $template->setCurrentBlock("pass_overview");
1060  $overview = $this->getPassOverview($active_id, "iltestevaluationgui", "outUserResultsOverview", FALSE, $hide_details);
1061  $template->setVariable("PASS_OVERVIEW", $overview);
1062  $template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results_overview"));
1063  $template->parseCurrentBlock();
1064  }
1065 
1066  if (((array_key_exists("pass", $_GET)) && (strlen($_GET["pass"]) > 0)) || (!is_null($pass)))
1067  {
1068  if (is_null($pass)) $pass = $_GET["pass"];
1069  }
1070 
1071 
1072  $this->ctrl->setParameter($this, "pass", $pass);
1073  $this->ctrl->setParameter($this, "pdf", "1");
1074  $templatehead->setCurrentBlock("pdf_export");
1075  $templatehead->setVariable("PDF_URL", $this->ctrl->getLinkTarget($this, "outUserResultsOverview"));
1076  $this->ctrl->setParameter($this, "pass", "");
1077  $this->ctrl->setParameter($this, "pdf", "");
1078  $templatehead->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
1079  $templatehead->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
1080  $templatehead->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
1081  $templatehead->parseCurrentBlock();
1082 
1083  include_once './Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
1084  if(ilRPCServerSettings::getInstance()->isEnabled())
1085  {
1086  if ($this->object->canShowCertificate($testSession, $user_id, $active_id))
1087  {
1088  $templatehead->setVariable("CERTIFICATE_URL", $this->ctrl->getLinkTarget($this, "outCertificate"));
1089  $templatehead->setVariable("CERTIFICATE_TEXT", $this->lng->txt("certificate"));
1090  }
1091  }
1092  $templatehead->setVariable("BACK_TEXT", $this->lng->txt("tst_results_back_introduction"));
1093  $templatehead->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilobjtestgui", "infoScreen"));
1094  $templatehead->setVariable("PRINT_TEXT", $this->lng->txt("print"));
1095  $templatehead->setVariable("PRINT_URL", "javascript:window.print();");
1096 
1097  $statement = $this->getFinalStatement($active_id);
1098  $user_data = $this->getResultsUserdata($testSession, $active_id, TRUE);
1099 
1100  // output of the details of a selected pass
1101  $this->ctrl->saveParameter($this, "pass");
1102  $this->ctrl->saveParameter($this, "active_id");
1103  if (!is_null($pass))
1104  {
1105  $result_array =& $this->object->getTestResult($active_id, $pass);
1106  $command_solution_details = "";
1107  if ($this->object->getShowSolutionDetails())
1108  {
1109  $command_solution_details = "outCorrectSolution";
1110  }
1111  $detailsoverview = (!$hide_details) ? $this->getPassDetailsOverview($result_array, $active_id, $pass, "iltestevaluationgui", "outUserResultsOverview", $command_solution_details) : '';
1112 
1113  $user_id = $this->object->_getUserIdFromActiveId($active_id);
1114 
1115  if (!$hide_details && $this->object->canShowSolutionPrintview())
1116  {
1117  $list_of_answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, $this->object->getShowSolutionListComparison());
1118  }
1119  else if ($this->object->getShowSolutionDetails())
1120  {
1121  // if this is not commented out, all questions with checkmarks/crosses will be shown
1122  // $list_of_answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, true);
1123  }
1124 
1125  $template->setVariable("LIST_OF_ANSWERS", $list_of_answers);
1126  $template->setVariable("PASS_RESULTS_OVERVIEW", sprintf($this->lng->txt("tst_results_overview_pass"), $pass + 1));
1127  $template->setVariable("PASS_DETAILS", $detailsoverview);
1128 
1129  $signature = $this->getResultsSignature();
1130  $template->setVariable("SIGNATURE", $signature);
1131  if ($this->object->isShowExamIdInTestResultsEnabled())
1132  {
1133  $template->setCurrentBlock('exam_id_footer');
1134  $template->setVariable('EXAM_ID_VAL', $this->object->lookupExamId(
1135  $testSession->getActiveId(), $pass
1136  ));
1137  $template->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
1138  $template->parseCurrentBlock();
1139  }
1140  }
1141  if ($this->object->getAnonymity()) {
1142  $template->setVariable("TEXT_HEADING", $this->lng->txt("tst_result"));
1143  }
1144  else {
1145  $template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name"), $uname));
1146  $template->setVariable("USER_DATA", $user_data);
1147  }
1148  $template->setVariable("USER_MARK", $statement["mark"]);
1149  if (strlen($statement["markects"]))
1150  {
1151  $template->setVariable("USER_MARK_ECTS", $statement["markects"]);
1152  }
1153  $template->parseCurrentBlock();
1154 
1155  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1156  if ($this->object->getShowSolutionAnswersOnly())
1157  {
1158  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1159  }
1160  $templatehead->setVariable("RESULTS_PARTICIPANT", $template->get());
1161 
1162  if (array_key_exists("pdf", $_GET) && ($_GET["pdf"] == 1))
1163  {
1164  //$this->object->deliverPDFfromHTML($template->get(), $this->object->getTitle());
1165  require_once 'class.ilTestPDFGenerator.php';
1166  $content = $template->get();
1167  ilTestPDFGenerator::generatePDF($template->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitle());
1168  //$this->object->deliverPDFfromHTML($template->get(), sprintf($this->lng->txt("tst_result_user_name"), $uname));
1169  }
1170  else
1171  {
1172  $this->tpl->setVariable("PRINT_CONTENT", $templatehead->get());
1173  }
1174  }
1175 
1184  {
1185  global $ilUser;
1186 
1187  if (!$this->object->getShowSolutionPrintview())
1188  {
1189  ilUtil::sendInfo($this->lng->txt("no_permission"), true);
1190  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1191  }
1192 
1193  $template = new ilTemplate("tpl.il_as_tst_info_list_of_answers.html", TRUE, TRUE, "Modules/Test");
1194 
1195  $pass = null;
1196  if (array_key_exists("pass", $_GET))
1197  {
1198  if (strlen($_GET["pass"])) $pass = $_GET["pass"];
1199  }
1200  $user_id = $ilUser->getId();
1201 
1202  $testSession = $this->testSessionFactory->getSession();
1203  $active_id = $testSession->getActiveId();
1204 
1205  $overview = "";
1206  if ($this->object->getNrOfTries() == 1)
1207  {
1208  $pass = 0;
1209  }
1210  else
1211  {
1212  $overview = $this->getPassOverview($active_id, "iltestevaluationgui", "outUserListOfAnswerPasses", TRUE);
1213  $template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_passes"));
1214  $template->setVariable("PASS_OVERVIEW", $overview);
1215  }
1216 
1217  $signature = "";
1218  if (strlen($pass))
1219  {
1220  $signature = $this->getResultsSignature();
1221  $result_array =& $this->object->getTestResult($active_id, $pass);
1222  $user_id =& $this->object->_getUserIdFromActiveId($active_id);
1223  $showAllAnswers = TRUE;
1224  if ($this->object->isExecutable($testSession, $user_id))
1225  {
1226  $showAllAnswers = FALSE;
1227  }
1228  $answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, FALSE, $showAllAnswers);
1229  $template->setVariable("PASS_DETAILS", $answers);
1230  }
1231  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1232  $template->setVariable("BACK_TEXT", $this->lng->txt("tst_results_back_introduction"));
1233  $template->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilobjtestgui", "infoScreen"));
1234  $template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
1235  $template->setVariable("PRINT_URL", "javascript:window.print();");
1236 
1237  $user_data = $this->getResultsUserdata($testSession, $active_id, TRUE);
1238  $template->setVariable("USER_DATA", $user_data);
1239  $template->setVariable("TEXT_LIST_OF_ANSWERS", $this->lng->txt("tst_list_of_answers"));
1240  if (strlen($signature))
1241  {
1242  $template->setVariable("SIGNATURE", $signature);
1243  }
1244  if ($this->object->isShowExamIdInTestResultsEnabled())
1245  {
1246  $template->setCurrentBlock('exam_id_footer');
1247  $template->setVariable('EXAM_ID_VAL', $this->object->lookupExamId(
1248  $testSession->getActiveId(), $pass
1249  ));
1250  $template->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
1251  $template->parseCurrentBlock();
1252  }
1253  $this->tpl->setVariable("ADM_CONTENT", $template->get());
1254 
1255  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1256  if ($this->object->getShowSolutionAnswersOnly())
1257  {
1258  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1259  }
1260  }
1261 
1269  function passDetails()
1270  {
1271  if (array_key_exists("pass", $_GET) && (strlen($_GET["pass"]) > 0))
1272  {
1273  $this->ctrl->saveParameter($this, "pass");
1274  $this->ctrl->saveParameter($this, "active_id");
1275  $this->outTestResults(false, $_GET["pass"]);
1276  }
1277  else
1278  {
1279  $this->outTestResults(false);
1280  }
1281  }
1282 
1289  {
1290  if( !$this->object->getShowSolutionDetails() )
1291  {
1292  ilUtil::sendInfo($this->lng->txt("no_permission"), true);
1293  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1294  }
1295 
1296  $testSession = $this->testSessionFactory->getSession();
1297  $activeId = $testSession->getActiveId();
1298 
1299  if( !($activeId > 0) )
1300  {
1301  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1302  }
1303 
1304  if( !$this->object->canShowTestResults($testSession, $testSession->getUserId()) )
1305  {
1306  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1307  }
1308 
1309  $this->ctrl->saveParameter($this, "pass");
1310  $pass = (int)$_GET['pass'];
1311 
1312  $testSequence = $this->testSequenceFactory->getSequenceByPass($testSession, $pass);
1313  $testSequence->loadFromDb();
1314  $testSequence->loadQuestions();
1315 
1316  $questionId = (int)$_GET['evaluation'];
1317 
1318  if( !$testSequence->questionExists($questionId) )
1319  {
1320  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1321  }
1322 
1323  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_correct_solution.html", "Modules/Test");
1324 
1325  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1326  $this->tpl->setCurrentBlock("ContentStyle");
1327  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
1328  $this->tpl->parseCurrentBlock();
1329 
1330  $this->tpl->setCurrentBlock("SyntaxStyle");
1331  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
1332  $this->tpl->parseCurrentBlock();
1333 
1334  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1335  if ($this->object->getShowSolutionAnswersOnly())
1336  {
1337  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1338  }
1339 
1340  $this->tpl->setCurrentBlock("adm_content");
1341  $solution = $this->getCorrectSolutionOutput($questionId, $activeId, $pass);
1342  $this->tpl->setVariable("OUTPUT_SOLUTION", $solution);
1343  $this->tpl->setVariable("TEXT_BACK", $this->lng->txt("back"));
1344  $this->ctrl->saveParameter($this, "pass");
1345  $this->ctrl->saveParameter($this, "active_id");
1346  $this->tpl->setVariable("URL_BACK", $this->ctrl->getLinkTarget($this, "outUserResultsOverview"));
1347  $this->tpl->parseCurrentBlock();
1348  }
1349 
1354  public function singleResults()
1355  {
1356  global $ilAccess;
1357 
1358  if ((!$ilAccess->checkAccess("tst_statistics", "", $this->ref_id)) && (!$ilAccess->checkAccess("write", "", $this->ref_id)))
1359  {
1360  // allow only evaluation access
1361  ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
1362  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1363  }
1364 
1365  $data =& $this->object->getCompleteEvaluationData();
1366  $color_class = array("tblrow1", "tblrow2");
1367  $counter = 0;
1368  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_eval_single_answers.html", "Modules/Test");
1369  $foundParticipants =& $data->getParticipants();
1370  if (count($foundParticipants) == 0)
1371  {
1372  ilUtil::sendInfo($this->lng->txt("tst_no_evaluation_data"));
1373  return;
1374  }
1375  else
1376  {
1377  $rows = array();
1378  foreach ($data->getQuestionTitles() as $question_id => $question_title)
1379  {
1380  $answered = 0;
1381  $reached = 0;
1382  $max = 0;
1383  foreach ($foundParticipants as $userdata)
1384  {
1385  $pass = $userdata->getScoredPass();
1386  if (is_object($userdata->getPass($pass)))
1387  {
1388  $question =& $userdata->getPass($pass)->getAnsweredQuestionByQuestionId($question_id);
1389  if (is_array($question))
1390  {
1391  $answered++;
1392  }
1393  }
1394  }
1395  $counter++;
1396  $this->ctrl->setParameter($this, "qid", $question_id);
1397  require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
1398  $question_object = assQuestion::_instanciateQuestion($question_id);
1399  $download = "";
1400  if ( $question_object instanceof ilObjFileHandlingQuestionType )
1401  {
1402  if ($question_object->hasFileUploads($this->object->getTestId()))
1403  {
1404  $download = "<a href=\"" . $this->ctrl->getLinkTarget($this, "exportFileUploadsForAllParticipants"). "\">" . $this->lng->txt("download") . "</a>";
1405  }
1406  }
1407  array_push($rows,
1408  array(
1409  'qid' => $question_id,
1410  'question_title' => $question_title,
1411  'number_of_answers' => $answered,
1412  'output' => "<a href=\"" . $this->ctrl->getLinkTarget($this, "exportQuestionForAllParticipants") . "\">" . $this->lng->txt("pdf_export") . "</a>",
1413  'file_uploads' => $download
1414  )
1415  );
1416  }
1417  if (count($rows))
1418  {
1419  require_once './Modules/Test/classes/tables/class.ilResultsByQuestionTableGUI.php';
1420  $table_gui = new ilResultsByQuestionTableGUI($this, "singleResults");
1421  $table_gui->setTitle($this->lng->txt("tst_answered_questions_test"));
1422  $table_gui->setData($rows);
1423 
1424  $this->tpl->setVariable("TBL_SINGLE_ANSWERS", $table_gui->getHTML());
1425  }
1426  else
1427  {
1428  $this->tpl->setVariable("TBL_SINGLE_ANSWERS", $this->lng->txt("adm_no_special_users"));
1429  }
1430  }
1431  }
1432 
1436  public function outCertificate()
1437  {
1438  $testSession = $this->testSessionFactory->getSession();
1439 
1440  require_once './Services/Certificate/classes/class.ilCertificate.php';
1441  require_once './Modules/Test/classes/class.ilTestCertificateAdapter.php';
1442  $certificate = new ilCertificate(new ilTestCertificateAdapter( $this->object ) );
1443  $certificate->outCertificate(
1444  array(
1445  "active_id" => $testSession->getActiveId(),
1446  "pass" => ilObjTest::_getResultPass( $testSession->getActiveId() )
1447  )
1448  );
1449  }
1450 
1451  public function confirmDeletePass()
1452  {
1453  if( !$this->object->isPassDeletionAllowed() )
1454  {
1455  $this->ctrl->redirect($this, 'outUserResultsOverview');
1456  }
1457 
1458  require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
1459 
1460  if( isset($_GET['context']) && strlen($_GET['context']) )
1461  {
1462  $context = $_GET['context'];
1463  }
1464  else
1465  {
1467  }
1468 
1469  $confirm = new ilTestPassDeletionConfirmationGUI($this->ctrl, $this->lng, $this);
1470  $confirm->build((int)$_GET['active_id'], (int)$_GET['pass'], $context);
1471 
1472  global $tpl;
1473  $tpl->setContent($this->ctrl->getHTML($confirm));
1474  }
1475 
1476  public function cancelDeletePass()
1477  {
1478  $this->redirectToPassDeletionContext($_POST['context']);
1479  }
1480 
1481  private function redirectToPassDeletionContext($context)
1482  {
1483  require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
1484 
1485  switch($context)
1486  {
1488 
1489  $this->ctrl->redirect($this, 'outUserResultsOverview');
1490 
1492 
1493  $this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
1494 
1496 
1497  $this->ctrl->redirectByClass('ilTestPlayerDynamicQuestionSetGUI', 'startTest');
1498  }
1499  }
1500 
1501  public function performDeletePass()
1502  {
1503  if( !$this->object->isPassDeletionAllowed() )
1504  {
1505  $this->ctrl->redirect($this, 'outUserResultsOverview');
1506  }
1508  global $ilDB;
1509 
1510  $active_fi = null;
1511  $pass = null;
1512 
1513  if( isset($_POST['active_id']) && (int)$_POST['active_id'] )
1514  {
1515  $active_fi = $_POST['active_id'];
1516  }
1517 
1518  if( isset($_POST['pass']) && is_numeric($_POST['pass']) )
1519  {
1520  $pass = $_POST['pass'];
1521  }
1522 
1523  if( is_null($active_fi) || is_null($pass) )
1524  {
1525  $this->ctrl->redirect($this, 'outUserResultsOverview');
1526  }
1527 
1528  if( !$this->object->isDynamicTest() && $pass == $this->object->_getResultPass($active_fi) )
1529  {
1530  $this->ctrl->redirect($this, 'outUserResultsOverview');
1531  }
1532 
1533  // Get information
1534  $result = $ilDB->query("
1535  SELECT tst_active.tries, tst_active.last_finished_pass, tst_sequence.pass
1536  FROM tst_active
1537  LEFT JOIN tst_sequence
1538  ON tst_sequence.active_fi = tst_active.active_id
1539  AND tst_sequence.pass = tst_active.tries
1540  WHERE tst_active.active_id = {$ilDB->quote($active_fi, 'integer')}
1541  ");
1542 
1543  $row = $ilDB->fetchAssoc($result);
1544 
1545  $tries = $row['tries'];
1546  $lastFinishedPass = is_numeric($row['last_finished_pass']) ? $row['last_finished_pass'] : -1;
1547 
1548  if( $pass < $lastFinishedPass )
1549  {
1550  $isActivePass = false;
1551  $must_renumber = true;
1552  }
1553  elseif( $pass == $lastFinishedPass )
1554  {
1555  $isActivePass = false;
1556 
1557  if( $tries == $row['pass'] )
1558  {
1559  $must_renumber = true;
1560  }
1561  else
1562  {
1563  $must_renumber = false;
1564  }
1565  }
1566  elseif( $pass == $row['pass'] )
1567  {
1568  $isActivePass = true;
1569  $must_renumber = false;
1570  }
1571 
1572  if( !$this->object->isDynamicTest() && $isActivePass )
1573  {
1574  $this->ctrl->redirect($this, 'outUserResultsOverview');
1575  }
1576 
1577  if( $pass == 0 && (
1578  ($lastFinishedPass == 0 && $tries == 1 && $tries != $row['pass'])
1579  || ($isActivePass == true) // should be equal to || ($lastFinishedPass == -1 && $tries == 0)
1580  ))
1581  {
1582  $last_pass = true;
1583  }
1584  else
1585  {
1586  $last_pass = false;
1587  }
1588 
1589  // Work on tables:
1590  // tst_active
1591  if ($last_pass)
1592  {
1593  $ilDB->manipulate(
1594  'DELETE
1595  FROM tst_active
1596  WHERE active_id = ' . $ilDB->quote($active_fi, 'integer')
1597  );
1598  }
1599  elseif( !$isActivePass )
1600  {
1601  $ilDB->manipulate(
1602  'UPDATE tst_active
1603  SET tries = ' . $ilDB->quote($tries-1, 'integer') . ',
1604  last_finished_pass = ' . $ilDB->quote($lastFinishedPass-1, 'integer') . '
1605  WHERE active_id = ' . $ilDB->quote($active_fi, 'integer')
1606  );
1607  }
1608  // tst_manual_fb
1609  $ilDB->manipulate(
1610  'DELETE
1611  FROM tst_manual_fb
1612  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1613  AND pass = ' . $ilDB->quote($pass, 'integer')
1614  );
1615 
1616  if ($must_renumber)
1617  {
1618  $ilDB->manipulate(
1619  'UPDATE tst_manual_fb
1620  SET pass = pass - 1
1621  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer'). '
1622  AND pass > ' . $ilDB->quote($pass, 'integer')
1623  );
1624  }
1625 
1626  // tst_mark -> nothing to do
1627  //
1628  // tst_pass_result
1629  $ilDB->manipulate(
1630  'DELETE
1631  FROM tst_pass_result
1632  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1633  AND pass = ' . $ilDB->quote($pass, 'integer')
1634  );
1635 
1636  if ($must_renumber)
1637  {
1638  $ilDB->manipulate(
1639  'UPDATE tst_pass_result
1640  SET pass = pass - 1
1641  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer'). '
1642  AND pass > ' . $ilDB->quote($pass, 'integer')
1643  );
1644  }
1645 
1646  // tst_qst_solved -> nothing to do
1647 
1648  // tst_rnd_copy -> nothing to do
1649  // tst_rnd_qpl_title -> nothing to do
1650 
1651  // tst_sequence
1652  $ilDB->manipulate(
1653  'DELETE
1654  FROM tst_sequence
1655  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1656  AND pass = ' . $ilDB->quote($pass, 'integer')
1657  );
1658 
1659  if ($must_renumber)
1660  {
1661  $ilDB->manipulate(
1662  'UPDATE tst_sequence
1663  SET pass = pass - 1
1664  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer'). '
1665  AND pass > ' . $ilDB->quote($pass, 'integer')
1666  );
1667  }
1668 
1669  if( $this->object->isDynamicTest() )
1670  {
1671  $tables = array(
1672  'tst_seq_qst_tracking', 'tst_seq_qst_answstatus', 'tst_seq_qst_postponed', 'tst_seq_qst_checked'
1673  );
1674 
1675  foreach($tables as $table)
1676  {
1677  $ilDB->manipulate("
1678  DELETE FROM $table
1679  WHERE active_fi = {$ilDB->quote($active_fi, 'integer')}
1680  AND pass = {$ilDB->quote($pass, 'integer')}
1681  ");
1682 
1683  if( $must_renumber )
1684  {
1685  $ilDB->manipulate("
1686  UPDATE $table
1687  SET pass = pass - 1
1688  WHERE active_fi = {$ilDB->quote($active_fi, 'integer')}
1689  AND pass > {$ilDB->quote($pass, 'integer')}
1690  ");
1691  }
1692  }
1693  }
1694 
1695  // tst_solutions
1696  $ilDB->manipulate(
1697  'DELETE
1698  FROM tst_solutions
1699  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1700  AND pass = ' . $ilDB->quote($pass, 'integer')
1701  );
1702 
1703  if ($must_renumber)
1704  {
1705  $ilDB->manipulate(
1706  'UPDATE tst_solutions
1707  SET pass = pass - 1
1708  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer'). '
1709  AND pass > ' . $ilDB->quote($pass, 'integer')
1710  );
1711  }
1712 
1713  // tst_test_result
1714  $ilDB->manipulate(
1715  'DELETE
1716  FROM tst_test_result
1717  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1718  AND pass = ' . $ilDB->quote($pass, 'integer')
1719  );
1720 
1721  if ($must_renumber)
1722  {
1723  $ilDB->manipulate(
1724  'UPDATE tst_test_result
1725  SET pass = pass - 1
1726  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1727  AND pass > ' . $ilDB->quote($pass, 'integer')
1728  );
1729  }
1730 
1731  // tst_test_rnd_qst -> nothing to do
1732 
1733  // tst_times
1734  $ilDB->manipulate(
1735  'DELETE
1736  FROM tst_times
1737  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1738  AND pass = ' . $ilDB->quote($pass, 'integer')
1739  );
1740 
1741  if ($must_renumber)
1742  {
1743  $ilDB->manipulate(
1744  'UPDATE tst_times
1745  SET pass = pass - 1
1746  WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer'). '
1747  AND pass > ' . $ilDB->quote($pass, 'integer')
1748  );
1749  }
1750 
1751  require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
1753  {
1754  $this->object->logAction($this->lng->txtlng("assessment", "log_deleted_pass", ilObjAssessmentFolder::_getLogLanguage()));
1755  }
1756  // tst_result_cache
1757  // Ggfls. nur renumbern.
1758  require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
1760 
1761  if( $this->object->isDynamicTest() )
1762  {
1763  require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
1765  }
1766 
1767  $this->redirectToPassDeletionContext($_POST['context']);
1768  }
1769 }
1770