ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4require_once './Modules/Test/classes/class.ilTestServiceGUI.php';
5require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
6require_once 'Modules/Test/classes/class.ilTestPassFinishTasks.php';
7
8
29{
33 protected $testAccess;
34
39
48 public function __construct(ilObjTest $a_object)
49 {
50 parent::__construct($a_object);
51
52 global $DIC; /* @var ILIAS\DI\Container $DIC */
53
54 require_once 'Modules/Test/classes/class.ilTestProcessLockerFactory.php';
55 $this->processLockerFactory = new ilTestProcessLockerFactory(
56 new ilSetting('assessment'),
57 $DIC->database()
58 );
59 }
60
64 public function getTestAccess()
65 {
66 return $this->testAccess;
67 }
68
72 public function setTestAccess($testAccess)
73 {
74 $this->testAccess = $testAccess;
75 }
76
80 public function executeCommand()
81 {
82 $cmd = $this->ctrl->getCmd();
83 $next_class = $this->ctrl->getNextClass($this);
84 $this->ctrl->saveParameter($this, "sequence");
85 $this->ctrl->saveParameter($this, "active_id");
86 $cmd = $this->getCommand($cmd);
87 switch ($next_class) {
88 case 'iltestpassdetailsoverviewtablegui':
89 require_once 'Modules/Test/classes/tables/class.ilTestPassDetailsOverviewTableGUI.php';
90 $tableGUI = new ilTestPassDetailsOverviewTableGUI($this->ctrl, $this, 'outUserPassDetails');
91 $tableGUI->setIsPdfGenerationRequest($this->isPdfDeliveryRequest());
92 $tableGUI->initFilter();
93 $this->ctrl->forwardCommand($tableGUI);
94 break;
95
96 default:
97 $ret = &$this->$cmd();
98 break;
99 }
100 return $ret;
101 }
102
103 public function &getHeaderNames()
104 {
105 $headernames = array();
106 if ($this->object->getAnonymity()) {
107 array_push($headernames, $this->lng->txt("counter"));
108 } else {
109 array_push($headernames, $this->lng->txt("name"));
110 array_push($headernames, $this->lng->txt("login"));
111 }
112 $additionalFields = $this->object->getEvaluationAdditionalFields();
113 if (count($additionalFields)) {
114 foreach ($additionalFields as $fieldname) {
115 array_push($headernames, $this->lng->txt($fieldname));
116 }
117 }
118 array_push($headernames, $this->lng->txt("tst_reached_points"));
119 array_push($headernames, $this->lng->txt("tst_mark"));
120 if ($this->object->getECTSOutput()) {
121 array_push($headernames, $this->lng->txt("ects_grade"));
122 }
123 array_push($headernames, $this->lng->txt("tst_answered_questions"));
124 array_push($headernames, $this->lng->txt("working_time"));
125 array_push($headernames, $this->lng->txt("detailed_evaluation"));
126 return $headernames;
127 }
128
129 public function &getHeaderVars()
130 {
131 $headervars = array();
132 if ($this->object->getAnonymity()) {
133 array_push($headervars, "counter");
134 } else {
135 array_push($headervars, "name");
136 array_push($headervars, "login");
137 }
138 array_push($headervars, "resultspoints");
139 array_push($headervars, "resultsmarks");
140 if ($this->object->getECTSOutput()) {
141 array_push($headervars, "ects_grade");
142 }
143 array_push($headervars, "qworkedthrough");
144 array_push($headervars, "timeofwork");
145 array_push($headervars, "");
146 return $headervars;
147 }
148
152 public function filterEvaluation()
153 {
154 if (!$this->getTestAccess()->checkStatisticsAccess()) {
156 }
157
158 include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
159 $table_gui = new ilEvaluationAllTableGUI($this, 'outEvaluation');
160 $table_gui->writeFilterToSession();
161 $this->ctrl->redirect($this, "outEvaluation");
162 }
163
167 public function resetfilterEvaluation()
168 {
169 if (!$this->getTestAccess()->checkStatisticsAccess()) {
171 }
172
173 include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
174 $table_gui = new ilEvaluationAllTableGUI($this, 'outEvaluation');
175 $table_gui->resetFilter();
176 $this->ctrl->redirect($this, "outEvaluation");
177 }
178
184 public function outEvaluation()
185 {
186 global $DIC; /* @var ILIAS\DI\Container $DIC */
187 $ilToolbar = $DIC->toolbar();
188
189 if (!$this->getTestAccess()->checkStatisticsAccess()) {
191 }
192
193 $DIC->tabs()->activateTab(ilTestTabsManager::TAB_ID_STATISTICS);
194
195 include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
196
197 $table_gui = new ilEvaluationAllTableGUI(
198 $this,
199 'outEvaluation',
200 $this->object->getAnonymity(),
201 $this->object->isOfferingQuestionHintsEnabled()
202 );
203
204 $data = array();
205 $arrFilter = array();
206
207 foreach ($table_gui->getFilterItems() as $item) {
208 if ($item->getValue() !== false) {
209 switch ($item->getPostVar()) {
210 case 'group':
211 case 'name':
212 case 'course':
213 $arrFilter[$item->getPostVar()] = $item->getValue();
214 break;
215 case 'passed_only':
216 $passedonly = $item->getChecked();
217 break;
218 }
219 }
220 }
221 include_once "./Modules/Test/classes/class.ilTestEvaluationData.php";
222 $eval = new ilTestEvaluationData($this->object);
223 $eval->setFilterArray($arrFilter);
224 $foundParticipants = $eval->getParticipants();
225
226 require_once 'Modules/Test/classes/class.ilTestParticipantData.php';
227 require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
228
229 $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
230 $participantData->setActiveIdsFilter($eval->getParticipantIds());
231
232 $participantData->setParticipantAccessFilter(
234 );
235
236 $participantData->load($this->object->getTestId());
237
238 $counter = 1;
239 if (count($participantData->getActiveIds()) > 0) {
240 if ($this->object->getECTSOutput()) {
241 $passed_array = &$this->object->getTotalPointsPassedArray();
242 }
243 foreach ($participantData->getActiveIds() as $active_id) {
244 if (!isset($foundParticipants[$active_id]) || !($foundParticipants[$active_id] instanceof ilTestEvaluationUserData)) {
245 continue;
246 }
247
248 /* @var $userdata ilTestEvaluationUserData */
249 $userdata = $foundParticipants[$active_id];
250
251 $remove = false;
252 if ($passedonly) {
253 $mark_obj = $this->object->getMarkSchema()->getMatchingMark($userdata->getReachedPointsInPercent());
254
255 if ($mark_obj->getPassed() == false || !$userdata->areObligationsAnswered()) {
256 $remove = true;
257 }
258 }
259 if (!$remove) {
260 // build the evaluation row
261 $evaluationrow = array();
262 if ($this->object->getAnonymity()) {
263 $evaluationrow['name'] = $counter;
264 $evaluationrow['login'] = '';
265 } else {
266 $evaluationrow['name'] = $userdata->getName();
267 if (strlen($userdata->getLogin())) {
268 $evaluationrow['login'] = "[" . $userdata->getLogin() . "]";
269 } else {
270 $evaluationrow['login'] = '';
271 }
272 }
273
274 $evaluationrow['reached'] = $userdata->getReached();
275 $evaluationrow['max'] = $userdata->getMaxpoints();
276 $evaluationrow['hint_count'] = $userdata->getRequestedHintsCountFromScoredPass();
277 $evaluationrow['exam_id'] = $userdata->getExamIdFromScoredPass();
278 $percentage = $userdata->getReachedPointsInPercent();
279 $mark = $this->object->getMarkSchema()->getMatchingMark($percentage);
280 if (is_object($mark)) {
281 $evaluationrow['mark'] = $mark->getShortName();
282 }
283 if ($this->object->getECTSOutput()) {
284 $ects_mark = $this->object->getECTSGrade($passed_array, $userdata->getReached(), $userdata->getMaxPoints());
285 $evaluationrow['ects_grade'] = $ects_mark;
286 }
287 $evaluationrow['answered'] = $userdata->getQuestionsWorkedThroughInPercent();
288 $evaluationrow['questions_worked_through'] = $userdata->getQuestionsWorkedThrough();
289 $evaluationrow['number_of_questions'] = $userdata->getNumberOfQuestions();
290 $time_seconds = $userdata->getTimeOfWork();
291 $time_hours = floor($time_seconds / 3600);
292 $time_seconds -= $time_hours * 3600;
293 $time_minutes = floor($time_seconds / 60);
294 $time_seconds -= $time_minutes * 60;
295 $evaluationrow['working_time'] = sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds);
296 $this->ctrl->setParameter($this, "active_id", $active_id);
297 $href = $this->ctrl->getLinkTarget($this, "detailedEvaluation");
298 $detailed_evaluation = $this->lng->txt("detailed_evaluation_show");
299 $evaluationrow['details'] = "<a class=\"il_ContainerItemCommand\" href=\"$href\">$detailed_evaluation</a>";
300 $userfields = ilObjUser::_lookupFields($userdata->getUserID());
301 $evaluationrow['gender'] = $userfields['gender'];
302 $evaluationrow['email'] = $userfields['email'];
303 $evaluationrow['institution'] = $userfields['institution'];
304 $evaluationrow['street'] = $userfields['street'];
305 $evaluationrow['city'] = $userfields['city'];
306 $evaluationrow['zipcode'] = $userfields['zipcode'];
307 $evaluationrow['country'] = $userfields['country'];
308 $evaluationrow['sel_country'] = $userfields['sel_country'];
309 $evaluationrow['department'] = $userfields['department'];
310 $evaluationrow['matriculation'] = $userfields['matriculation'];
311 $counter++;
312 $data[] = $evaluationrow;
313 }
314 }
315 }
316
317 $table_gui->setData($data);
318 if (count($participantData->getActiveIds()) > 0) {
319 $ilToolbar->setFormName('form_output_eval');
320 $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'exportEvaluation'));
321 require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
322 $export_type = new ilSelectInputGUI($this->lng->txt('exp_eval_data'), 'export_type');
323 $options = array(
324 'excel' => $this->lng->txt('exp_type_excel'),
325 'csv' => $this->lng->txt('exp_type_spss')
326 );
327
328 if (!$this->object->getAnonymity()) {
329 try {
330 $globalCertificatePrerequisites = new ilCertificateActiveValidator();
331 if ($globalCertificatePrerequisites->validate()) {
332 $options['certificate'] = $this->lng->txt('exp_type_certificate');
333 }
334 } catch (ilException $e) {
335 }
336 }
337
338 $export_type->setOptions($options);
339
340 $ilToolbar->addInputItem($export_type, true);
341 require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
342 $button = ilSubmitButton::getInstance();
343 $button->setCommand('exportEvaluation');
344 $button->setCaption('export');
345 $button->getOmitPreventDoubleSubmission();
346 $ilToolbar->addButtonInstance($button);
347 }
348
349 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
350 if ($this->object->getShowSolutionAnswersOnly()) {
351 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
352 }
353
354 $this->tpl->setContent($table_gui->getHTML());
355 }
356
364 public function detailedEvaluation()
365 {
366 global $DIC; /* @var ILIAS\DI\Container $DIC */
367
368 if (!$this->getTestAccess()->checkStatisticsAccess()) {
370 }
371
372 $DIC->tabs()->activateTab(ilTestTabsManager::TAB_ID_STATISTICS);
373
374 $active_id = $_GET['active_id'];
375
376 if (!$this->getTestAccess()->checkResultsAccessForActiveId($active_id)) {
378 }
379
380 if (strlen($active_id) == 0) {
381 ilUtil::sendInfo($this->lng->txt('detailed_evaluation_missing_active_id'), true);
382 $this->ctrl->redirect($this, 'outEvaluation');
383 }
384
385 $this->tpl->addCss(ilUtil::getStyleSheetLocation('output', 'test_print.css', 'Modules/Test'), 'print');
386
387 $toolbar = $DIC['ilToolbar'];
388
389 require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
390 $backBtn = ilLinkButton::getInstance();
391 $backBtn->setCaption('back');
392 $backBtn->setUrl($this->ctrl->getLinkTarget($this, 'outEvaluation'));
393 $toolbar->addInputItem($backBtn);
394
395 $this->object->setAccessFilteredParticipantList(
396 $this->object->buildStatisticsAccessFilteredParticipantList()
397 );
398
399 $data = &$this->object->getCompleteEvaluationData();
400
401 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
402 $form = new ilPropertyFormGUI();
403 $form->setTitle(sprintf(
404 $this->lng->txt('detailed_evaluation_for'),
405 $data->getParticipant($active_id)->getName()
406 ));
407
408 $resultPoints = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_resultspoints'));
409 $resultPoints->setValue($data->getParticipant($active_id)->getReached() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getMaxpoints() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getReachedPointsInPercent()) . " %" . ")");
410 $form->addItem($resultPoints);
411
412 if (strlen($data->getParticipant($active_id)->getMark())) {
413 $resultMarks = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_resultsmarks'));
414 $resultMarks->setValue($data->getParticipant($active_id)->getMark());
415 $form->addItem($resultMarks);
416 if (strlen($data->getParticipant($active_id)->getECTSMark())) {
417 $ectsGrade = new ilNonEditableValueGUI($this->lng->txt('ects_grade'));
418 $ectsGrade->setValue($data->getParticipant($active_id)->getECTSMark());
419 $form->addItem($ectsGrade);
420 }
421 }
422
423 if ($this->object->isOfferingQuestionHintsEnabled()) {
424 $requestHints = new ilNonEditableValueGUI($this->lng->txt('tst_question_hints_requested_hint_count_header'));
425 $requestHints->setValue($data->getParticipant($active_id)->getRequestedHintsCountFromScoredPass());
426 $form->addItem($requestHints);
427 }
428
429 $time_seconds = $data->getParticipant($active_id)->getTimeOfWork();
430 $atime_seconds = $data->getParticipant($active_id)->getNumberOfQuestions() ? $time_seconds / $data->getParticipant($active_id)->getNumberOfQuestions() : 0;
431 $time_hours = floor($time_seconds / 3600);
432 $time_seconds -= $time_hours * 3600;
433 $time_minutes = floor($time_seconds / 60);
434 $time_seconds -= $time_minutes * 60;
435 $timeOfWork = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_timeofwork'));
436 $timeOfWork->setValue(sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds));
437 $form->addItem($timeOfWork);
438
439 $this->tpl->setVariable("TXT_ATIMEOFWORK", $this->lng->txt(""));
440 $time_hours = floor($atime_seconds / 3600);
441 $atime_seconds -= $time_hours * 3600;
442 $time_minutes = floor($atime_seconds / 60);
443 $atime_seconds -= $time_minutes * 60;
444 $avgTimeOfWork = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_atimeofwork'));
445 $avgTimeOfWork->setValue(sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $atime_seconds));
446 $form->addItem($avgTimeOfWork);
447
448 $firstVisit = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_firstvisit'));
449 $firstVisit->setValue(ilDatePresentation::formatDate(new ilDateTime($data->getParticipant($active_id)->getFirstVisit(), IL_CAL_UNIX)));
450 $form->addItem($firstVisit);
451
452 $lastVisit = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_lastvisit'));
453 $lastVisit->setValue(ilDatePresentation::formatDate(new ilDateTime($data->getParticipant($active_id)->getLastVisit(), IL_CAL_UNIX)));
454 $form->addItem($lastVisit);
455
456 $nrPasses = new ilNonEditableValueGUI($this->lng->txt('tst_nr_of_passes'));
457 $nrPasses->setValue($data->getParticipant($active_id)->getLastPass() + 1);
458 $form->addItem($nrPasses);
459
460 $scoredPass = new ilNonEditableValueGUI($this->lng->txt('scored_pass'));
461 if ($this->object->getPassScoring() == SCORE_BEST_PASS) {
462 $scoredPass->setValue($data->getParticipant($active_id)->getBestPass() + 1);
463 } else {
464 $scoredPass->setValue($data->getParticipant($active_id)->getLastPass() + 1);
465 }
466 $form->addItem($scoredPass);
467
468 $median = $data->getStatistics()->getStatistics()->median();
469 $pct = $data->getParticipant($active_id)->getMaxpoints() ? ($median / $data->getParticipant($active_id)->getMaxpoints()) * 100.0 : 0;
470 $mark = $this->object->mark_schema->getMatchingMark($pct);
471 if (is_object($mark)) {
472 $markMedian = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_mark_median'));
473 $markMedian->setValue($mark->getShortName());
474 $form->addItem($markMedian);
475 }
476
477 $rankParticipant = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_rank_participant'));
478 $rankParticipant->setValue($data->getStatistics()->getStatistics()->rank($data->getParticipant($active_id)->getReached()));
479 $form->addItem($rankParticipant);
480
481 $rankMedian = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_rank_median'));
482 $rankMedian->setValue($data->getStatistics()->getStatistics()->rank_median());
483 $form->addItem($rankMedian);
484
485 $totalParticipants = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_total_participants'));
486 $totalParticipants->setValue($data->getStatistics()->getStatistics()->count());
487 $form->addItem($totalParticipants);
488
489 $medianField = new ilNonEditableValueGUI($this->lng->txt('tst_stat_result_median'));
490 $medianField->setValue($median);
491 $form->addItem($medianField);
492
493 $this->tpl->setContent($form->getHTML());
494
495 $tables = array();
496
497 for ($pass = 0; $pass <= $data->getParticipant($active_id)->getLastPass(); $pass++) {
498 $finishdate = ilObjTest::lookupPassResultsUpdateTimestamp($active_id, $pass);
499 if ($finishdate > 0) {
500 if (($DIC->access()->checkAccess('write', '', (int) $_GET['ref_id']))) {
501 $this->ctrl->setParameter($this, 'statistics', '1');
502 $this->ctrl->setParameter($this, 'active_id', $active_id);
503 $this->ctrl->setParameter($this, 'pass', $pass);
504 } else {
505 $this->ctrl->setParameter($this, 'statistics', '');
506 $this->ctrl->setParameter($this, 'active_id', '');
507 $this->ctrl->setParameter($this, 'pass', '');
508 }
509
510 require_once 'Modules/Test/classes/tables/class.ilTestDetailedEvaluationStatisticsTableGUI.php';
511 $table = new ilTestDetailedEvaluationStatisticsTableGUI($this, 'detailedEvaluation', ($pass + 1) . '_' . $this->object->getId());
512 $table->setTitle(sprintf($this->lng->txt("tst_eval_question_points"), $pass + 1));
513 if (($DIC->access()->checkAccess('write', '', (int) $_GET['ref_id']))) {
514 $table->addCommandButton('outParticipantsPassDetails', $this->lng->txt('tst_show_answer_sheet'));
515 }
516
517 $questions = $data->getParticipant($active_id)->getQuestions($pass);
518 if (!is_array($questions)) {
519 $questions = $data->getParticipant($active_id)->getQuestions(0);
520 }
521
522 $tableData = array();
523
524 $counter = 0;
525 foreach ((array) $questions as $question) {
526 $userDataData = array(
527 'counter' => ++$counter,
528 'id' => $question['id'],
529 'id_txt' => $this->lng->txt('question_id_short'),
530 'title' => $data->getQuestionTitle($question['id'])
531 );
532
533 $answeredquestion = $data->getParticipant($active_id)->getPass($pass)->getAnsweredQuestionByQuestionId($question["id"]);
534 if (is_array($answeredquestion)) {
535 $percent = $answeredquestion['points'] ? $answeredquestion['reached'] / $answeredquestion['points'] * 100.0 : 0;
536 $userDataData['points'] = $answeredquestion['reached'] . ' ' . strtolower($this->lng->txt('of')) . " " . $answeredquestion['points'] . ' (' . sprintf("%.2f", $percent) . ' %)';
537 } else {
538 $userDataData['points'] = '0 ' . strtolower($this->lng->txt('of')) . ' ' . $question['points'] . ' (' . sprintf("%.2f", 0) . ' %) - ' . $this->lng->txt('question_not_answered');
539 }
540
541 $tableData[] = $userDataData;
542 }
543 $table->setData($tableData);
544
545 $tables[] = $table->getHTML();
546 }
547 }
548
549 global $DIC; /* @var ILIAS\DI\Container $DIC */
550 $DIC['tpl']->setContent($form->getHTML() . implode('', $tables));
551 }
552
558 {
559 $this->getQuestionResultForTestUsers($_GET["qid"], $this->object->getTestId());
560 }
561
567 {
568 require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
569 $question_object = assQuestion::_instanciateQuestion($_GET["qid"]);
570 if ($question_object instanceof ilObjFileHandlingQuestionType) {
571 $question_object->deliverFileUploadZIPFile(
572 $this->ref_id,
573 $this->object->getTestId(),
574 $this->object->getTitle()
575 );
576 } else {
577 $this->ctrl->redirect($this, "singleResults");
578 }
579 }
580
588 public function eval_a()
589 {
590 global $DIC; /* @var ILIAS\DI\Container $DIC */
591 $ilToolbar = $DIC->toolbar();
592
593 if (!$this->getTestAccess()->checkStatisticsAccess()) {
595 }
596
597 $DIC->tabs()->activateTab(ilTestTabsManager::TAB_ID_STATISTICS);
598
599 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_eval_anonymous_aggregation.html", "Modules/Test");
600
601 $this->object->setAccessFilteredParticipantList(
602 $this->object->buildStatisticsAccessFilteredParticipantList()
603 );
604
605 $eval = &$this->object->getCompleteEvaluationData();
606 $data = array();
607 $foundParticipants = &$eval->getParticipants();
608 if (count($foundParticipants)) {
609 $ilToolbar->setFormName('form_output_eval');
610 $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'exportAggregatedResults'));
611 require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
612 $export_type = new ilSelectInputGUI($this->lng->txt('exp_eval_data'), 'export_type');
613 $export_type->setOptions(array(
614 'excel' => $this->lng->txt('exp_type_excel'),
615 'csv' => $this->lng->txt('exp_type_spss')
616 ));
617 $ilToolbar->addInputItem($export_type, true);
618 require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
619 $button = ilSubmitButton::getInstance();
620 $button->setCommand('exportAggregatedResults');
621 $button->setCaption('export');
622 $button->getOmitPreventDoubleSubmission();
623 $ilToolbar->addButtonInstance($button);
624
625 array_push($data, array(
626 'result' => $this->lng->txt("tst_eval_total_persons"),
627 'value' => count($foundParticipants)
628 ));
629 $total_finished = $eval->getTotalFinishedParticipants();
630 array_push($data, array(
631 'result' => $this->lng->txt("tst_eval_total_finished"),
632 'value' => $total_finished
633 ));
634 $average_time = $this->object->evalTotalStartedAverageTime(
635 $eval->getParticipantIds()
636 );
637 $diff_seconds = $average_time;
638 $diff_hours = floor($diff_seconds / 3600);
639 $diff_seconds -= $diff_hours * 3600;
640 $diff_minutes = floor($diff_seconds / 60);
641 $diff_seconds -= $diff_minutes * 60;
642 array_push($data, array(
643 'result' => $this->lng->txt("tst_eval_total_finished_average_time"),
644 'value' => sprintf("%02d:%02d:%02d", $diff_hours, $diff_minutes, $diff_seconds)
645 ));
646 $total_passed = 0;
647 $total_passed_reached = 0;
648 $total_passed_max = 0;
649 $total_passed_time = 0;
650 foreach ($foundParticipants as $userdata) {
651 if ($userdata->getPassed()) {
652 $total_passed++;
653 $total_passed_reached += $userdata->getReached();
654 $total_passed_max += $userdata->getMaxpoints();
655 $total_passed_time += $userdata->getTimeOfWork();
656 }
657 }
658 $average_passed_reached = $total_passed ? $total_passed_reached / $total_passed : 0;
659 $average_passed_max = $total_passed ? $total_passed_max / $total_passed : 0;
660 $average_passed_time = $total_passed ? $total_passed_time / $total_passed : 0;
661 array_push($data, array(
662 'result' => $this->lng->txt("tst_eval_total_passed"),
663 'value' => $total_passed
664 ));
665 array_push($data, array(
666 'result' => $this->lng->txt("tst_eval_total_passed_average_points"),
667 'value' => sprintf("%2.2f", $average_passed_reached) . " " . strtolower($this->lng->txt("of")) . " " . sprintf("%2.2f", $average_passed_max)
668 ));
669 $average_time = $average_passed_time;
670 $diff_seconds = $average_time;
671 $diff_hours = floor($diff_seconds / 3600);
672 $diff_seconds -= $diff_hours * 3600;
673 $diff_minutes = floor($diff_seconds / 60);
674 $diff_seconds -= $diff_minutes * 60;
675 array_push($data, array(
676 'result' => $this->lng->txt("tst_eval_total_passed_average_time"),
677 'value' => sprintf("%02d:%02d:%02d", $diff_hours, $diff_minutes, $diff_seconds)
678 ));
679 }
680
681 include_once "./Modules/Test/classes/tables/class.ilTestAggregatedResultsTableGUI.php";
682 $table_gui = new ilTestAggregatedResultsTableGUI($this, 'eval_a');
683 $table_gui->setData($data);
684 $this->tpl->setVariable('AGGREGATED_RESULTS', $table_gui->getHTML());
685
686 $rows = array();
687 foreach ($eval->getQuestionTitles() as $question_id => $question_title) {
688 $answered = 0;
689 $reached = 0;
690 $max = 0;
691 foreach ($foundParticipants as $userdata) {
692 for ($i = 0; $i <= $userdata->getLastPass(); $i++) {
693 if (is_object($userdata->getPass($i))) {
694 $question = &$userdata->getPass($i)->getAnsweredQuestionByQuestionId($question_id);
695 if (is_array($question)) {
696 $answered++;
697 $reached += $question["reached"];
698 $max += $question["points"];
699 }
700 }
701 }
702 }
703 $percent = $max ? $reached / $max * 100.0 : 0;
704 $counter++;
705 $this->ctrl->setParameter($this, "qid", $question_id);
706
707 $points_reached = ($answered ? $reached / $answered : 0);
708 $points_max = ($answered ? $max / $answered : 0);
709 array_push(
710 $rows,
711 array(
712 'qid' => $question_id,
713 'title' => $question_title,
714 'points' => $points_reached,
715 'points_reached' => $points_reached,
716 'points_max' => $points_max,
717 'percentage' => (float) $percent,
718 'answers' => $answered
719 )
720 );
721 }
722 include_once "./Modules/Test/classes/tables/class.ilTestAverageReachedPointsTableGUI.php";
723 $table_gui = new ilTestAverageReachedPointsTableGUI($this, 'eval_a');
724 $table_gui->setData($rows);
725 $this->tpl->setVariable('TBL_AVG_REACHED', $table_gui->getHTML());
726 }
727
731 public function exportEvaluation()
732 {
733 $filterby = "";
734 if (array_key_exists("g_filterby", $_GET)) {
735 $filterby = $_GET["g_filterby"];
736 }
737
738 $filtertext = "";
739 if (array_key_exists("g_userfilter", $_GET)) {
740 $filtertext = $_GET["g_userfilter"];
741 }
742
743 $passedonly = false;
744 if (array_key_exists("g_passedonly", $_GET)) {
745 if ($_GET["g_passedonly"] == 1) {
746 $passedonly = true;
747 }
748 }
749
750 require_once 'Modules/Test/classes/class.ilTestExportFactory.php';
751 $expFactory = new ilTestExportFactory($this->object);
752
753 switch ($_POST["export_type"]) {
754 case "excel":
755 $expFactory->getExporter('results')->exportToExcel(
756 $deliver = true,
757 $filterby,
758 $filtertext,
759 $passedonly
760 );
761 break;
762
763 case "csv":
764 $expFactory->getExporter('results')->exportToCSV(
765 $deliver = true,
766 $filterby,
767 $filtertext,
768 $passedonly
769 );
770 break;
771
772 case "certificate":
773 if ($passedonly) {
774 $this->ctrl->setParameterByClass("iltestcertificategui", "g_passedonly", "1");
775 }
776 if (strlen($filtertext)) {
777 $this->ctrl->setParameterByClass("iltestcertificategui", "g_userfilter", $filtertext);
778 }
779 $this->ctrl->redirect($this, "exportCertificate");
780 break;
781 }
782 }
783
789 public function exportAggregatedResults()
790 {
791 require_once 'Modules/Test/classes/class.ilTestExportFactory.php';
792 $expFactory = new ilTestExportFactory($this->object);
793 $exportObj = $expFactory->getExporter('aggregated');
794
795 switch ($_POST["export_type"]) {
796 case "excel":
797 $exportObj->exportToExcel($deliver = true);
798 break;
799 case "csv":
800 $exportObj->exportToCSV($deliver = true);
801 break;
802 }
803 }
804
811 public function exportCertificate()
812 {
813 global $DIC;
814
815 $globalCertificatePrerequisites = new ilCertificateActiveValidator();
816 if (!$globalCertificatePrerequisites->validate()) {
817 $DIC['ilErr']->raiseError($this->lng->txt('permission_denied'), $DIC['ilErr']->MESSAGE);
818 }
819
820 $database = $DIC->database();
821 $logger = $DIC->logger()->root();
822
823 $pathFactory = new ilCertificatePathFactory();
824 $objectId = $this->object->getId();
825 $zipAction = new ilUserCertificateZip(
826 $objectId,
827 $pathFactory->create($this->object)
828 );
829
830 $archive_dir = $zipAction->createArchiveDirectory();
831 $total_users = array();
832
833 $this->object->setAccessFilteredParticipantList(
834 $this->object->buildStatisticsAccessFilteredParticipantList()
835 );
836
837 $ilUserCertificateRepository = new ilUserCertificateRepository($database, $logger);
838 $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository, $logger);
839
840 $total_users = &$this->object->evalTotalPersonsArray();
841 if (count($total_users)) {
842 $certValidator = new ilCertificateDownloadValidator();
843
844 foreach ($total_users as $active_id => $name) {
845 $user_id = $this->object->_getUserIdFromActiveId($active_id);
846
847 if (!$certValidator->isCertificateDownloadable($user_id, $objectId)) {
848 continue;
849 }
850
851 $pdfAction = new ilCertificatePdfAction(
852 $logger,
853 $pdfGenerator,
855 $this->lng->txt('error_creating_certificate_pdf')
856 );
857
858 $pdf = $pdfAction->createPDF($user_id, $objectId);
859 if (strlen($pdf)) {
860 $zipAction->addPDFtoArchiveDirectory($pdf, $archive_dir, $user_id . "_" . str_replace(" ", "_", ilUtil::getASCIIFilename($name)) . ".pdf");
861 }
862 }
863 $zipArchive = $zipAction->zipCertificatesInArchiveDirectory($archive_dir, true);
864 }
865 }
866
873 public function getEvaluationQuestionId($question_id, $original_id = "")
874 {
875 if ($original_id > 0) {
876 return $original_id;
877 } else {
878 return $question_id;
879 }
880 }
881
890 {
891 global $DIC;
892 $ilTabs = $DIC['ilTabs'];
893 $ilAccess = $DIC['ilAccess'];
894 $ilObjDataCache = $DIC['ilObjDataCache'];
895
896 $active_id = (int) $_GET["active_id"];
897
898 if (!$this->getTestAccess()->checkResultsAccessForActiveId($active_id)) {
900 }
901
902 $this->ctrl->saveParameter($this, "active_id");
903 $testSession = $this->testSessionFactory->getSession($active_id);
904
905 // protect actives from other tests
906 if ($testSession->getTestId() != $this->object->getTestId()) {
908 }
909
910 $this->ctrl->saveParameter($this, "pass");
911 $pass = (int) $_GET["pass"];
912
913 if (isset($_GET['statistics']) && $_GET['statistics'] == 1) {
914 $this->ctrl->setParameterByClass("ilTestEvaluationGUI", "active_id", $active_id);
915 $this->ctrl->saveParameter($this, 'statistics');
916
917 $ilTabs->setBackTarget(
918 $this->lng->txt('back'),
919 $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'detailedEvaluation')
920 );
921 } elseif ($this->object->getNrOfTries() == 1) {
922 $ilTabs->setBackTarget(
923 $this->lng->txt('back'),
924 $this->ctrl->getLinkTargetByClass('ilParticipantsTestResultsGUI')
925 );
926 } else {
927 $ilTabs->setBackTarget(
928 $this->lng->txt('tst_results_back_overview'),
929 $this->ctrl->getLinkTarget($this, 'outParticipantsResultsOverview')
930 );
931 }
932
933 // prepare generation before contents are processed (for mathjax)
934 if ($this->isPdfDeliveryRequest()) {
936 }
937
938 require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
939 $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
940
941 $objectivesList = null;
942
943 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
944 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($active_id, $pass);
945 $testSequence->loadFromDb();
946 $testSequence->loadQuestions();
947
948 require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
949 $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
950
951 $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
952 $objectivesList->loadObjectivesTitles();
953
954 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
955 $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
956 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
957 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
958 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
959 }
960
961 $result_array = $this->getFilteredTestResult($active_id, $pass, false, !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired());
962
963 $overviewTableGUI = $this->getPassDetailsOverviewTableGUI($result_array, $active_id, $pass, $this, "outParticipantsPassDetails", '', true, $objectivesList);
964 $overviewTableGUI->setTitle($testResultHeaderLabelBuilder->getPassDetailsHeaderLabel($pass + 1));
965 $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, false);
966 $user_id = $this->object->_getUserIdFromActiveId($active_id);
967
968 $template = new ilTemplate("tpl.il_as_tst_pass_details_overview_participants.html", true, true, "Modules/Test");
969
970 $toolbar = $this->buildUserTestResultsToolbarGUI();
971
972 $this->ctrl->setParameter($this, 'pdf', '1');
973 $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, 'outParticipantsPassDetails'));
974 $this->ctrl->setParameter($this, 'pdf', '');
975
976 if (isset($_GET['show_best_solutions'])) {
977 $_SESSION['tst_results_show_best_solutions'] = true;
978 } elseif (isset($_GET['hide_best_solutions'])) {
979 $_SESSION['tst_results_show_best_solutions'] = false;
980 } elseif (!isset($_SESSION['tst_results_show_best_solutions'])) {
981 $_SESSION['tst_results_show_best_solutions'] = false;
982 }
983
984 if ($_SESSION['tst_results_show_best_solutions']) {
985 $this->ctrl->setParameter($this, 'hide_best_solutions', '1');
986 $toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, 'outParticipantsPassDetails'));
987 $this->ctrl->setParameter($this, 'hide_best_solutions', '');
988 } else {
989 $this->ctrl->setParameter($this, 'show_best_solutions', '1');
990 $toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, 'outParticipantsPassDetails'));
991 $this->ctrl->setParameter($this, 'show_best_solutions', '');
992 }
993
994 $toolbar->build();
995 $template->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
996
997 if ($this->isGradingMessageRequired() && $this->object->getNrOfTries() == 1) {
998 $gradingMessageBuilder = $this->getGradingMessageBuilder($active_id);
999 $gradingMessageBuilder->buildList();
1000
1001 $template->setCurrentBlock('grading_message');
1002 $template->setVariable('GRADING_MESSAGE', $gradingMessageBuilder->getList());
1003 $template->parseCurrentBlock();
1004 }
1005
1006 $list_of_answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, $_SESSION['tst_results_show_best_solutions'], false, false, false, true, $objectivesList, $testResultHeaderLabelBuilder);
1007 $template->setVariable("LIST_OF_ANSWERS", $list_of_answers);
1008 $template->setVariable("PASS_DETAILS", $this->ctrl->getHTML($overviewTableGUI));
1009
1010 $data = &$this->object->getCompleteEvaluationData();
1011 $result = $data->getParticipant($active_id)->getReached() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getMaxpoints() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getReachedPointsInPercent()) . " %" . ")";
1012 $template->setCurrentBlock('total_score');
1013 $template->setVariable("TOTAL_RESULT_TEXT",$this->lng->txt('tst_stat_result_resultspoints'));
1014 $template->setVariable("TOTAL_RESULT",$result);
1015 $template->parseCurrentBlock();
1016
1017 if (!$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1018 $template->setVariable("USER_DATA", $user_data);
1019
1020 $uname = $this->object->userLookupFullName($user_id);
1021 $template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name_pass"), $pass + 1, $uname));
1022
1023 $template->setVariable("TEXT_RESULTS", $testResultHeaderLabelBuilder->getPassDetailsHeaderLabel($pass + 1));
1024 }
1025
1026 $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1027
1028 $this->populateExamId($template, (int) $active_id, (int) $pass);
1030
1031 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1032 if ($this->object->getShowSolutionAnswersOnly()) {
1033 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1034 }
1035
1036 if ($this->isPdfDeliveryRequest()) {
1037 //$this->object->deliverPDFfromHTML($template->get());
1038 ilTestPDFGenerator::generatePDF($template->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitleFilenameCompliant(), PDF_USER_RESULT);
1039 } else {
1040 $this->tpl->setVariable("ADM_CONTENT", $template->get());
1041 }
1042 }
1043
1050 {
1051 global $DIC;
1052 $ilTabs = $DIC['ilTabs'];
1053 $ilObjDataCache = $DIC['ilObjDataCache'];
1054
1055 $active_id = (int) $_GET["active_id"];
1056
1057 if (!$this->getTestAccess()->checkResultsAccessForActiveId($active_id)) {
1059 }
1060
1061 $testSession = $this->testSessionFactory->getSession($active_id);
1062
1063 // protect actives from other tests
1064 if ($testSession->getTestId() != $this->object->getTestId()) {
1066 }
1067
1068 if ($this->object->getNrOfTries() == 1) {
1069 $this->ctrl->setParameter($this, "active_id", $active_id);
1070 $this->ctrl->setParameter($this, "pass", ilObjTest::_getResultPass($active_id));
1071 $this->ctrl->redirect($this, "outParticipantsPassDetails");
1072 }
1073
1074 $ilTabs->setBackTarget(
1075 $this->lng->txt('back'),
1076 $this->ctrl->getLinkTargetByClass(['ilObjTestGUI', 'ilTestResultsGUI', 'ilParticipantsTestResultsGUI'])
1077 );
1078
1079 // prepare generation before contents are processed (for mathjax)
1080 if ($this->isPdfDeliveryRequest()) {
1082 }
1083
1084 $template = new ilTemplate("tpl.il_as_tst_pass_overview_participants.html", true, true, "Modules/Test");
1085
1086 $toolbar = $this->buildUserTestResultsToolbarGUI();
1087
1088 $this->ctrl->setParameter($this, 'pdf', '1');
1089 $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, __FUNCTION__));
1090 $this->ctrl->setParameter($this, 'pdf', '');
1091
1092 $toolbar->build();
1093 $template->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
1094
1095 require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
1096 $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
1097 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1098 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
1099 $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
1100 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
1101 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
1102 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
1103 }
1104
1105 global $DIC; /* @var ILIAS\DI\Container $DIC */
1106 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
1107 $testPassesSelector = new ilTestPassesSelector($DIC['ilDB'], $this->object);
1108 $testPassesSelector->setActiveId($testSession->getActiveId());
1109 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
1110
1111 $passOverViewTableGUI = $this->buildPassOverviewTableGUI($this);
1112 $passOverViewTableGUI->setActiveId($testSession->getActiveId());
1113 $passOverViewTableGUI->setResultPresentationEnabled(true);
1114 $passOverViewTableGUI->setPassDetailsCommand('outParticipantsPassDetails');
1115 $passOverViewTableGUI->init();
1116 $passOverViewTableGUI->setData($this->getPassOverviewTableData($testSession, $testPassesSelector->getExistingPasses(), true, true));
1117 $passOverViewTableGUI->setTitle($testResultHeaderLabelBuilder->getPassOverviewHeaderLabel());
1118 $template->setVariable("PASS_OVERVIEW", $passOverViewTableGUI->getHTML());
1119
1120 if ($this->isGradingMessageRequired()) {
1121 $gradingMessageBuilder = $this->getGradingMessageBuilder($active_id);
1122 $gradingMessageBuilder->buildList();
1123
1124 $template->setCurrentBlock('grading_message');
1125 $template->setVariable('GRADING_MESSAGE', $gradingMessageBuilder->getList());
1126 $template->parseCurrentBlock();
1127 }
1128
1129 $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, true);
1130 $user_id = $this->object->_getUserIdFromActiveId($active_id);
1131
1132 if (!$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1133 if ($this->object->getAnonymity()) {
1134 $template->setVariable("TEXT_HEADING", $this->lng->txt("tst_result"));
1135 } else {
1136 $uname = $this->object->userLookupFullName($user_id, true);
1137 $template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name"), $uname));
1138 $template->setVariable("USER_DATA", $user_data);
1139 }
1140 }
1141
1142 $template->parseCurrentBlock();
1143
1144
1145 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1146 if ($this->object->getShowSolutionAnswersOnly()) {
1147 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1148 }
1149
1150 if (array_key_exists("pdf", $_GET) && ($_GET["pdf"] == 1)) {
1151 //$this->object->deliverPDFfromHTML($template->get(), $this->object->getTitle());
1152
1153 $name = ilObjUser::_lookupName($user_id);
1154 $filename = $name['lastname'] . '_' . $name['firstname'] . '_' . $name['login'] . '__' . $this->object->getTitleFilenameCompliant();
1156 //ilUtil::deliverData($file, ilUtil::getASCIIFilename($this->object->getTitle()) . ".pdf", "application/pdf", false, true);
1157 //$template->setVariable("PDF_FILE_LOCATION", $filename);
1158 } else {
1159 $this->tpl->setVariable("ADM_CONTENT", $template->get());
1160 }
1161 }
1162
1164 {
1165 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
1166 $tableGUI->initFilter();
1167 $tableGUI->resetOffset();
1168 $tableGUI->writeFilterToSession();
1169 $this->outUserPassDetails();
1170 }
1171
1173 {
1174 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
1175 $tableGUI->initFilter();
1176 $tableGUI->resetOffset();
1177 $tableGUI->resetFilter();
1178 $this->outUserPassDetails();
1179 }
1180
1182 {
1183 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'outParticipantsPassDetails');
1184 $tableGUI->initFilter();
1185 $tableGUI->resetOffset();
1186 $tableGUI->writeFilterToSession();
1188 }
1189
1191 {
1192 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'outParticipantsPassDetails');
1193 $tableGUI->initFilter();
1194 $tableGUI->resetOffset();
1195 $tableGUI->resetFilter();
1197 }
1198
1204 public function outUserPassDetails()
1205 {
1206 global $DIC;
1207 $ilTabs = $DIC['ilTabs'];
1208 $ilUser = $DIC['ilUser'];
1209 $ilObjDataCache = $DIC['ilObjDataCache'];
1210
1211 $ilTabs->clearSubTabs();
1212 $ilTabs->setBackTarget($this->lng->txt('tst_results_back_overview'), $this->ctrl->getLinkTarget($this));
1213
1214 $testSession = $this->testSessionFactory->getSession();
1215
1216 if (!$this->object->getShowPassDetails()) {
1217 #$executable = $this->object->isExecutable($testSession, $ilUser->getId());
1218
1219 #if($executable["executable"])
1220 #{
1221 $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1222 #}
1223 }
1224
1225 $active_id = $testSession->getActiveId();
1226 $user_id = $testSession->getUserId();
1227
1228 $this->ctrl->saveParameter($this, "pass");
1229 $pass = $_GET["pass"];
1230
1231 // prepare generation before contents are processed (for mathjax)
1232 if ($this->isPdfDeliveryRequest()) {
1234 }
1235
1236 require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
1237 $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
1238
1239 $objectivesList = null;
1240
1241 $considerHiddenQuestions = true;
1242 $considerOptionalQuestions = true;
1243
1244 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1245 $considerHiddenQuestions = false;
1246
1247 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($active_id, $pass);
1248 $testSequence->loadFromDb();
1249 $testSequence->loadQuestions();
1250
1251 if ($this->object->isRandomTest() && !$testSequence->isAnsweringOptionalQuestionsConfirmed()) {
1252 $considerOptionalQuestions = false;
1253 }
1254
1255 require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
1256 $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
1257
1258 $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
1259 $objectivesList->loadObjectivesTitles();
1260
1261 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
1262 $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
1263 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
1264 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
1265 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
1266 }
1267
1268 $result_array = $this->getFilteredTestResult($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions);
1269
1270 $command_solution_details = "";
1271 if ($this->object->getShowSolutionDetails()) {
1272 $command_solution_details = "outCorrectSolution";
1273 }
1274 $questionAnchorNav = $this->object->canShowSolutionPrintview();
1275
1276 $tpl = new ilTemplate('tpl.il_as_tst_pass_details_overview_participants.html', true, true, "Modules/Test");
1277
1278 if (!$this->isPdfDeliveryRequest()) {
1279 $toolbar = $this->buildUserTestResultsToolbarGUI();
1280
1281 $this->ctrl->setParameter($this, 'pdf', '1');
1282 $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, 'outUserPassDetails'));
1283 $this->ctrl->setParameter($this, 'pdf', '');
1284
1285 $validator = new ilCertificateDownloadValidator();
1286 if ($validator->isCertificateDownloadable($user_id, $this->object->getId())) {
1287 $toolbar->setCertificateLinkTarget($this->ctrl->getLinkTarget($this, 'outCertificate'));
1288 }
1289
1290 $toolbar->build();
1291
1292 $tpl->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
1293
1294 $tpl->setCurrentBlock('signature');
1295 $tpl->setVariable("SIGNATURE", $this->getResultsSignature());
1296 $tpl->parseCurrentBlock();
1297
1298 if ($this->object->isShowExamIdInTestResultsEnabled()) {
1299 $tpl->setCurrentBlock('exam_id');
1300 $tpl->setVariable('EXAM_ID', ilObjTest::lookupExamId(
1301 $testSession->getActiveId(),
1302 $pass
1303 ));
1304 $tpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
1305 $tpl->parseCurrentBlock();
1306 }
1307 }
1308
1309 if (!$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired() &&
1310 $this->isGradingMessageRequired() && $this->object->getNrOfTries() == 1) {
1311 $gradingMessageBuilder = $this->getGradingMessageBuilder($active_id);
1312 $gradingMessageBuilder->buildMessage();
1313 $gradingMessageBuilder->sendMessage();
1314
1315 #$template->setCurrentBlock('grading_message');
1316 #$template->setVariable('GRADING_MESSAGE', );
1317 #$template->parseCurrentBlock();
1318 }
1319
1320 $overviewTableGUI = $this->getPassDetailsOverviewTableGUI(
1321 $result_array,
1322 $active_id,
1323 $pass,
1324 $this,
1325 "outUserPassDetails",
1326 $command_solution_details,
1327 $questionAnchorNav,
1328 $objectivesList
1329 );
1330 $overviewTableGUI->setTitle($testResultHeaderLabelBuilder->getPassDetailsHeaderLabel($pass + 1));
1331 $tpl->setVariable("PASS_DETAILS", $this->ctrl->getHTML($overviewTableGUI));
1332
1333 $data = &$this->object->getCompleteEvaluationData();
1334 $result = $data->getParticipant($active_id)->getReached() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getMaxpoints() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getReachedPointsInPercent()) . " %" . ")";
1335 $tpl->setCurrentBlock('total_score');
1336 $tpl->setVariable("TOTAL_RESULT_TEXT",$this->lng->txt('tst_stat_result_resultspoints'));
1337 $tpl->setVariable("TOTAL_RESULT",$result);
1338 $tpl->parseCurrentBlock();
1339
1340 if ($this->object->canShowSolutionPrintview()) {
1341 $list_of_answers = $this->getPassListOfAnswers(
1342 $result_array,
1343 $active_id,
1344 $pass,
1345 $this->object->getShowSolutionListComparison(),
1346 false,
1347 false,
1348 false,
1349 true,
1350 $objectivesList,
1351 $testResultHeaderLabelBuilder
1352 );
1353 $tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
1354 }
1355
1356 $tpl->setVariable("TEXT_RESULTS", $testResultHeaderLabelBuilder->getPassDetailsHeaderLabel($pass + 1));
1357 $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1358
1359 $uname = $this->object->userLookupFullName($user_id, true);
1360 $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, true);
1361 if (!$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1362 if ($this->object->getAnonymity()) {
1363 $tpl->setVariable("TEXT_HEADING", $this->lng->txt("tst_result_pass"));
1364 } else {
1365 $tpl->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name_pass"), $pass + 1, $uname));
1366 $tpl->setVariable("USER_DATA", $user_data);
1367 }
1368 }
1369
1370 $this->populateExamId($tpl, (int) $active_id, (int) $pass);
1372
1373 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1374 if ($this->object->getShowSolutionAnswersOnly()) {
1375 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1376 }
1377
1378 if ($this->isPdfDeliveryRequest()) {
1379 ilTestPDFGenerator::generatePDF($tpl->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitleFilenameCompliant(), PDF_USER_RESULT);
1380 } else {
1381 $this->tpl->setContent($tpl->get());
1382 }
1383 }
1384
1390 public function outUserResultsOverview()
1391 {
1392 global $DIC;
1393 $ilUser = $DIC['ilUser'];
1394 $ilObjDataCache = $DIC['ilObjDataCache'];
1395
1396 $testSession = $this->testSessionFactory->getSession();
1397 $active_id = $testSession->getActiveId();
1398 $user_id = $ilUser->getId();
1399 $uname = $this->object->userLookupFullName($user_id, true);
1400
1401 if (!$this->object->canShowTestResults($testSession)) {
1402 $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1403 }
1404
1405 // prepare generation before contents are processed (for mathjax)
1406 if ($this->isPdfDeliveryRequest()) {
1408 }
1409
1410 $templatehead = new ilTemplate("tpl.il_as_tst_results_participants.html", true, true, "Modules/Test");
1411 $template = new ilTemplate("tpl.il_as_tst_results_participant.html", true, true, "Modules/Test");
1412
1413 $toolbar = $this->buildUserTestResultsToolbarGUI();
1414
1415 $this->ctrl->setParameter($this, 'pdf', '1');
1416 $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, 'outUserResultsOverview'));
1417 $this->ctrl->setParameter($this, 'pdf', '');
1418
1419 $validator = new ilCertificateDownloadValidator();
1420 if ($validator->isCertificateDownloadable($user_id, $this->object->getId())) {
1421 $toolbar->setCertificateLinkTarget($this->ctrl->getLinkTarget($this, 'outCertificate'));
1422 }
1423
1424 $toolbar->build();
1425
1426 $templatehead->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
1427
1428 $passDetailsEnabled = $this->object->getShowPassDetails();
1429 #if (!$passDetailsEnabled)
1430 #{
1431 # $executable = $this->object->isExecutable($testSession, $ilUser->getId());
1432 # if (!$executable["executable"]) $passDetailsEnabled = true;
1433 #}
1434
1435 require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
1436 $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
1437 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1438 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
1439 $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
1440 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
1441 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
1442 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
1443 }
1444
1445 $template->setCurrentBlock("pass_overview");
1446
1447 global $DIC; /* @var ILIAS\DI\Container $DIC */
1448 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
1449 $testPassesSelector = new ilTestPassesSelector($DIC['ilDB'], $this->object);
1450 $testPassesSelector->setActiveId($testSession->getActiveId());
1451 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
1452
1453 $passOverViewTableGUI = $this->buildPassOverviewTableGUI($this);
1454 $passOverViewTableGUI->setActiveId($testSession->getActiveId());
1455 $passOverViewTableGUI->setResultPresentationEnabled(true);
1456 if ($passDetailsEnabled) {
1457 $passOverViewTableGUI->setPassDetailsCommand('outUserPassDetails');
1458 }
1459 if ($this->object->isPassDeletionAllowed()) {
1460 $passOverViewTableGUI->setPassDeletionCommand('confirmDeletePass');
1461 }
1462 $passOverViewTableGUI->init();
1463 $passOverViewTableGUI->setData($this->getPassOverviewTableData($testSession, $testPassesSelector->getReportablePasses(), true));
1464 $passOverViewTableGUI->setTitle($testResultHeaderLabelBuilder->getPassOverviewHeaderLabel());
1465 $overview = $passOverViewTableGUI->getHTML();
1466 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1467 require_once 'Modules/Test/classes/class.ilTestLearningObjectivesStatusGUI.php';
1468 $loStatus = new ilTestLearningObjectivesStatusGUI($this->lng);
1469 $loStatus->setCrsObjId($this->getObjectiveOrientedContainer()->getObjId());
1470 $loStatus->setUsrId($testSession->getUserId());
1471 $overview .= "<br />" . $loStatus->getHTML();
1472 }
1473 $template->setVariable("PASS_OVERVIEW", $overview);
1474 $template->parseCurrentBlock();
1475
1476 if ($this->isGradingMessageRequired()) {
1477 $gradingMessageBuilder = $this->getGradingMessageBuilder($active_id);
1478 $gradingMessageBuilder->buildMessage();
1479 $gradingMessageBuilder->sendMessage();
1480
1481 #$template->setCurrentBlock('grading_message');
1482 #$template->setVariable('GRADING_MESSAGE', );
1483 #$template->parseCurrentBlock();
1484 }
1485
1486 $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, true);
1487
1488 if (!$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1489 if ($this->object->getAnonymity()) {
1490 $template->setVariable("TEXT_HEADING", $this->lng->txt("tst_result"));
1491 } else {
1492 $template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name"), $uname));
1493 $template->setVariable("USER_DATA", $user_data);
1494 }
1495 }
1496
1497 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1498 if ($this->object->getShowSolutionAnswersOnly()) {
1499 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1500 }
1501 $templatehead->setVariable("RESULTS_PARTICIPANT", $template->get());
1502
1503 if ($this->isPdfDeliveryRequest()) {
1504 ilTestPDFGenerator::generatePDF($template->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitleFilenameCompliant(), PDF_USER_RESULT);
1505 } else {
1506 $this->tpl->setContent($templatehead->get());
1507 }
1508 }
1509
1518 {
1519 global $DIC; /* @var ILIAS\DI\Container $DIC */
1520 $ilUser = $DIC['ilUser'];
1521 $ilObjDataCache = $DIC['ilObjDataCache'];
1522
1523 if (!$this->object->getShowSolutionPrintview()) {
1524 ilUtil::sendInfo($this->lng->txt("no_permission"), true);
1525 $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1526 }
1527
1528 $template = new ilTemplate("tpl.il_as_tst_info_list_of_answers.html", true, true, "Modules/Test");
1529
1530 $pass = null;
1531 if (array_key_exists("pass", $_GET)) {
1532 if (strlen($_GET["pass"])) {
1533 $pass = $_GET["pass"];
1534 }
1535 }
1536 $user_id = $ilUser->getId();
1537
1538 $testSession = $this->testSessionFactory->getSession();
1539 $active_id = $testSession->getActiveId();
1540
1541 $template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_passes"));
1542
1543 global $DIC; /* @var ILIAS\DI\Container $DIC */
1544 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
1545 $testPassesSelector = new ilTestPassesSelector($DIC['ilDB'], $this->object);
1546 $testPassesSelector->setActiveId($testSession->getActiveId());
1547 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
1548
1549 $passOverViewTableGUI = $this->buildPassOverviewTableGUI($this);
1550 $passOverViewTableGUI->setActiveId($testSession->getActiveId());
1551 $passOverViewTableGUI->setResultPresentationEnabled(false);
1552 $passOverViewTableGUI->setPassDetailsCommand('outUserListOfAnswerPasses');
1553 $passOverViewTableGUI->init();
1554 $passOverViewTableGUI->setData($this->getPassOverviewTableData($testSession, $testPassesSelector->getClosedPasses(), false));
1555 $template->setVariable("PASS_OVERVIEW", $passOverViewTableGUI->getHTML());
1556
1557 $signature = "";
1558 if (strlen($pass)) {
1559 require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
1560 $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
1561
1562 $objectivesList = null;
1563
1564 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1565 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($active_id, $pass);
1566 $testSequence->loadFromDb();
1567 $testSequence->loadQuestions();
1568
1569 require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
1570 $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
1571
1572 $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
1573 $objectivesList->loadObjectivesTitles();
1574
1575 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
1576 $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
1577 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
1578 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
1579 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
1580 }
1581
1582 $result_array = $this->object->getTestResult(
1583 $active_id,
1584 $pass,
1585 false,
1586 !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
1587 );
1588
1589 $signature = $this->getResultsSignature();
1590 $user_id = &$this->object->_getUserIdFromActiveId($active_id);
1591 $showAllAnswers = true;
1592 if ($this->object->isExecutable($testSession, $user_id)) {
1593 $showAllAnswers = false;
1594 }
1595 $this->setContextResultPresentation(false);
1596 $answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, false, $showAllAnswers, false, false, false, $objectivesList, $testResultHeaderLabelBuilder);
1597 $template->setVariable("PASS_DETAILS", $answers);
1598 }
1599 $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1600 $template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
1601 $template->setVariable("PRINT_URL", "javascript:window.print();");
1602
1603 $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, true);
1604 $template->setVariable("USER_DATA", $user_data);
1605 $template->setVariable("TEXT_LIST_OF_ANSWERS", $this->lng->txt("tst_list_of_answers"));
1606 if (strlen($signature)) {
1607 $template->setVariable("SIGNATURE", $signature);
1608 }
1609 if (!is_null($pass) && $this->object->isShowExamIdInTestResultsEnabled()) {
1610 $template->setCurrentBlock('exam_id_footer');
1611 $template->setVariable('EXAM_ID_VAL', ilObjTest::lookupExamId(
1612 $testSession->getActiveId(),
1613 $pass
1614 ));
1615 $template->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
1616 $template->parseCurrentBlock();
1617 }
1618 $this->tpl->setVariable("ADM_CONTENT", $template->get());
1619
1620 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1621 if ($this->object->getShowSolutionAnswersOnly()) {
1622 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1623 }
1624 }
1625
1633 public function passDetails()
1634 {
1635 if (array_key_exists("pass", $_GET) && (strlen($_GET["pass"]) > 0)) {
1636 $this->ctrl->saveParameter($this, "pass");
1637 $this->ctrl->saveParameter($this, "active_id");
1638 $this->outTestResults(false, $_GET["pass"]);
1639 } else {
1640 $this->outTestResults(false);
1641 }
1642 }
1643
1648 public function singleResults()
1649 {
1650 global $DIC; /* @var ILIAS\DI\Container $DIC */
1651
1652 if (!$this->getTestAccess()->checkStatisticsAccess()) {
1654 }
1655
1656 $this->object->setAccessFilteredParticipantList(
1657 $this->object->buildStatisticsAccessFilteredParticipantList()
1658 );
1659
1660 $DIC->tabs()->activateTab(ilTestTabsManager::TAB_ID_STATISTICS);
1661
1662 $data = &$this->object->getCompleteEvaluationData();
1663 $color_class = array("tblrow1", "tblrow2");
1664 $counter = 0;
1665 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_eval_single_answers.html", "Modules/Test");
1666 $foundParticipants = &$data->getParticipants();
1667 if (count($foundParticipants) == 0) {
1668 ilUtil::sendInfo($this->lng->txt("tst_no_evaluation_data"));
1669 return;
1670 } else {
1671 $rows = array();
1672 foreach ($data->getQuestionTitles() as $question_id => $question_title) {
1673 $answered = 0;
1674 $reached = 0;
1675 $max = 0;
1676 foreach ($foundParticipants as $userdata) {
1677 $pass = $userdata->getScoredPass();
1678 if (is_object($userdata->getPass($pass))) {
1679 $question = &$userdata->getPass($pass)->getAnsweredQuestionByQuestionId($question_id);
1680 if (is_array($question)) {
1681 $answered++;
1682 }
1683 }
1684 }
1685 $counter++;
1686 $this->ctrl->setParameter($this, "qid", $question_id);
1687 require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
1688 $question_object = assQuestion::_instanciateQuestion($question_id);
1689 $download = "";
1690 if ($question_object instanceof ilObjFileHandlingQuestionType) {
1691 if ($question_object->hasFileUploads($this->object->getTestId())) {
1692 $download = "<a href=\"" . $this->ctrl->getLinkTarget($this, "exportFileUploadsForAllParticipants") . "\">" . $this->lng->txt("download") . "</a>";
1693 }
1694 }
1695 array_push(
1696 $rows,
1697 array(
1698 'qid' => $question_id,
1699 'question_title' => $question_title,
1700 'number_of_answers' => $answered,
1701 'output' => "<a href=\"" . $this->ctrl->getLinkTarget($this, "exportQuestionForAllParticipants") . "\">" . $this->lng->txt("pdf_export") . "</a>",
1702 'file_uploads' => $download
1703 )
1704 );
1705 }
1706 if (count($rows)) {
1707 require_once './Modules/Test/classes/tables/class.ilResultsByQuestionTableGUI.php';
1708 $table_gui = new ilResultsByQuestionTableGUI($this, "singleResults");
1709 $table_gui->setTitle($this->lng->txt("tst_answered_questions_test"));
1710 $table_gui->setData($rows);
1711
1712 $this->tpl->setVariable("TBL_SINGLE_ANSWERS", $table_gui->getHTML());
1713 } else {
1714 $this->tpl->setVariable("TBL_SINGLE_ANSWERS", $this->lng->txt("adm_no_special_users"));
1715 }
1716 }
1717 }
1718
1722 public function outCertificate()
1723 {
1724 global $DIC;
1725
1726 $user = $DIC->user();
1727 $database = $DIC->database();
1728 $logger = $DIC->logger()->root();
1729
1730 $ilUserCertificateRepository = new ilUserCertificateRepository($database, $logger);
1731 $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository, $logger);
1732
1733 $pdfAction = new ilCertificatePdfAction(
1734 $logger,
1735 $pdfGenerator,
1737 $this->lng->txt('error_creating_certificate_pdf')
1738 );
1739
1740 $pdfAction->downloadPdf((int) $user->getId(), (int) $this->object->getId());
1741 }
1742
1743 public function confirmDeletePass()
1744 {
1745 if (isset($_GET['context']) && strlen($_GET['context'])) {
1746 $context = $_GET['context'];
1747 } else {
1749 }
1750
1751 if (!$this->object->isPassDeletionAllowed() && !$this->object->isDynamicTest()) {
1753 }
1754
1755 require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
1756
1757 $confirm = new ilTestPassDeletionConfirmationGUI($this->ctrl, $this->lng, $this);
1758 $confirm->build((int) $_GET['active_id'], (int) $_GET['pass'], $context);
1759
1760 global $DIC;
1761 $tpl = $DIC['tpl'];
1762 $tpl->setContent($this->ctrl->getHTML($confirm));
1763 }
1764
1765 public function cancelDeletePass()
1766 {
1767 $this->redirectToPassDeletionContext($_POST['context']);
1768 }
1769
1771 {
1772 require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
1773
1774 switch ($context) {
1776
1777 $this->ctrl->redirect($this, 'outUserResultsOverview');
1778
1779 // no break
1781
1782 $this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
1783
1784 // no break
1786
1787 $this->ctrl->redirectByClass('ilTestPlayerDynamicQuestionSetGUI', 'startTest');
1788 }
1789 }
1790
1791 public function performDeletePass()
1792 {
1793 if (isset($_POST['context']) && strlen($_POST['context'])) {
1794 $context = $_POST['context'];
1795 } else {
1797 }
1798
1799 if (!$this->object->isPassDeletionAllowed() && !$this->object->isDynamicTest()) {
1801 }
1803 global $DIC;
1804 $ilDB = $DIC['ilDB'];
1805
1806 $active_fi = null;
1807 $pass = null;
1808
1809 if (isset($_POST['active_id']) && (int) $_POST['active_id']) {
1810 $active_fi = $_POST['active_id'];
1811 }
1812
1813 if (isset($_POST['pass']) && is_numeric($_POST['pass'])) {
1814 $pass = $_POST['pass'];
1815 }
1816
1817 if (is_null($active_fi) || is_null($pass)) {
1818 $this->ctrl->redirect($this, 'outUserResultsOverview');
1819 }
1820
1821 if (!$this->object->isDynamicTest() && $pass == $this->object->_getResultPass($active_fi)) {
1822 $this->ctrl->redirect($this, 'outUserResultsOverview');
1823 }
1824
1825 // Get information
1826 $result = $ilDB->query("
1827 SELECT tst_active.tries, tst_active.last_finished_pass, tst_sequence.pass
1828 FROM tst_active
1829 LEFT JOIN tst_sequence
1830 ON tst_sequence.active_fi = tst_active.active_id
1831 AND tst_sequence.pass = tst_active.tries
1832 WHERE tst_active.active_id = {$ilDB->quote($active_fi, 'integer')}
1833 ");
1834
1835 $row = $ilDB->fetchAssoc($result);
1836
1837 $tries = $row['tries'];
1838 $lastFinishedPass = is_numeric($row['last_finished_pass']) ? $row['last_finished_pass'] : -1;
1839
1840 if ($pass < $lastFinishedPass) {
1841 $isActivePass = false;
1842 $must_renumber = true;
1843 } elseif ($pass == $lastFinishedPass) {
1844 $isActivePass = false;
1845
1846 if ($tries == $row['pass']) {
1847 $must_renumber = true;
1848 } else {
1849 $must_renumber = false;
1850 }
1851 } elseif ($pass == $row['pass']) {
1852 $isActivePass = true;
1853 $must_renumber = false;
1854 } else {
1855 throw new ilTestException('This should not happen, please contact Bjoern Heyser to clean up this pass salad!');
1856 }
1857
1858 if (!$this->object->isDynamicTest() && $isActivePass) {
1859 $this->ctrl->redirect($this, 'outUserResultsOverview');
1860 }
1861
1862 if ($pass == 0 && (
1863 ($lastFinishedPass == 0 && $tries == 1 && $tries != $row['pass'])
1864 || ($isActivePass == true) // should be equal to || ($lastFinishedPass == -1 && $tries == 0)
1865 )) {
1866 $last_pass = true;
1867 } else {
1868 $last_pass = false;
1869 }
1870
1871 // Work on tables:
1872 // tst_active
1873 if ($last_pass) {
1874 $ilDB->manipulate(
1875 'DELETE
1876 FROM tst_active
1877 WHERE active_id = ' . $ilDB->quote($active_fi, 'integer')
1878 );
1879 } elseif (!$isActivePass) {
1880 $ilDB->manipulate(
1881 'UPDATE tst_active
1882 SET tries = ' . $ilDB->quote($tries - 1, 'integer') . ',
1883 last_finished_pass = ' . $ilDB->quote($lastFinishedPass - 1, 'integer') . '
1884 WHERE active_id = ' . $ilDB->quote($active_fi, 'integer')
1885 );
1886 }
1887 // tst_manual_fb
1888 $ilDB->manipulate(
1889 'DELETE
1890 FROM tst_manual_fb
1891 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1892 AND pass = ' . $ilDB->quote($pass, 'integer')
1893 );
1894
1895 if ($must_renumber) {
1896 $ilDB->manipulate(
1897 'UPDATE tst_manual_fb
1898 SET pass = pass - 1
1899 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1900 AND pass > ' . $ilDB->quote($pass, 'integer')
1901 );
1902 }
1903
1904 // tst_mark -> nothing to do
1905 //
1906 // tst_pass_result
1907 $ilDB->manipulate(
1908 'DELETE
1909 FROM tst_pass_result
1910 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1911 AND pass = ' . $ilDB->quote($pass, 'integer')
1912 );
1913
1914 if ($must_renumber) {
1915 $ilDB->manipulate(
1916 'UPDATE tst_pass_result
1917 SET pass = pass - 1
1918 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1919 AND pass > ' . $ilDB->quote($pass, 'integer')
1920 );
1921 }
1922
1923 // tst_qst_solved -> nothing to do
1924
1925 // tst_rnd_copy -> nothing to do
1926 // tst_rnd_qpl_title -> nothing to do
1927
1928 // tst_sequence
1929 $ilDB->manipulate(
1930 'DELETE
1931 FROM tst_sequence
1932 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1933 AND pass = ' . $ilDB->quote($pass, 'integer')
1934 );
1935
1936 if ($must_renumber) {
1937 $ilDB->manipulate(
1938 'UPDATE tst_sequence
1939 SET pass = pass - 1
1940 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1941 AND pass > ' . $ilDB->quote($pass, 'integer')
1942 );
1943 }
1944
1945 if ($this->object->isDynamicTest()) {
1946 $tables = array(
1947 'tst_seq_qst_tracking', 'tst_seq_qst_answstatus', 'tst_seq_qst_postponed', 'tst_seq_qst_checked'
1948 );
1949
1950 foreach ($tables as $table) {
1951 $ilDB->manipulate("
1952 DELETE FROM $table
1953 WHERE active_fi = {$ilDB->quote($active_fi, 'integer')}
1954 AND pass = {$ilDB->quote($pass, 'integer')}
1955 ");
1956
1957 if ($must_renumber) {
1958 $ilDB->manipulate("
1959 UPDATE $table
1960 SET pass = pass - 1
1961 WHERE active_fi = {$ilDB->quote($active_fi, 'integer')}
1962 AND pass > {$ilDB->quote($pass, 'integer')}
1963 ");
1964 }
1965 }
1966 }
1967
1968 // tst_solutions
1969 $ilDB->manipulate(
1970 'DELETE
1971 FROM tst_solutions
1972 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1973 AND pass = ' . $ilDB->quote($pass, 'integer')
1974 );
1975
1976 if ($must_renumber) {
1977 $ilDB->manipulate(
1978 'UPDATE tst_solutions
1979 SET pass = pass - 1
1980 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1981 AND pass > ' . $ilDB->quote($pass, 'integer')
1982 );
1983 }
1984
1985 // tst_test_result
1986 $ilDB->manipulate(
1987 'DELETE
1988 FROM tst_test_result
1989 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1990 AND pass = ' . $ilDB->quote($pass, 'integer')
1991 );
1992
1993 if ($must_renumber) {
1994 $ilDB->manipulate(
1995 'UPDATE tst_test_result
1996 SET pass = pass - 1
1997 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
1998 AND pass > ' . $ilDB->quote($pass, 'integer')
1999 );
2000 }
2001
2002 // tst_test_rnd_qst -> nothing to do
2003
2004 // tst_times
2005 $ilDB->manipulate(
2006 'DELETE
2007 FROM tst_times
2008 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
2009 AND pass = ' . $ilDB->quote($pass, 'integer')
2010 );
2011
2012 if ($must_renumber) {
2013 $ilDB->manipulate(
2014 'UPDATE tst_times
2015 SET pass = pass - 1
2016 WHERE active_fi = ' . $ilDB->quote($active_fi, 'integer') . '
2017 AND pass > ' . $ilDB->quote($pass, 'integer')
2018 );
2019 }
2020
2021 require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
2023 $this->object->logAction($this->lng->txtlng("assessment", "log_deleted_pass", ilObjAssessmentFolder::_getLogLanguage()));
2024 }
2025 // tst_result_cache
2026 // Ggfls. nur renumbern.
2027 require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
2029
2030 if ($this->object->isDynamicTest()) {
2031 require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
2033 }
2034
2036 }
2037
2038 protected function getFilteredTestResult($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions)
2039 {
2040 global $DIC;
2041 $ilDB = $DIC['ilDB'];
2042 $ilPluginAdmin = $DIC['ilPluginAdmin'];
2043
2044 $resultData = $this->object->getTestResult($active_id, $pass, false, $considerHiddenQuestions);
2045 $questionIds = array();
2046 foreach ($resultData as $resultItemKey => $resultItemValue) {
2047 if ($resultItemKey === 'test' || $resultItemKey === 'pass') {
2048 continue;
2049 }
2050
2051 $questionIds[] = $resultItemValue['qid'];
2052 }
2053
2054 $table_gui = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
2055 $table_gui->initFilter();
2056
2057 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
2058 $questionList = new ilAssQuestionList($ilDB, $this->lng, $ilPluginAdmin);
2059
2060 $questionList->setIncludeQuestionIdsFilter($questionIds);
2061 $questionList->setQuestionInstanceTypeFilter(null);
2062
2063 foreach ($table_gui->getFilterItems() as $item) {
2064 if (substr($item->getPostVar(), 0, strlen('tax_')) == 'tax_') {
2065 $v = $item->getValue();
2066
2067 if (is_array($v) && count($v) && !(int) $v[0]) {
2068 continue;
2069 }
2070
2071 $taxId = substr($item->getPostVar(), strlen('tax_'));
2072 $questionList->addTaxonomyFilter($taxId, $item->getValue(), $this->object->getId(), 'tst');
2073 } elseif ($item->getValue() !== false) {
2074 $questionList->addFieldFilter($item->getPostVar(), $item->getValue());
2075 }
2076 }
2077
2078 $questionList->load();
2079
2080 $filteredTestResult = array();
2081
2082 foreach ($resultData as $resultItemKey => $resultItemValue) {
2083 if ($resultItemKey === 'test' || $resultItemKey === 'pass') {
2084 continue;
2085 }
2086
2087 if (!$questionList->isInList($resultItemValue['qid'])) {
2088 continue;
2089 }
2090
2091 $filteredTestResult[] = $resultItemValue;
2092 }
2093
2094 return $filteredTestResult;
2095 }
2096
2098 {
2099 global $DIC; /* @var ILIAS\DI\Container $DIC */
2100
2101 $activeId = (int) $_GET["active_id"];
2102
2103 require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
2105
2106 require_once 'Modules/Test/classes/class.ilTestParticipantList.php';
2107 $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
2108 $participantData->setActiveIdsFilter(array($activeId));
2109 $participantData->setParticipantAccessFilter($accessFilter);
2110 $participantData->load($this->object->getTestId());
2111
2112 if (!in_array($activeId, $participantData->getActiveIds())) {
2114 }
2115
2120 if ($this->object->isEndingTimeEnabled() || $this->object->getEnableProcessingTime()) {
2121 if ($this->object->endingTimeReached() == false) {
2122 $starting_time = $this->object->getStartingTimeOfUser($activeId);
2123 if ($this->object->isMaxProcessingTimeReached($starting_time, $activeId) == false) {
2124 ilUtil::sendInfo($this->lng->txt("finish_pass_for_user_in_processing_time"));
2125 }
2126 }
2127 }
2128
2129 require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
2130 $cgui = new ilConfirmationGUI();
2131
2132 $cgui->setHeaderText(sprintf(
2133 $this->lng->txt("finish_pass_for_user_confirmation"),
2134 $participantData->getFormatedFullnameByActiveId($activeId)
2135 ));
2136
2137 $this->ctrl->setParameter($this, 'active_id', $activeId);
2138 $cgui->setFormAction($this->ctrl->getFormAction($this, "participants"));
2139
2140 $cgui->setCancel($this->lng->txt("cancel"), "redirectBackToParticipantsScreen");
2141 $cgui->setConfirm($this->lng->txt("proceed"), "confirmFinishTestPassForUser");
2142
2143 $this->tpl->setContent($cgui->getHTML());
2144 }
2145
2147 {
2148 global $DIC; /* @var ILIAS\DI\Container $DIC */
2149
2150 $activeId = (int) $_GET["active_id"];
2151
2152 require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
2154
2155 require_once 'Modules/Test/classes/class.ilTestParticipantList.php';
2156 $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
2157 $participantData->setActiveIdsFilter(array($activeId));
2158 $participantData->setParticipantAccessFilter($accessFilter);
2159 $participantData->load($this->object->getTestId());
2160
2161 if (in_array($activeId, $participantData->getActiveIds())) {
2162 $this->finishTestPass($activeId, $this->object->getId());
2163 }
2164
2166 }
2167
2168 public function finishAllUserPasses()
2169 {
2174 if ($this->object->isEndingTimeEnabled() || $this->object->getEnableProcessingTime()) {
2175 if ($this->object->endingTimeReached() == false) {
2176
2178 $participantList = new ilTestParticipantList($this->object);
2179 $participantList->initializeFromDbRows($this->object->getTestParticipants());
2180 $participantList = $participantList->getAccessFilteredList($accessFilter);
2181
2182 foreach ($participantList as $participant) {
2183 if (!$participant->hasUnfinishedPasses()) {
2184 continue;
2185 }
2186 $starting_time = $this->object->getStartingTimeOfUser($participant->getActiveId());
2187 if ($this->object->isMaxProcessingTimeReached($starting_time, $participant->getActiveId()) == false) {
2188 ilUtil::sendFailure($this->lng->txt("finish_pass_for_all_users_in_processing_time"), true);
2190 }
2191 }
2192 }
2193 }
2194
2195 require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
2196 $cgui = new ilConfirmationGUI();
2197 $cgui->setFormAction($this->ctrl->getFormAction($this));
2198 $cgui->setHeaderText($this->lng->txt("finish_pass_for_all_users"));
2199 $cgui->setCancel($this->lng->txt("cancel"), "redirectBackToParticipantsScreen");
2200 $cgui->setConfirm($this->lng->txt("proceed"), "confirmFinishTestPassForAllUser");
2201 $this->tpl->setContent($cgui->getHTML());
2202 }
2203
2205 {
2206 require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
2208
2209 require_once 'Modules/Test/classes/class.ilTestParticipantList.php';
2210 $participantList = new ilTestParticipantList($this->object);
2211 $participantList->initializeFromDbRows($this->object->getTestParticipants());
2212 $participantList = $participantList->getAccessFilteredList($accessFilter);
2213
2214 foreach ($participantList as $participant) {
2215 if (!$participant->hasUnfinishedPasses()) {
2216 continue;
2217 }
2218
2219 $this->finishTestPass($participant->getActiveId(), $this->object->getId());
2220 }
2221
2223 }
2224
2225 protected function finishTestPass($active_id, $obj_id)
2226 {
2227 $processLocker = $this->processLockerFactory->withContextId((int) $active_id)->getLocker();
2228
2229 $test_pass_finisher = new ilTestPassFinishTasks($active_id, $obj_id);
2230 $test_pass_finisher->performFinishTasks($processLocker);
2231 }
2232
2234 {
2235 $this->ctrl->redirectByClass("ilTestParticipantsGUI");
2236 }
2237}
$result
$filename
Definition: buildRTE.php:89
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
static _updateTestResultCache($active_id, ilAssQuestionProcessLocker $processLocker=null)
@TODO Move this to a proper place.
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
Validates if an active certificate is stored in the database and can be downloaded by the user.
Just a wrapper class to create Unit Test for other classes.
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
TableGUI class for evaluation of all users.
Base class for ILIAS Exception handling.
static getInstance(ilTestSession $a_test_session)
static getInstance()
Factory.
This class represents a non editable value in a property form.
static _getLogLanguage()
retrieve the log language for assessment logging
static _enabledAssessmentLogging()
check wether assessment logging is enabled or not
static accessViolationRedirect()
static _getResultPass($active_id)
Retrieves the pass number that should be counted for a given user.
static lookupExamId($active_id, $pass)
static lookupLastTestPassAccess($activeId, $passIndex)
static lookupPassResultsUpdateTimestamp($active_id, $pass)
static _lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
static _lookupName($a_user_id)
lookup user name
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
This class represents a property form user interface.
TableGUI class for results by question.
This class represents a selection list property in a property form.
ILIAS Setting Class.
static getInstance()
Factory.
special template class to simplify handling of ITX/PEAR
Output class for assessment test evaluation.
exportFileUploadsForAllParticipants()
Creates a ZIP file containing all file uploads for a given question in a test.
outEvaluation()
Creates the evaluation output for the test.
outCertificate()
Output of a test certificate.
singleResults()
Creates user results for single questions.
outUserPassDetails()
Output of the pass details of an existing test pass for the active test participant.
passDetails()
Output of the learners view of an existing test pass.
__construct(ilObjTest $a_object)
ilTestEvaluationGUI constructor
exportCertificate()
Exports the user results as PDF certificates using XSL-FO via XML:RPC calls.
eval_a()
Output of anonymous aggregated results for the test.
exportAggregatedResults()
Exports the aggregated results.
detailedEvaluation()
Creates the detailed evaluation output for a selected participant.
outUserListOfAnswerPasses()
Output of the pass overview for a user when he/she wants to see his/her list of answers.
exportQuestionForAllParticipants()
Creates a PDF representation of the answers for a given question in a test.
outParticipantsPassDetails()
Output of the pass details of an existing test pass for the test statistics.
getEvaluationQuestionId($question_id, $original_id="")
Returns the ID of a question for evaluation purposes.
outUserResultsOverview()
Output of the pass overview for a test called by a test participant.
exportEvaluation()
Exports the evaluation data to a selected file format.
getFilteredTestResult($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions)
outParticipantsResultsOverview()
Output of the pass overview for a test called from the statistics.
finishTestPass($active_id, $obj_id)
Base Exception for all Exceptions relating to Modules/Test.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
Class ilTestPassFinishTasks.
Service GUI class for tests.
populateExamId(ilTemplate $tpl, int $activeId, int $pass)
populatePassFinishDate($tpl, $passFinishDate)
getResultsSignature()
Returns HTML code for a signature field.
getCommand($cmd)
Retrieves the ilCtrl command.
buildPassOverviewTableGUI($targetGUI)
getQuestionResultForTestUsers($question_id, $test_id)
Creates a HTML representation for the results of a given question in a test.
setContextResultPresentation($contextResultPresentation)
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
getPassOverviewTableData(ilTestSession $testSession, $passes, $withResults)
getPassListOfAnswers(&$result_array, $active_id, $pass, $show_solutions=false, $only_answered_questions=false, $show_question_only=false, $show_reached_points=false, $anchorNav=false, ilTestQuestionRelatedObjectivesList $objectivesList=null, ilTestResultHeaderLabelBuilder $testResultHeaderLabelBuilder=null)
Returns the list of answers of a users test pass.
getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, $overwrite_anonymity=false)
Returns the user data for a test results output.
getPassDetailsOverviewTableGUI($result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav, ilTestQuestionRelatedObjectivesList $objectivesList=null, $multipleObjectivesInvolved=true)
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const SCORE_BEST_PASS
const PDF_USER_RESULT
PDF Purposes.
Interface ilObjFileHandlingQuestionType.
if($format !==null) $name
Definition: metadata.php:230
$i
Definition: metadata.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilPdfGeneratorConstantsTest.
$ret
Definition: parser.php:6
global $ilDB
$data
Definition: storeScorm.php:23
$ilUser
Definition: imgupload.php:18
$context
Definition: webdav.php:26
$DIC
Definition: xapitoken.php:46
$rows
Definition: xhr_table.php:10