24 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
25 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
63 $cmd = $this->ctrl->getCmd();
64 $next_class = $this->ctrl->getNextClass($this);
65 $this->ctrl->saveParameter($this,
"sequence");
66 $this->ctrl->saveParameter($this,
"active_id");
79 $headernames = array();
80 if ($this->object->getAnonymity())
82 array_push($headernames, $this->lng->txt(
"counter"));
86 array_push($headernames, $this->lng->txt(
"name"));
87 array_push($headernames, $this->lng->txt(
"login"));
89 $additionalFields = $this->
object->getEvaluationAdditionalFields();
90 if (count($additionalFields))
92 foreach ($additionalFields as $fieldname)
94 array_push($headernames, $this->lng->txt($fieldname));
97 array_push($headernames, $this->lng->txt(
"tst_reached_points"));
98 array_push($headernames, $this->lng->txt(
"tst_mark"));
99 if ($this->object->ects_output)
101 array_push($headernames, $this->lng->txt(
"ects_grade"));
103 array_push($headernames, $this->lng->txt(
"tst_answered_questions"));
104 array_push($headernames, $this->lng->txt(
"working_time"));
105 array_push($headernames, $this->lng->txt(
"detailed_evaluation"));
111 $headervars = array();
112 if ($this->object->getAnonymity())
114 array_push($headervars,
"counter");
118 array_push($headervars,
"name");
119 array_push($headervars,
"login");
121 array_push($headervars,
"resultspoints");
122 array_push($headervars,
"resultsmarks");
123 if ($this->object->ects_output)
125 array_push($headervars,
"ects_grade");
127 array_push($headervars,
"qworkedthrough");
128 array_push($headervars,
"timeofwork");
129 array_push($headervars,
"");
135 include_once
"./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
137 $table_gui->writeFilterToSession();
138 $this->ctrl->redirect($this,
"outEvaluation");
143 include_once
"./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
145 $table_gui->resetFilter();
146 $this->ctrl->redirect($this,
"outEvaluation");
158 if ((!$ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) && (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)))
162 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
165 include_once
"./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
168 $arrFilter = array();
169 foreach ($table_gui->getFilterItems() as $item)
171 if ($item->getValue() !==
false)
173 switch ($item->getPostVar())
178 $arrFilter[$item->getPostVar()] = $item->getValue();
181 $passedonly = $item->getChecked();
186 include_once
"./Modules/Test/classes/class.ilTestEvaluationData.php";
188 $eval->setFilterArray($arrFilter);
189 $foundParticipants =& $eval->getParticipants();
191 if (count($foundParticipants) > 0)
193 if ($this->object->ects_output)
195 $passed_array =& $this->
object->getTotalPointsPassedArray();
197 foreach ($foundParticipants as $active_id => $userdata)
202 $mark_obj = $this->
object->getMarkSchema()->getMatchingMark($userdata->getReachedPointsInPercent());
203 if ($mark_obj->getPassed() == FALSE)
212 foreach ($userfields as $key => $value)
214 $evaluationrow[$key] = strlen($value) ? $value :
' ';
216 $evaluationrow = array();
218 if ($this->object->getAnonymity())
220 $fullname = $counter;
221 $evaluationrow[
'name'] = $fullname;
222 $evaluationrow[
'login'] =
'';
226 $evaluationrow[
'name'] = $userdata->getName();
227 if (strlen($userdata->getLogin()))
229 $evaluationrow[
'login'] =
"[" . $userdata->getLogin() .
"]";
233 $evaluationrow[
'login'] =
'';
237 $evaluationrow[
'reached'] = $userdata->getReached();
238 $evaluationrow[
'max'] = $userdata->getMaxpoints();
239 $percentage = $userdata->getReachedPointsInPercent();
240 $mark = $this->
object->getMarkSchema()->getMatchingMark($percentage);
241 if (is_object($mark))
243 $evaluationrow[
'mark'] = $mark->getShortName();
245 if ($this->object->ects_output)
247 $ects_mark = $this->
object->getECTSGrade($passed_array, $userdata->getReached(), $userdata->getMaxPoints());
248 $evaluationrow[
'ects_grade'] = $ects_mark;
250 $evaluationrow[
'answered'] = $userdata->getQuestionsWorkedThrough() .
" " . strtolower($this->lng->txt(
"of")) .
" " . $userdata->getNumberOfQuestions() .
" (" . sprintf(
"%2.2f", $userdata->getQuestionsWorkedThroughInPercent()) .
" %" .
")";
251 $time_seconds = $userdata->getTimeOfWork();
252 $time_hours = floor($time_seconds/3600);
253 $time_seconds -= $time_hours * 3600;
254 $time_minutes = floor($time_seconds/60);
255 $time_seconds -= $time_minutes * 60;
256 $evaluationrow[
'working_time'] = sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds);
257 $this->ctrl->setParameter($this,
"active_id", $active_id);
258 $href = $this->ctrl->getLinkTarget($this,
"detailedEvaluation");
259 $detailed_evaluation = $this->lng->txt(
"detailed_evaluation_show");
260 $evaluationrow[
'details'] =
"<a class=\"il_ContainerItemCommand\" href=\"$href\">$detailed_evaluation</a>";
262 $evaluationrow[
'gender'] = $userfields[
'gender'];
263 $evaluationrow[
'email'] = $userfields[
'email'];
264 $evaluationrow[
'institution'] = $userfields[
'institution'];
265 $evaluationrow[
'street'] = $userfields[
'street'];
266 $evaluationrow[
'city'] = $userfields[
'city'];
267 $evaluationrow[
'zipcode'] = $userfields[
'zipcode'];
268 $evaluationrow[
'country'] = $userfields[
'country'];
269 $evaluationrow[
'departement'] = $userfields[
'departement'];
270 $evaluationrow[
'matriculation'] = $userfields[
'matriculation'];
272 array_push($data, $evaluationrow);
277 $table_gui->setData($data);
278 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_evaluation.html",
"Modules/Test");
279 $this->tpl->setVariable(
'EVALUATION_DATA', $table_gui->getHTML());
280 if (count($foundParticipants) > 0)
282 $template =
new ilTemplate(
"tpl.il_as_tst_evaluation_export.html", TRUE, TRUE,
"Modules/Test");
283 $template->setVariable(
"EXPORT_DATA", $this->lng->txt(
"exp_eval_data"));
284 if (!$this->object->getAnonymity())
286 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
287 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
290 $template->setVariable(
"TEXT_CERTIFICATE", $this->lng->txt(
"exp_type_certificate"));
293 if (!$this->object->isRandomTest() && $this->
object->hasSingleChoiceQuestions())
295 $template->setCurrentBlock(
'singlechoice');
296 $template->setVariable(
"TEXT_SINGLECHOICE", $this->lng->txt(
"exp_type_singlechoice"));
297 $template->parseCurrentBlock();
300 $template->setVariable(
"TEXT_EXCEL", $this->lng->txt(
"exp_type_excel"));
301 $template->setVariable(
"TEXT_CSV", $this->lng->txt(
"exp_type_spss"));
302 $template->setVariable(
"TEXT_IMS_CSV", $this->lng->txt(
"exp_type_imsm"));
303 $template->setVariable(
"CMD_EXPORT",
"exportEvaluation");
304 $template->setVariable(
"BTN_EXPORT", $this->lng->txt(
"export"));
305 $template->setVariable(
"BTN_PRINT", $this->lng->txt(
"print"));
306 $template->setVariable(
"BTN_COMMAND", $this->ctrl->getCmd());
307 $template->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this,
"exportEvaluation"));
308 $exportoutput = $template->get();
309 $this->tpl->setVariable(
"EVALUATION_EXPORT", $exportoutput);
313 if ($this->object->getShowSolutionAnswersOnly())
330 if ((!$ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) && (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)))
333 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
336 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_evaluation_details.html",
"Modules/Test");
338 $active_id =
$_GET[
"active_id"];
339 if (strlen($active_id) == 0)
341 ilUtil::sendInfo($this->lng->txt(
"detailed_evaluation_missing_active_id"), TRUE);
342 $this->ctrl->redirect($this,
"outEvaluation");
347 $data =& $this->
object->getCompleteEvaluationData();
348 $this->tpl->setVariable(
"TEXT_BACK", $this->lng->txt(
"back"));
349 $this->tpl->setVariable(
"URL_BACK", $this->ctrl->getLinkTarget($this,
"outEvaluation"));
350 $this->tpl->setVariable(
"HEADING_DETAILED_EVALUATION", sprintf($this->lng->txt(
"detailed_evaluation_for"),
351 $data->getParticipant($active_id)->getName())
353 $this->tpl->setVariable(
"STATISTICAL_DATA", $this->lng->txt(
"statistical_data"));
354 $this->tpl->setVariable(
"TXT_RESULTSPOINTS", $this->lng->txt(
"tst_stat_result_resultspoints"));
355 $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()) .
" %" .
")");
356 if (strlen(
$data->getParticipant($active_id)->getMark()))
358 $this->tpl->setVariable(
"TXT_RESULTSMARKS", $this->lng->txt(
"tst_stat_result_resultsmarks"));
359 $this->tpl->setVariable(
"VALUE_RESULTSMARKS",
$data->getParticipant($active_id)->getMark());
360 if (strlen(
$data->getParticipant($active_id)->getECTSMark()))
362 $this->tpl->setVariable(
"TXT_ECTS", $this->lng->txt(
"ects_grade"));
363 $this->tpl->setVariable(
"VALUE_ECTS",
$data->getParticipant($active_id)->getECTSMark());
366 $this->tpl->setVariable(
"TXT_QWORKEDTHROUGH", $this->lng->txt(
"tst_stat_result_qworkedthrough"));
367 $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()) .
" %" .
")");
369 $this->tpl->setVariable(
"TXT_TIMEOFWORK", $this->lng->txt(
"tst_stat_result_timeofwork"));
370 $time_seconds =
$data->getParticipant($active_id)->getTimeOfWork();
371 $atime_seconds =
$data->getParticipant($active_id)->getNumberOfQuestions() ? $time_seconds /
$data->getParticipant($active_id)->getNumberOfQuestions() : 0;
372 $time_hours = floor($time_seconds/3600);
373 $time_seconds -= $time_hours * 3600;
374 $time_minutes = floor($time_seconds/60);
375 $time_seconds -= $time_minutes * 60;
376 $this->tpl->setVariable(
"VALUE_TIMEOFWORK", sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds));
377 $this->tpl->setVariable(
"TXT_ATIMEOFWORK", $this->lng->txt(
"tst_stat_result_atimeofwork"));
378 $time_hours = floor($atime_seconds/3600);
379 $atime_seconds -= $time_hours * 3600;
380 $time_minutes = floor($atime_seconds/60);
381 $atime_seconds -= $time_minutes * 60;
382 $this->tpl->setVariable(
"VALUE_ATIMEOFWORK", sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $atime_seconds));
383 $this->tpl->setVariable(
"TXT_FIRSTVISIT", $this->lng->txt(
"tst_stat_result_firstvisit"));
384 #$this->tpl->setVariable("VALUE_FIRSTVISIT",
385 # date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], $data->getParticipant($active_id)->getFirstVisit())
389 $this->tpl->setVariable(
"TXT_LASTVISIT", $this->lng->txt(
"tst_stat_result_lastvisit"));
390 #$this->tpl->setVariable("VALUE_LASTVISIT",
391 # date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], $data->getParticipant($active_id)->getLastVisit())
396 $this->tpl->setVariable(
"TXT_NROFPASSES", $this->lng->txt(
"tst_nr_of_passes"));
397 $this->tpl->setVariable(
"VALUE_NROFPASSES",
$data->getParticipant($active_id)->getLastPass() + 1);
398 $this->tpl->setVariable(
"TXT_SCOREDPASS", $this->lng->txt(
"scored_pass"));
401 $this->tpl->setVariable(
"VALUE_SCOREDPASS",
$data->getParticipant($active_id)->getBestPass() + 1);
405 $this->tpl->setVariable(
"VALUE_SCOREDPASS",
$data->getParticipant($active_id)->getLastPass() + 1);
408 $median =
$data->getStatistics()->getStatistics()->median();
409 $pct =
$data->getParticipant($active_id)->getMaxpoints() ? ($median /
$data->getParticipant($active_id)->getMaxpoints()) * 100.0 : 0;
410 $mark = $this->
object->mark_schema->getMatchingMark($pct);
411 if (is_object($mark))
413 $this->tpl->setVariable(
"TXT_MARK_MEDIAN", $this->lng->txt(
"tst_stat_result_mark_median"));
414 $this->tpl->setVariable(
"VALUE_MARK_MEDIAN", $mark->getShortName());
417 $this->tpl->setVariable(
"TXT_RANK_PARTICIPANT", $this->lng->txt(
"tst_stat_result_rank_participant"));
418 $this->tpl->setVariable(
"VALUE_RANK_PARTICIPANT",
$data->getStatistics()->getStatistics()->rank(
$data->getParticipant($active_id)->getReached()));
419 $this->tpl->setVariable(
"TXT_RANK_MEDIAN", $this->lng->txt(
"tst_stat_result_rank_median"));
420 $this->tpl->setVariable(
"VALUE_RANK_MEDIAN",
$data->getStatistics()->getStatistics()->rank_median());
421 $this->tpl->setVariable(
"TXT_TOTAL_PARTICIPANTS", $this->lng->txt(
"tst_stat_result_total_participants"));
422 $this->tpl->setVariable(
"VALUE_TOTAL_PARTICIPANTS",
$data->getStatistics()->getStatistics()->count());
423 $this->tpl->setVariable(
"TXT_RESULT_MEDIAN", $this->lng->txt(
"tst_stat_result_median"));
424 $this->tpl->setVariable(
"VALUE_RESULT_MEDIAN", $median);
428 $finishdate = $this->
object->getPassFinishDate($active_id,
$pass);
431 $this->tpl->setCurrentBlock(
"question_header");
432 $this->tpl->setVariable(
"TXT_QUESTION_DATA", sprintf($this->lng->txt(
"tst_eval_question_points"),
$pass+1));
433 $this->tpl->parseCurrentBlock();
435 if (($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])))
437 $this->tpl->setCurrentBlock(
"question_footer");
438 $this->tpl->setVariable(
"TEXT_TO_DETAILED_RESULTS", $this->lng->txt(
"tst_show_answer_sheet"));
439 $this->ctrl->setParameter($this,
"statistics",
"1");
440 $this->ctrl->setParameter($this,
"active_id", $active_id);
441 $this->ctrl->setParameter($this,
"pass",
$pass);
442 $this->tpl->setVariable(
"URL_TO_DETAILED_RESULTS", $this->ctrl->getLinkTarget($this,
"outParticipantsPassDetails"));
443 $this->tpl->parseCurrentBlock();
445 $questions =
$data->getParticipant($active_id)->getQuestions(
$pass);
446 if (!is_array($questions))
448 $questions =
$data->getParticipant($active_id)->getQuestions(0);
451 foreach ($questions as $question)
453 $this->tpl->setCurrentBlock(
"question_row");
454 $this->tpl->setVariable(
"QUESTION_COUNTER", $counter);
455 $this->tpl->setVariable(
"QUESTION_TITLE",
$data->getQuestionTitle($question[
"id"]));
456 $this->tpl->setVariable(
"QUESTION_ID", $question[
"id"]);
457 $answeredquestion =
$data->getParticipant($active_id)->getPass(
$pass)->getAnsweredQuestionByQuestionId($question[
"id"]);
459 if (is_array($answeredquestion))
461 $percent = $answeredquestion[
"points"] ? $answeredquestion[
"reached"] / $answeredquestion[
"points"] * 100.0 : 0;
462 $this->tpl->setVariable(
"QUESTION_POINTS", $answeredquestion[
"reached"] .
" " . strtolower($this->lng->txt(
"of")) .
" " . $answeredquestion[
"points"] .
" (" . sprintf(
"%.2f", $percent) .
" %)");
466 $this->tpl->setVariable(
"QUESTION_POINTS",
"0 " . strtolower($this->lng->txt(
"of")) .
" " . $question[
"points"] .
" (" . sprintf(
"%.2f", 0) .
" %) - " . $this->lng->txt(
"question_not_answered"));
468 $this->tpl->parseCurrentBlock();
471 $this->tpl->touchBlock(
"question_stats");
495 if (method_exists($question_object,
"getFileUploadZIPFile"))
497 $question_object->getFileUploadZIPFile($this->object->getTestId());
501 $this->ctrl->redirect($this,
"singleResults");
516 if ((!$ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) && (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)))
520 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
523 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_eval_anonymous_aggregation.html",
"Modules/Test");
524 $eval =& $this->
object->getCompleteEvaluationData();
526 $foundParticipants =& $eval->getParticipants();
527 if (count($foundParticipants))
529 $template =
new ilTemplate(
"tpl.il_as_tst_evaluation_export.html", TRUE, TRUE,
"Modules/Test");
530 $template->setVariable(
"EXPORT_DATA", $this->lng->txt(
"exp_eval_data"));
531 $template->setVariable(
"TEXT_EXCEL", $this->lng->txt(
"exp_type_excel"));
532 $template->setVariable(
"TEXT_CSV", $this->lng->txt(
"exp_type_spss"));
533 $template->setVariable(
"CMD_EXPORT",
"exportAggregatedResults");
534 $template->setVariable(
"BTN_EXPORT", $this->lng->txt(
"export"));
535 $template->setVariable(
"BTN_PRINT", $this->lng->txt(
"print"));
536 $template->setVariable(
"BTN_COMMAND", $this->ctrl->getCmd());
537 $template->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this,
"exportAggregatedResults"));
538 $exportoutput = $template->get();
539 $this->tpl->setVariable(
"EVALUATION_EXPORT", $exportoutput);
541 array_push(
$data, array(
542 'result' => $this->lng->txt(
"tst_eval_total_persons"),
543 'value' => count($foundParticipants)
545 $total_finished = $this->
object->evalTotalFinished();
546 array_push(
$data, array(
547 'result' => $this->lng->txt(
"tst_eval_total_finished"),
548 'value' => $total_finished
550 $average_time = $this->
object->evalTotalStartedAverageTime();
551 $diff_seconds = $average_time;
552 $diff_hours = floor($diff_seconds/3600);
553 $diff_seconds -= $diff_hours * 3600;
554 $diff_minutes = floor($diff_seconds/60);
555 $diff_seconds -= $diff_minutes * 60;
556 array_push(
$data, array(
557 'result' => $this->lng->txt(
"tst_eval_total_finished_average_time"),
558 'value' => sprintf(
"%02d:%02d:%02d", $diff_hours, $diff_minutes, $diff_seconds)
561 $total_passed_reached = 0;
562 $total_passed_max = 0;
563 $total_passed_time = 0;
564 foreach ($foundParticipants as $userdata)
566 if ($userdata->getPassed())
569 $total_passed_reached += $userdata->getReached();
570 $total_passed_max += $userdata->getMaxpoints();
571 $total_passed_time += $userdata->getTimeOfWork();
574 $average_passed_reached = $total_passed ? $total_passed_reached / $total_passed : 0;
575 $average_passed_max = $total_passed ? $total_passed_max / $total_passed : 0;
576 $average_passed_time = $total_passed ? $total_passed_time / $total_passed : 0;
577 array_push(
$data, array(
578 'result' => $this->lng->txt(
"tst_eval_total_passed"),
579 'value' => $total_passed
581 array_push(
$data, array(
582 'result' => $this->lng->txt(
"tst_eval_total_passed_average_points"),
583 'value' => sprintf(
"%2.2f", $average_passed_reached) .
" " . strtolower($this->lng->txt(
"of")) .
" " . sprintf(
"%2.2f", $average_passed_max)
585 $average_time = $average_passed_time;
586 $diff_seconds = $average_time;
587 $diff_hours = floor($diff_seconds/3600);
588 $diff_seconds -= $diff_hours * 3600;
589 $diff_minutes = floor($diff_seconds/60);
590 $diff_seconds -= $diff_minutes * 60;
591 array_push(
$data, array(
592 'result' => $this->lng->txt(
"tst_eval_total_passed_average_time"),
593 'value' => sprintf(
"%02d:%02d:%02d", $diff_hours, $diff_minutes, $diff_seconds)
597 include_once
"./Modules/Test/classes/tables/class.ilTestAggregatedResultsTableGUI.php";
599 $table_gui->setData(
$data);
600 $this->tpl->setVariable(
'AGGREGATED_RESULTS', $table_gui->getHTML());
603 foreach ($eval->getQuestionTitles() as $question_id => $question_title)
608 foreach ($foundParticipants as $userdata)
610 for ($i = 0; $i <= $userdata->getLastPass(); $i++)
612 if (is_object($userdata->getPass($i)))
614 $question =& $userdata->getPass($i)->getAnsweredQuestionByQuestionId($question_id);
615 if (is_array($question))
618 $reached += $question[
"reached"];
619 $max += $question[
"points"];
624 $percent = $max ? $reached/$max * 100.0 : 0;
626 $this->ctrl->setParameter($this,
"qid", $question_id);
629 'title' => $question_title,
630 'id' => $question_id,
631 'points' => sprintf(
"%.2f", $answered ? $reached / $answered : 0) .
" " . strtolower($this->lng->txt(
"of")) .
" " . sprintf(
"%.2f", $answered ? $max / $answered : 0),
632 'percentage' => (float)$percent,
633 'answers' => $answered
637 include_once
"./Modules/Test/classes/tables/class.ilTestAverageReachedPointsTableGUI.php";
639 $table_gui->setData($rows);
640 $this->tpl->setVariable(
'TBL_AVG_REACHED', $table_gui->getHTML());
645 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
647 $form->setFormAction($this->ctrl->getFormAction($this,
'partialEvaluation'));
648 $form->setTitle($this->lng->txt(
'partial_export'));
649 $form->setDescription($this->lng->txt(
'partial_export_desc'));
650 $form->setMultipart(FALSE);
651 $form->setTableWidth(
"100%");
652 $form->setId(
"partialEvaluation");
654 $start =
new ilNumberInputGUI($this->lng->txt(
'dataset_start'),
'dataset_start');
657 $start->setInfo($this->lng->txt(
'dataset_start_desc'));
658 $start->setRequired(
true);
659 $form->addItem($start);
664 $end->setInfo($this->lng->txt(
'dataset_end_desc'));
665 $end->setRequired(
true);
666 $form->addItem($end);
668 $form->addCommandButton(
"saveRandomQuestions", $this->lng->txt(
"start"));
670 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
686 if (array_key_exists(
"g_filterby",
$_GET))
688 $filterby =
$_GET[
"g_filterby"];
691 if (array_key_exists(
"g_userfilter",
$_GET))
693 $filtertext =
$_GET[
"g_userfilter"];
696 if (array_key_exists(
"g_passedonly",
$_GET))
698 if (
$_GET[
"g_passedonly"] == 1)
703 switch (
$_POST[
"export_type"])
706 include_once
"./Modules/Test/classes/class.ilTestExport.php";
707 $exportObj =
new ilTestExport($this->
object,
"results");
708 $exportObj->exportToExcel($deliver = TRUE, $filterby, $filtertext, $passedonly);
712 include_once
"./Modules/Test/classes/class.ilTestExport.php";
713 $exportObj =
new ilTestExport($this->
object,
"results");
714 $exportObj->singleChoiceExport();
717 include_once
"./Modules/Test/classes/class.ilTestExport.php";
718 $exportObj =
new ilTestExport($this->
object,
"results");
719 $exportObj->exportToCSV($deliver = TRUE, $filterby, $filtertext, $passedonly);
722 include_once
"./Modules/Test/classes/class.ilTestExport.php";
723 $exportObj =
new ilTestExport($this->
object,
"results");
724 $exportObj->exportToImsCSV($deliver = TRUE, $filterby, $filtertext, $passedonly);
729 $this->ctrl->setParameterByClass(
"iltestcertificategui",
"g_passedonly",
"1");
731 if (strlen($filtertext))
733 $this->ctrl->setParameterByClass(
"iltestcertificategui",
"g_userfilter", $filtertext);
735 $this->ctrl->redirect($this,
"exportCertificate");
747 switch (
$_POST[
"export_type"])
750 include_once
"./Modules/Test/classes/class.ilTestExport.php";
751 $exportObj =
new ilTestExport($this->
object,
"aggregated");
752 $exportObj->exportToExcel($deliver = TRUE);
755 include_once
"./Modules/Test/classes/class.ilTestExport.php";
756 $exportObj =
new ilTestExport($this->
object,
"aggregated");
757 $exportObj->exportToCSV($deliver = TRUE);
772 include_once
"./Services/Utilities/classes/class.ilUtil.php";
773 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
774 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
776 $archive_dir = $certificate->createArchiveDirectory();
777 $total_users = array();
778 $total_users =& $this->
object->evalTotalPersonsArray();
779 if (count($total_users))
781 foreach ($total_users as $active_id =>
$name)
783 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
784 $pdf = $certificate->outCertificate(
786 "active_id" => $active_id,
787 "userfilter" => $userfilter,
788 "passedonly" => $passedonly
794 $certificate->addPDFtoArchiveDirectory($pdf, $archive_dir, $user_id .
"_" . str_replace(
" ",
"_",
ilUtil::getASCIIFilename(
$name)) .
".pdf");
797 $zipArchive = $certificate->zipCertificatesInArchiveDirectory($archive_dir, TRUE);
810 if ($original_id > 0)
824 $additionalFields = array();
825 foreach (
$results as $key => $value)
827 if (preg_match(
"/cb_(\w+)/", $key, $matches) && ($value == 1))
829 array_push($additionalFields, $matches[1]);
832 $this->
object->setEvaluationAdditionalFields($additionalFields);
834 $this->ctrl->redirect($this,
"evalSettings");
841 if ((!$ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) && (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)))
845 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
848 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
850 $form->setFormAction($this->ctrl->getFormAction($this,
"saveEvalSettings"));
851 $form->setTitle($this->lng->txt(
"assessment_eval_settings"));
853 include_once(
"./Services/Form/classes/class.ilFormSectionHeaderGUI.php");
855 $header->setTitle($this->lng->txt(
"assessment_eval_additional_fields_settings"));
856 $form->addItem($header);
859 $fields = array(
"gender",
"email",
"institution",
"street",
"city",
"zipcode",
"country",
"department",
"matriculation");
860 $additionalFields = $this->
object->getEvaluationAdditionalFields();
862 foreach ($fields as $dbfield)
865 if ($this->object->getAnonymity())
871 if (in_array($dbfield, $additionalFields)) $checkbox->setChecked(TRUE);
873 $form->addItem($checkbox);
875 $form->addCommandButton(
"saveEvalSettings", $this->lng->txt(
"save"));
877 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
891 $this->ctrl->saveParameter($this,
"pass");
892 $this->ctrl->saveParameter($this,
"active_id");
893 $active_id =
$_GET[
"active_id"];
895 $result_array =& $this->
object->getTestResult($active_id,
$pass);
898 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
902 $template =
new ilTemplate(
"tpl.il_as_tst_pass_details_overview_participants.html", TRUE, TRUE,
"Modules/Test");
904 include_once
'./Services/PDF/classes/class.ilHTMLToPDFTransformer.php';
907 $this->ctrl->setParameter($this,
"pdf",
"1");
908 $template->setCurrentBlock(
"pdf_export");
909 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"outParticipantsPassDetails"));
910 $this->ctrl->setParameter($this,
"pdf",
"");
911 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
912 $template->setVariable(
"PDF_IMG_ALT", $this->lng->txt(
"pdf_export"));
914 $template->parseCurrentBlock();
917 if (array_key_exists(
"statistics",
$_GET) && (
$_GET[
"statistics"] == 1))
919 $template->setVariable(
"BACK_TEXT", $this->lng->txt(
"back"));
920 $this->ctrl->setParameterByClass(
"ilTestEvaluationGUI",
"active_id", $active_id);
921 $template->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilTestEvaluationGUI",
"detailedEvaluation"));
925 if ($this->object->getNrOfTries() == 1)
927 $template->setVariable(
"BACK_TEXT", $this->lng->txt(
"back"));
928 $template->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilobjtestgui",
"participants"));
932 $template->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(get_class($this),
"outParticipantsResultsOverview"));
933 $template->setVariable(
"BACK_TEXT", $this->lng->txt(
"tst_results_back_overview"));
936 $template->setVariable(
"PRINT_TEXT", $this->lng->txt(
"print"));
937 $template->setVariable(
"PRINT_URL",
"javascript:window.print();");
939 if ($this->object->getNrOfTries() == 1)
942 $template->setVariable(
"USER_MARK", $statement[
"mark"]);
943 if (strlen($statement[
"markects"]))
945 $template->setVariable(
"USER_MARK_ECTS", $statement[
"markects"]);
950 $template->setVariable(
"LIST_OF_ANSWERS", $list_of_answers);
951 $template->setVariable(
"TEXT_RESULTS", $this->lng->txt(
"tst_results"));
952 $template->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
953 $template->setVariable(
"PASS_DETAILS", $overview);
954 $template->setVariable(
"USER_DETAILS", $user_data);
955 $uname = $this->
object->userLookupFullName($user_id);
956 $template->setVariable(
"USER_NAME", sprintf($this->lng->txt(
"tst_result_user_name_pass"),
$pass + 1, $uname));
959 if ($this->object->getShowSolutionAnswersOnly())
964 if (array_key_exists(
"pdf",
$_GET) && (
$_GET[
"pdf"] == 1))
966 $this->
object->deliverPDFFromHTML($template->get());
970 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
985 $template =
new ilTemplate(
"tpl.il_as_tst_pass_overview_participants.html", TRUE, TRUE,
"Modules/Test");
987 $active_id =
$_GET[
"active_id"];
988 if ($this->object->getNrOfTries() == 1)
990 $this->ctrl->setParameter($this,
"active_id", $active_id);
992 $this->ctrl->redirect($this,
"outParticipantsPassDetails");
995 include_once
'./Services/PDF/classes/class.ilHTMLToPDFTransformer.php';
998 $this->ctrl->setParameter($this,
"pdf",
"1");
999 $template->setCurrentBlock(
"pdf_export");
1000 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"outParticipantsResultsOverview"));
1001 $this->ctrl->setParameter($this,
"pdf",
"");
1002 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
1003 $template->setVariable(
"PDF_IMG_ALT", $this->lng->txt(
"pdf_export"));
1005 $template->parseCurrentBlock();
1008 $overview = $this->
getPassOverview($active_id,
"iltestevaluationgui",
"outParticipantsPassDetails");
1009 $template->setVariable(
"PASS_OVERVIEW", $overview);
1010 $template->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1011 $template->setVariable(
"BACK_TEXT", $this->lng->txt(
"back"));
1012 $template->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilobjtestgui",
"participants"));
1013 $template->setVariable(
"PRINT_TEXT", $this->lng->txt(
"print"));
1014 $template->setVariable(
"PRINT_URL",
"javascript:window.print();");
1017 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
1019 $template->setVariable(
"USER_DATA", $user_data);
1020 $template->setVariable(
"TEXT_OVERVIEW", $this->lng->txt(
"tst_results_overview"));
1021 $template->setVariable(
"USER_MARK", $statement[
"mark"]);
1022 if (strlen($statement[
"markects"]))
1024 $template->setVariable(
"USER_MARK_ECTS", $statement[
"markects"]);
1026 $template->setVariable(
"TEXT_RESULTS", $this->lng->txt(
"tst_results"));
1027 $template->parseCurrentBlock();
1030 if ($this->object->getShowSolutionAnswersOnly())
1035 if (array_key_exists(
"pdf",
$_GET) && (
$_GET[
"pdf"] == 1))
1037 $this->
object->deliverPDFFromHTML($template->get(), $this->
object->getTitle());
1041 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
1054 $this->ctrl->saveParameter($this,
"pass");
1055 $this->ctrl->saveParameter($this,
"active_id");
1056 $active_id =
$_GET[
"active_id"];
1058 $result_array =& $this->
object->getTestResult($active_id,
$pass);
1060 $command_solution_details =
"";
1061 if ($this->object->getShowSolutionDetails())
1063 $command_solution_details =
"outCorrectSolution";
1065 $overview = $this->
getPassDetailsOverview($result_array, $active_id,
$pass,
"iltestevaluationgui",
"outUserPassDetails", $command_solution_details);
1067 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
1069 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_pass_details_overview_participants.html",
"Modules/Test");
1071 if ($this->object->getNrOfTries() == 1)
1073 $this->tpl->setVariable(
"BACK_TEXT", $this->lng->txt(
"tst_results_back_introduction"));
1074 $this->tpl->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilobjtestgui",
"infoScreen"));
1078 $this->tpl->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(get_class($this),
"outUserResultsOverview"));
1079 $this->tpl->setVariable(
"BACK_TEXT", $this->lng->txt(
"tst_results_back_overview"));
1082 $this->tpl->parseCurrentBlock();
1084 if ($this->object->getNrOfTries() == 1)
1087 $this->tpl->setVariable(
"USER_MARK", $statement[
"mark"]);
1088 if (strlen($statement[
"markects"]))
1090 $this->tpl->setVariable(
"USER_MARK_ECTS", $statement[
"markects"]);
1096 $this->tpl->setCurrentBlock(
"adm_content");
1097 $this->tpl->setVariable(
"LIST_OF_ANSWERS", $list_of_answers);
1098 $this->tpl->setVariable(
"TEXT_RESULTS", $this->lng->txt(
"tst_results"));
1099 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1100 $this->tpl->setVariable(
"PASS_DETAILS", $overview);
1101 $uname = $this->
object->userLookupFullName($user_id, TRUE);
1102 $this->tpl->setVariable(
"USER_NAME", sprintf($this->lng->txt(
"tst_result_user_name_pass"),
$pass + 1, $uname));
1103 $this->tpl->parseCurrentBlock();
1106 if ($this->object->getShowSolutionAnswersOnly())
1123 if (!$this->object->canShowTestResults($ilUser->getId())) $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
1124 include_once(
"./classes/class.ilTemplate.php");
1125 $templatehead =
new ilTemplate(
"tpl.il_as_tst_results_participants.html", TRUE, TRUE,
"Modules/Test");
1126 $template =
new ilTemplate(
"tpl.il_as_tst_results_participant.html", TRUE, TRUE,
"Modules/Test");
1129 $user_id = $ilUser->getId();
1130 $uname = $this->
object->userLookupFullName($user_id, TRUE);
1131 $active_id = $this->
object->getTestSession()->getActiveId();
1132 $hide_details = !$this->
object->getShowPassDetails();
1135 $executable = $this->
object->isExecutable($ilUser->getId());
1136 if (!$executable[
"executable"]) $hide_details = FALSE;
1138 $begin = microtime(
true);
1139 if (($this->object->getNrOfTries() == 1) && (!$hide_details))
1145 $template->setCurrentBlock(
"pass_overview");
1146 $overview = $this->
getPassOverview($active_id,
"iltestevaluationgui",
"outUserResultsOverview", FALSE, $hide_details);
1147 $template->setVariable(
"PASS_OVERVIEW", $overview);
1148 $template->setVariable(
"TEXT_RESULTS", $this->lng->txt(
"tst_results_overview"));
1149 $template->parseCurrentBlock();
1152 if (((array_key_exists(
"pass",
$_GET)) && (strlen(
$_GET[
"pass"]) > 0)) || (!is_null(
$pass)))
1157 include_once
'./Services/PDF/classes/class.ilHTMLToPDFTransformer.php';
1160 $this->ctrl->setParameter($this,
"pass",
$pass);
1161 $this->ctrl->setParameter($this,
"pdf",
"1");
1162 $templatehead->setCurrentBlock(
"pdf_export");
1163 $templatehead->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"outUserResultsOverview"));
1164 $this->ctrl->setParameter($this,
"pass",
"");
1165 $this->ctrl->setParameter($this,
"pdf",
"");
1166 $templatehead->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
1167 $templatehead->setVariable(
"PDF_IMG_ALT", $this->lng->txt(
"pdf_export"));
1169 $templatehead->parseCurrentBlock();
1170 if ($this->object->canShowCertificate($user_id, $active_id))
1172 $templatehead->setVariable(
"CERTIFICATE_URL", $this->ctrl->getLinkTarget($this,
"outCertificate"));
1173 $templatehead->setVariable(
"CERTIFICATE_TEXT", $this->lng->txt(
"certificate"));
1176 $templatehead->setVariable(
"BACK_TEXT", $this->lng->txt(
"tst_results_back_introduction"));
1177 $templatehead->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilobjtestgui",
"infoScreen"));
1178 $templatehead->setVariable(
"PRINT_TEXT", $this->lng->txt(
"print"));
1179 $templatehead->setVariable(
"PRINT_URL",
"javascript:window.print();");
1185 $this->ctrl->saveParameter($this,
"pass");
1186 $this->ctrl->saveParameter($this,
"active_id");
1187 if (!is_null(
$pass))
1189 $result_array =& $this->
object->getTestResult($active_id,
$pass);
1190 $command_solution_details =
"";
1191 if ($this->object->getShowSolutionDetails())
1193 $command_solution_details =
"outCorrectSolution";
1195 $detailsoverview = (!$hide_details) ? $this->
getPassDetailsOverview($result_array, $active_id,
$pass,
"iltestevaluationgui",
"outUserResultsOverview", $command_solution_details) :
'';
1197 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
1199 if (!$hide_details && $this->object->getShowSolutionPrintview())
1201 $list_of_answers = $this->
getPassListOfAnswers($result_array, $active_id,
$pass, $show_solutions = FALSE, $only_answered_questions = FALSE, $show_question_only = FALSE, $show_reached_points = FALSE, $compare_solutions = $this->object->getShowSolutionListComparison());
1203 else if ($this->object->getShowSolutionDetails())
1209 $template->setVariable(
"LIST_OF_ANSWERS", $list_of_answers);
1210 $template->setVariable(
"PASS_RESULTS_OVERVIEW", sprintf($this->lng->txt(
"tst_results_overview_pass"),
$pass + 1));
1211 $template->setVariable(
"PASS_DETAILS", $detailsoverview);
1214 $template->setVariable(
"SIGNATURE", $signature);
1216 $template->setVariable(
"TEXT_HEADING", sprintf($this->lng->txt(
"tst_result_user_name"), $uname));
1217 $template->setVariable(
"USER_DATA", $user_data);
1218 $template->setVariable(
"USER_MARK", $statement[
"mark"]);
1219 if (strlen($statement[
"markects"]))
1221 $template->setVariable(
"USER_MARK_ECTS", $statement[
"markects"]);
1223 $template->parseCurrentBlock();
1226 if ($this->object->getShowSolutionAnswersOnly())
1230 $templatehead->setVariable(
"RESULTS_PARTICIPANT", $template->get());
1232 if (array_key_exists(
"pdf",
$_GET) && (
$_GET[
"pdf"] == 1))
1234 $this->
object->deliverPDFFromHTML($template->get(), sprintf($this->lng->txt(
"tst_result_user_name"), $uname));
1238 $this->tpl->setVariable(
"PRINT_CONTENT", $templatehead->get());
1253 if (!$this->object->getShowSolutionPrintview())
1256 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
1259 $template =
new ilTemplate(
"tpl.il_as_tst_info_list_of_answers.html", TRUE, TRUE,
"Modules/Test");
1262 if (array_key_exists(
"pass",
$_GET))
1266 $user_id = $ilUser->getId();
1267 $active_id = $this->
object->getTestSession()->getActiveId();
1269 if ($this->object->getNrOfTries() == 1)
1275 $overview = $this->
getPassOverview($active_id,
"iltestevaluationgui",
"outUserListOfAnswerPasses", TRUE);
1276 $template->setVariable(
"TEXT_RESULTS", $this->lng->txt(
"tst_passes"));
1277 $template->setVariable(
"PASS_OVERVIEW", $overview);
1284 $result_array =& $this->
object->getTestResult($active_id,
$pass);
1285 $user_id =& $this->
object->_getUserIdFromActiveId($active_id);
1286 $showAllAnswers = TRUE;
1287 if ($this->object->isExecutable($user_id))
1289 $showAllAnswers = FALSE;
1291 $answers = $this->
getPassListOfAnswers($result_array, $active_id,
$pass, FALSE, $showAllAnswers, $show_question_only = FALSE, $show_reached_points = FALSE, $compare_solutions = $this->object->getShowSolutionListComparison());
1292 $template->setVariable(
"PASS_DETAILS", $answers);
1294 $template->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1295 $template->setVariable(
"BACK_TEXT", $this->lng->txt(
"tst_results_back_introduction"));
1296 $template->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilobjtestgui",
"infoScreen"));
1297 $template->setVariable(
"PRINT_TEXT", $this->lng->txt(
"print"));
1298 $template->setVariable(
"PRINT_URL",
"javascript:window.print();");
1301 $template->setVariable(
"USER_DATA", $user_data);
1302 $template->setVariable(
"TEXT_LIST_OF_ANSWERS", $this->lng->txt(
"tst_list_of_answers"));
1303 if (strlen($signature))
1305 $template->setVariable(
"SIGNATURE", $signature);
1307 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
1310 if ($this->object->getShowSolutionAnswersOnly())
1325 if (array_key_exists(
"pass",
$_GET) && (strlen(
$_GET[
"pass"]) > 0))
1327 $this->ctrl->saveParameter($this,
"pass");
1328 $this->ctrl->saveParameter($this,
"active_id");
1329 $this->outTestResults(
false,
$_GET[
"pass"]);
1333 $this->outTestResults(
false);
1344 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_correct_solution.html",
"Modules/Test");
1346 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1347 $this->tpl->setCurrentBlock(
"ContentStyle");
1349 $this->tpl->parseCurrentBlock();
1351 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1353 $this->tpl->parseCurrentBlock();
1356 if ($this->object->getShowSolutionAnswersOnly())
1361 $this->tpl->setCurrentBlock(
"adm_content");
1363 $this->tpl->setVariable(
"OUTPUT_SOLUTION", $solution);
1364 $this->tpl->setVariable(
"TEXT_BACK", $this->lng->txt(
"back"));
1365 $this->ctrl->saveParameter($this,
"pass");
1366 $this->ctrl->saveParameter($this,
"active_id");
1367 $this->tpl->setVariable(
"URL_BACK", $this->ctrl->getLinkTarget($this,
"outUserResultsOverview"));
1368 $this->tpl->parseCurrentBlock();
1380 if ((!$ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) && (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)))
1384 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
1387 $data =& $this->
object->getCompleteEvaluationData();
1388 $color_class = array(
"tblrow1",
"tblrow2");
1390 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_eval_single_answers.html",
"Modules/Test");
1391 $foundParticipants =&
$data->getParticipants();
1392 if (count($foundParticipants) == 0)
1399 include_once
"./Modules/Test/classes/class.ilTestEvaluationData.php";
1402 foreach (
$data->getQuestionTitles() as $question_id => $question_title)
1407 foreach ($foundParticipants as $userdata)
1409 $pass = $userdata->getScoredPass();
1410 if (is_object($userdata->getPass(
$pass)))
1412 $question =& $userdata->getPass(
$pass)->getAnsweredQuestionByQuestionId($question_id);
1413 if (is_array($question))
1420 $this->ctrl->setParameter($this,
"qid", $question_id);
1423 if (method_exists($question_object,
"hasFileUploads"))
1425 if ($question_object->hasFileUploads($this->object->getTestId()))
1427 $download =
"<a href=\"" . $this->ctrl->getLinkTarget($this,
"exportFileUploadsForAllParticipants").
"\">" . $this->lng->txt(
"download") .
"</a>";
1430 $timeByQuestion = 0;
1432 if (is_array($times[$question_id]))
1434 foreach ($times[$question_id] as
$pass => $passdata)
1436 foreach ($passdata as $active_id => $timesInSeconds)
1438 foreach ($timesInSeconds as $timeInSeconds)
1441 $timeByQuestion += $timeInSeconds;
1446 $meanTimeByQuestion = ($numberOfTries > 0) ? ($timeByQuestion*1.0)/($numberOfTries*1.0) : 0;
1449 "id" => $question_id,
1450 "title" => $question_title,
1452 "output" =>
"<a href=\"" . $this->ctrl->getLinkTarget($this,
"exportQuestionForAllParticipants").
"\">" . $this->lng->txt(
"pdf_export") .
"</a>",
1453 "download" => $download,
1454 "time" => $timeByQuestion,
1455 "meantime" => $meanTimeByQuestion
1461 include_once(
"./Modules/Test/classes/tables/class.ilResultsByQuestionTableGUI.php");
1462 include_once
'./Services/PDF/classes/class.ilHTMLToPDFTransformer.php';
1464 $table_gui->setTitle($this->lng->txt(
"tst_answered_questions_test"));
1465 $table_gui->setData($rows);
1467 $this->tpl->setVariable(
"TBL_SINGLE_ANSWERS", $table_gui->getHTML());
1471 $this->tpl->setVariable(
"TBL_SINGLE_ANSWERS", $this->lng->txt(
"adm_no_special_users"));
1483 $active_id = $this->
object->getTestSession()->getActiveId();
1485 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
1486 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
1488 $certificate->outCertificate(array(
"active_id" => $active_id,
"pass" => $counted_pass));