ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilTestServiceGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
5include_once 'Modules/Test/classes/class.ilTestService.php';
6
22{
26 public $object = null;
27
31 public $service = null;
32
36 protected $db;
37
38 public $lng;
39 public $tpl;
40
44 public $ctrl;
45
49 protected $tabs;
50
54 protected $objCache;
55
56 public $ilias;
57 public $tree;
58 public $ref_id;
59
65 protected $testSessionFactory = null;
66
72 protected $testSequenceFactory = null;
73
78
83
85
90 {
92 }
93
98 {
99 $this->contextResultPresentation = $contextResultPresentation;
100 }
101
108 public function __construct(ilObjTest $a_object)
109 {
110 global $lng, $tpl, $ilCtrl, $ilias, $tree, $ilDB, $ilPluginAdmin, $ilTabs, $ilObjDataCache;
111
112 $this->db = $ilDB;
113 $this->lng =&$lng;
114 $this->tpl =&$tpl;
115 $this->ctrl =&$ilCtrl;
116 $this->tabs = $ilTabs;
117 $this->objCache = $ilObjDataCache;
118 $this->ilias =&$ilias;
119 $this->object =&$a_object;
120 $this->tree =&$tree;
121 $this->ref_id = $a_object->ref_id;
122
123 $this->service = new ilTestService($a_object);
124
125 require_once 'Modules/Test/classes/class.ilTestSessionFactory.php';
126 $this->testSessionFactory = new ilTestSessionFactory($this->object);
127
128 require_once 'Modules/Test/classes/class.ilTestSequenceFactory.php';
129 $this->testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
130
131 $this->objectiveOrientedContainer = null;
132 }
133
138 {
139 $this->participantData = $participantData;
140 }
141
145 public function getParticipantData()
146 {
148 }
149
155 public function getPassOverviewTableData(ilTestSession $testSession, $passes, $withResults)
156 {
157 $data = array();
158
159 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
160 $considerHiddenQuestions = false;
161
162 require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
163 $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
164 } else {
165 $considerHiddenQuestions = true;
166 }
167
168 $scoredPass = $this->object->_getResultPass($testSession->getActiveId());
169
170 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
172 $testSession->getActiveId()
173 );
174
175 foreach ($passes as $pass) {
176 $row = array();
177
178 $considerOptionalQuestions = true;
179
180 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
181 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($testSession->getActiveId(), $pass);
182
183 $testSequence->loadFromDb();
184 $testSequence->loadQuestions();
185
186 if ($this->object->isRandomTest() && !$testSequence->isAnsweringOptionalQuestionsConfirmed()) {
187 $considerOptionalQuestions = false;
188 }
189
190 $testSequence->setConsiderHiddenQuestionsEnabled($considerHiddenQuestions);
191 $testSequence->setConsiderOptionalQuestionsEnabled($considerOptionalQuestions);
192
193 $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
194 $objectivesList->loadObjectivesTitles();
195
196 $row['objectives'] = $objectivesList->getUniqueObjectivesStringForQuestions($testSequence->getUserSequenceQuestions());
197 }
198
199 if ($withResults) {
200 $result_array = $this->object->getTestResult($testSession->getActiveId(), $pass, false, $considerHiddenQuestions, $considerOptionalQuestions);
201
202 foreach ($result_array as $resultStructKEY => $question) {
203 if ($resultStructKEY === 'test' || $resultStructKEY === 'pass') {
204 continue;
205 }
206
207 $requestData = $questionHintRequestRegister->getRequestByTestPassIndexAndQuestionId($pass, $question['qid']);
208
209 if ($requestData instanceof ilAssQuestionHintRequestStatisticData && $result_array[$resultStructKEY]['requested_hints'] === null) {
210 $result_array['pass']['total_requested_hints'] += $requestData->getRequestsCount();
211
212 $result_array[$resultStructKEY]['requested_hints'] = $requestData->getRequestsCount();
213 $result_array[$resultStructKEY]['hint_points'] = $requestData->getRequestsPoints();
214 }
215 }
216
217 if (!$result_array['pass']['total_max_points']) {
218 $percentage = 0;
219 } else {
220 $percentage = ($result_array['pass']['total_reached_points'] / $result_array['pass']['total_max_points']) * 100;
221 }
222 $total_max = $result_array['pass']['total_max_points'];
223 $total_reached = $result_array['pass']['total_reached_points'];
224 $total_requested_hints = $result_array['pass']['total_requested_hints'];
225 }
226
227 if ($withResults) {
228 $row['scored'] = ($pass == $scoredPass);
229 }
230
231 $row['pass'] = $pass;
232 $row['date'] = ilObjTest::lookupLastTestPassAccess($testSession->getActiveId(), $pass);
233 if ($withResults) {
234 $row['num_workedthrough_questions'] = $result_array['pass']['num_workedthrough'];
235 $row['num_questions_total'] = $result_array['pass']['num_questions_total'];
236
237 if ($this->object->isOfferingQuestionHintsEnabled()) {
238 $row['hints'] = $total_requested_hints;
239 }
240
241 $row['reached_points'] = $total_reached;
242 $row['max_points'] = $total_max;
243 $row['percentage'] = $percentage;
244 }
245
246 $data[] = $row;
247 }
248
249 return $data;
250 }
251
256 {
257 $this->objectiveOrientedContainer = $objectiveOrientedContainer;
258 }
259
264 {
266 }
267
271 public function executeCommand()
272 {
273 $cmd = $this->ctrl->getCmd();
274 $next_class = $this->ctrl->getNextClass($this);
275
276 $cmd = $this->getCommand($cmd);
277 switch ($next_class) {
278 default:
279 $ret =&$this->$cmd();
280 break;
281 }
282 return $ret;
283 }
284
290 public function getCommand($cmd)
291 {
292 return $cmd;
293 }
294
295 protected function handleTabs($activeTabId)
296 {
297 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
298 require_once 'Services/Link/classes/class.ilLink.php';
299 $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId());
300 $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink);
301
302 $this->tabs->addTab(
303 'results_pass_oriented',
304 $this->lng->txt('tst_tab_results_pass_oriented'),
305 $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'outUserResultsOverview')
306 );
307
308 $this->tabs->addTab(
309 'results_objective_oriented',
310 $this->lng->txt('tst_tab_results_objective_oriented'),
311 $this->ctrl->getLinkTargetByClass('ilTestEvalObjectiveOrientedGUI', 'showVirtualPass')
312 );
313
314 $this->tabs->setTabActive($activeTabId);
315 }
316 }
317
321 protected function isPdfDeliveryRequest()
322 {
323 if (!isset($_GET['pdf'])) {
324 return false;
325 }
326
327 if (!(bool) $_GET['pdf']) {
328 return false;
329 }
330
331 return true;
332 }
333
337 public function buildPassOverviewTableGUI($targetGUI, $targetCmd = '')
338 {
339 require_once 'Modules/Test/classes/tables/class.ilTestPassOverviewTableGUI.php';
340
341 $table = new ilTestPassOverviewTableGUI($targetGUI, $targetCmd);
342
343 $table->setPdfPresentationEnabled(
344 isset($_GET['pdf']) && $_GET['pdf'] == 1
345 );
346
347 $table->setObjectiveOrientedPresentationEnabled(
348 $this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
349 );
350
351 return $table;
352 }
353
364 public function 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)
365 {
366 $maintemplate = new ilTemplate("tpl.il_as_tst_list_of_answers.html", true, true, "Modules/Test");
367
368 $counter = 1;
369 // output of questions with solutions
370 foreach ($result_array as $question_data) {
371 if (($question_data["workedthrough"] == 1) || ($only_answered_questions == false)) {
372 $template = new ilTemplate("tpl.il_as_qpl_question_printview.html", true, true, "Modules/TestQuestionPool");
373 $question = $question_data["qid"];
374 if (is_numeric($question)) {
375 $maintemplate->setCurrentBlock("printview_question");
376 $question_gui = $this->object->createQuestionGUI("", $question);
377 if (is_object($question_gui)) {
378 if ($this->isPdfDeliveryRequest()) {
379 $question_gui->setRenderPurpose(assQuestionGUI::RENDER_PURPOSE_PRINT_PDF);
380 }
381
382 if ($anchorNav) {
383 $template->setCurrentBlock('block_id');
384 $template->setVariable('BLOCK_ID', "detailed_answer_block_act_{$active_id}_qst_{$question}");
385 $template->parseCurrentBlock();
386
387 $template->setCurrentBlock('back_anchor');
388 $template->setVariable('HREF_BACK_ANCHOR', "#pass_details_tbl_row_act_{$active_id}_qst_{$question}");
389 $template->setVariable('TXT_BACK_ANCHOR', $this->lng->txt('tst_back_to_question_list'));
390 $template->parseCurrentBlock();
391 }
392
393 if ($show_reached_points) {
394 $template->setCurrentBlock("result_points");
395 $template->setVariable("RESULT_POINTS", $this->lng->txt("tst_reached_points") . ": " . $question_gui->object->getReachedPoints($active_id, $pass) . " " . $this->lng->txt("of") . " " . $question_gui->object->getMaximumPoints());
396 $template->parseCurrentBlock();
397 }
398 $template->setVariable("COUNTER_QUESTION", $counter . ". ");
399 $template->setVariable("TXT_QUESTION_ID", $this->lng->txt('question_id_short'));
400 $template->setVariable("QUESTION_ID", $question_gui->object->getId());
401 $template->setVariable("QUESTION_TITLE", $this->object->getQuestionTitle($question_gui->object->getTitle()));
402
403 if ($objectivesList !== null) {
404 $objectives = $this->lng->txt('tst_res_lo_objectives_header') . ': ';
405 $objectives .= $objectivesList->getQuestionRelatedObjectiveTitles($question_gui->object->getId());
406 $template->setVariable("OBJECTIVES", $objectives);
407 }
408
409 $show_question_only = ($this->object->getShowSolutionAnswersOnly()) ? true : false;
410
411 $showFeedback = $this->isContextResultPresentation() && $this->object->getShowSolutionFeedback();
412 $show_solutions = $this->isContextResultPresentation() && $show_solutions;
413
414 if ($show_solutions) {
415 $compare_template = new ilTemplate('tpl.il_as_tst_answers_compare.html', true, true, 'Modules/Test');
416 $compare_template->setVariable("HEADER_PARTICIPANT", $this->lng->txt('tst_header_participant'));
417 $compare_template->setVariable("HEADER_SOLUTION", $this->lng->txt('tst_header_solution'));
418 $result_output = $question_gui->getSolutionOutput($active_id, $pass, $show_solutions, false, $show_question_only, $showFeedback);
419 $best_output = $question_gui->getSolutionOutput($active_id, $pass, false, false, $show_question_only, false, true);
420
421 $compare_template->setVariable('PARTICIPANT', $result_output);
422 $compare_template->setVariable('SOLUTION', $best_output);
423 $template->setVariable('SOLUTION_OUTPUT', $compare_template->get());
424 } else {
425 $result_output = $question_gui->getSolutionOutput($active_id, $pass, $show_solutions, false, $show_question_only, $showFeedback);
426 $template->setVariable('SOLUTION_OUTPUT', $result_output);
427 }
428
429 $maintemplate->setCurrentBlock("printview_question");
430 $maintemplate->setVariable("QUESTION_PRINTVIEW", $template->get());
431 $maintemplate->parseCurrentBlock();
432 $counter++;
433 }
434 }
435 }
436 }
437
438 if ($testResultHeaderLabelBuilder !== null) {
439 if ($pass !== null) {
440 $headerText = $testResultHeaderLabelBuilder->getListOfAnswersHeaderLabel($pass + 1);
441 } else {
442 $headerText = $testResultHeaderLabelBuilder->getVirtualListOfAnswersHeaderLabel();
443 }
444 } else {
445 $headerText = '';
446 }
447
448 $maintemplate->setVariable("RESULTS_OVERVIEW", $headerText);
449 return $maintemplate->get();
450 }
451
464 public function getPassListOfAnswersWithScoring(&$result_array, $active_id, $pass, $show_solutions = false)
465 {
466 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
467
468 $maintemplate = new ilTemplate("tpl.il_as_tst_list_of_answers.html", true, true, "Modules/Test");
469
470 include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php";
472
473 $counter = 1;
474 // output of questions with solutions
475 foreach ($result_array as $question_data) {
476 $question = $question_data["qid"];
477 if (is_numeric($question)) {
478 $question_gui = $this->object->createQuestionGUI("", $question);
479 if (in_array($question_gui->object->getQuestionTypeID(), $scoring)) {
480 $template = new ilTemplate("tpl.il_as_qpl_question_printview.html", true, true, "Modules/TestQuestionPool");
481 $scoretemplate = new ilTemplate("tpl.il_as_tst_manual_scoring_points.html", true, true, "Modules/Test");
482 #mbecker: No such block. $this->tpl->setCurrentBlock("printview_question");
483 $template->setVariable("COUNTER_QUESTION", $counter . ". ");
484 $template->setVariable("QUESTION_TITLE", $this->object->getQuestionTitle($question_gui->object->getTitle()));
485 $points = $question_gui->object->getMaximumPoints();
486 if ($points == 1) {
487 $template->setVariable("QUESTION_POINTS", $points . " " . $this->lng->txt("point"));
488 } else {
489 $template->setVariable("QUESTION_POINTS", $points . " " . $this->lng->txt("points"));
490 }
491
492 $show_question_only = ($this->object->getShowSolutionAnswersOnly()) ? true : false;
493 $result_output = $question_gui->getSolutionOutput($active_id, $pass, $show_solutions, false, $show_question_only, $this->object->getShowSolutionFeedback(), false, true);
494
495 $solout = $question_gui->object->getSuggestedSolutionOutput();
496 if (strlen($solout)) {
497 $scoretemplate->setCurrentBlock("suggested_solution");
498 $scoretemplate->setVariable("TEXT_SUGGESTED_SOLUTION", $this->lng->txt("solution_hint"));
499 $scoretemplate->setVariable("VALUE_SUGGESTED_SOLUTION", $solout);
500 $scoretemplate->parseCurrentBlock();
501 }
502
503 $scoretemplate->setCurrentBlock("feedback");
504 $scoretemplate->setVariable("FEEDBACK_NAME_INPUT", $question);
505 $feedback = $this->object->getManualFeedback($active_id, $question, $pass);
506 $scoretemplate->setVariable("VALUE_FEEDBACK", ilUtil::prepareFormOutput($this->object->prepareTextareaOutput($feedback, true)));
507 $scoretemplate->setVariable("TEXT_MANUAL_FEEDBACK", $this->lng->txt("set_manual_feedback"));
508 $scoretemplate->parseCurrentBlock();
509
510 $scoretemplate->setVariable("NAME_INPUT", $question);
511 $this->ctrl->setParameter($this, "active_id", $active_id);
512 $this->ctrl->setParameter($this, "pass", $pass);
513 $scoretemplate->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "manscoring"));
514 $scoretemplate->setVariable("LABEL_INPUT", $this->lng->txt("tst_change_points_for_question"));
515 $scoretemplate->setVariable("VALUE_INPUT", " value=\"" . assQuestion::_getReachedPoints($active_id, $question_data["qid"], $pass) . "\"");
516 $scoretemplate->setVariable("VALUE_SAVE", $this->lng->txt("save"));
517
518 $template->setVariable("SOLUTION_OUTPUT", $result_output);
519 $maintemplate->setCurrentBlock("printview_question");
520 $maintemplate->setVariable("QUESTION_PRINTVIEW", $template->get());
521 $maintemplate->setVariable("QUESTION_SCORING", $scoretemplate->get());
522 $maintemplate->parseCurrentBlock();
523 }
524 $counter++;
525 }
526 }
527 if ($counter == 1) {
528 // no scorable questions found
529 $maintemplate->setVariable("NO_QUESTIONS_FOUND", $this->lng->txt("manscoring_questions_not_found"));
530 }
531 $maintemplate->setVariable("RESULTS_OVERVIEW", sprintf($this->lng->txt("manscoring_results_pass"), $pass+1));
532
533 include_once "./Services/YUI/classes/class.ilYuiUtil.php";
535
536 return $maintemplate->get();
537 }
538
539 protected function getPassDetailsOverviewTableGUI($result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav, ilTestQuestionRelatedObjectivesList $objectivesList = null, $multipleObjectivesInvolved = true)
540 {
541 $this->ctrl->setParameter($targetGUI, 'active_id', $active_id);
542 $this->ctrl->setParameter($targetGUI, 'pass', $pass);
543
544 $tableGUI = $this->buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD);
545
546 if (!$this->isPdfDeliveryRequest()) {
547 $tableGUI->setAnswerListAnchorEnabled($questionAnchorNav);
548 }
549
550 $tableGUI->setSingleAnswerScreenCmd($questionDetailsCMD);
551 $tableGUI->setShowHintCount($this->object->isOfferingQuestionHintsEnabled());
552
553 if ($objectivesList !== null) {
554 $tableGUI->setQuestionRelatedObjectivesList($objectivesList);
555 $tableGUI->setObjectiveOrientedPresentationEnabled(true);
556 }
557
558 $tableGUI->setMultipleObjectivesInvolved($multipleObjectivesInvolved);
559
560 $tableGUI->setActiveId($active_id);
561 $tableGUI->setShowSuggestedSolution(false);
562
563 $usersQuestionSolutions = array();
564
565 foreach ($result_array as $key => $val) {
566 if ($key === 'test' || $key === 'pass') {
567 continue;
568 }
569
570 if ($this->object->getShowSolutionSuggested() && strlen($val['solution'])) {
571 $tableGUI->setShowSuggestedSolution(true);
572 }
573
574 if (isset($val['pass'])) {
575 $tableGUI->setPassColumnEnabled(true);
576 }
577
578 $usersQuestionSolutions[$key] = $val;
579 }
580
581 $tableGUI->initColumns()->initFilter();
582
583 $tableGUI->setFilterCommand($targetCMD . 'SetTableFilter');
584 $tableGUI->setResetCommand($targetCMD . 'ResetTableFilter');
585
586 $tableGUI->setData($usersQuestionSolutions);
587
588 return $tableGUI;
589 }
590
597 public function getResultsSignature()
598 {
599 if ($this->object->getShowSolutionSignature() && !$this->object->getAnonymity()) {
600 $template = new ilTemplate("tpl.il_as_tst_results_userdata_signature.html", true, true, "Modules/Test");
601 $template->setVariable("TXT_DATE", $this->lng->txt("date"));
604 $template->setVariable("VALUE_DATE", ilDatePresentation::formatDate(new ilDate(time(), IL_CAL_UNIX)));
606 $template->setVariable("TXT_SIGNATURE", $this->lng->txt("tst_signature"));
607 $template->setVariable("IMG_SPACER", ilUtil::getImagePath("spacer.png"));
608 return $template->get();
609 } else {
610 return "";
611 }
612 }
613
623 public function getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, $overwrite_anonymity = false)
624 {
625 if (!is_object($testSession)) {
626 throw new TestException();
627 }
628 $template = new ilTemplate("tpl.il_as_tst_results_userdata.html", true, true, "Modules/Test");
629 include_once './Services/User/classes/class.ilObjUser.php';
630 $user_id = $this->object->_getUserIdFromActiveId($active_id);
631 if (strlen(ilObjUser::_lookupLogin($user_id)) > 0) {
632 $user = new ilObjUser($user_id);
633 } else {
634 $user = new ilObjUser();
635 $user->setLastname($this->lng->txt("deleted_user"));
636 }
637 $t = $testSession->getSubmittedTimestamp();
638 if (!$t) {
639 $t = $this->object->_getLastAccess($testSession->getActiveId());
640 }
641
642 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
643 $uname = $this->object->userLookupFullName($user_id, $overwrite_anonymity);
644 $template->setCurrentBlock("name");
645 $template->setVariable('TXT_USR_NAME', $this->lng->txt("name"));
646 $template->setVariable('VALUE_USR_NAME', $uname);
647 $template->parseCurrentBlock();
648 }
649
650 $title_matric = "";
651 if (strlen($user->getMatriculation()) && (($this->object->getAnonymity() == false) || ($overwrite_anonymity))) {
652 $template->setCurrentBlock("matriculation");
653 $template->setVariable("TXT_USR_MATRIC", $this->lng->txt("matriculation"));
654 $template->setVariable("VALUE_USR_MATRIC", $user->getMatriculation());
655 $template->parseCurrentBlock();
656 $title_matric = " - " . $this->lng->txt("matriculation") . ": " . $user->getMatriculation();
657 }
658
659 $invited_user = array_pop($this->object->getInvitedUsers($user_id));
660 if (strlen($invited_user["clientip"])) {
661 $template->setCurrentBlock("client_ip");
662 $template->setVariable("TXT_CLIENT_IP", $this->lng->txt("client_ip"));
663 $template->setVariable("VALUE_CLIENT_IP", $invited_user["clientip"]);
664 $template->parseCurrentBlock();
665 $title_client = " - " . $this->lng->txt("clientip") . ": " . $invited_user["clientip"];
666 }
667
668 $template->setVariable("TXT_TEST_TITLE", $this->lng->txt("title"));
669 $template->setVariable("VALUE_TEST_TITLE", $this->object->getTitle());
670
671 // change the pagetitle (tab title or title in title bar of window)
672 $pagetitle = $this->object->getTitle() . $title_matric . $title_client;
673 $this->tpl->setHeaderPageTitle($pagetitle);
674
675 return $template->get();
676 }
677
687 public function getCorrectSolutionOutput($question_id, $active_id, $pass, ilTestQuestionRelatedObjectivesList $objectivesList = null)
688 {
689 global $ilUser;
690
691 $test_id = $this->object->getTestId();
692 $question_gui = $this->object->createQuestionGUI("", $question_id);
693
694 if ($this->isPdfDeliveryRequest()) {
695 $question_gui->setRenderPurpose(assQuestionGUI::RENDER_PURPOSE_PRINT_PDF);
696 }
697
698 $template = new ilTemplate("tpl.il_as_tst_correct_solution_output.html", true, true, "Modules/Test");
699 $show_question_only = ($this->object->getShowSolutionAnswersOnly()) ? true : false;
700 $result_output = $question_gui->getSolutionOutput($active_id, $pass, true, false, $show_question_only, $this->object->getShowSolutionFeedback(), false, false, true);
701 $best_output = $question_gui->getSolutionOutput($active_id, $pass, false, false, $show_question_only, false, true, false, false);
702 if ($this->object->getShowSolutionFeedback() && $_GET['cmd'] != 'outCorrectSolution') {
703 $specificAnswerFeedback = $question_gui->getSpecificFeedbackOutput($active_id, $pass);
704 if (strlen($specificAnswerFeedback)) {
705 $template->setCurrentBlock("outline_specific_feedback");
706 $template->setVariable("OUTLINE_SPECIFIC_FEEDBACK", $specificAnswerFeedback);
707 $template->parseCurrentBlock();
708 }
709 }
710 if ($this->object->isBestSolutionPrintedWithResult() && strlen($best_output)) {
711 $template->setCurrentBlock("best_solution");
712 $template->setVariable("TEXT_BEST_SOLUTION", $this->lng->txt("tst_best_solution_is"));
713 $template->setVariable("BEST_OUTPUT", $best_output);
714 $template->parseCurrentBlock();
715 }
716 $template->setVariable("TEXT_YOUR_SOLUTION", $this->lng->txt("tst_your_answer_was"));
717 $maxpoints = $question_gui->object->getMaximumPoints();
718 if ($maxpoints == 1) {
719 $template->setVariable("QUESTION_TITLE", $this->object->getQuestionTitle($question_gui->object->getTitle()) . " (" . $maxpoints . " " . $this->lng->txt("point") . ")");
720 } else {
721 $template->setVariable("QUESTION_TITLE", $this->object->getQuestionTitle($question_gui->object->getTitle()) . " (" . $maxpoints . " " . $this->lng->txt("points") . ")");
722 }
723 if ($objectivesList !== null) {
724 $objectives = $this->lng->txt('tst_res_lo_objectives_header') . ': ';
725 $objectives .= $objectivesList->getQuestionRelatedObjectiveTitles($question_gui->object->getId());
726 $template->setVariable('OBJECTIVES', $objectives);
727 }
728 $template->setVariable("SOLUTION_OUTPUT", $result_output);
729 $template->setVariable("RECEIVED_POINTS", sprintf($this->lng->txt("you_received_a_of_b_points"), $question_gui->object->getReachedPoints($active_id, $pass), $maxpoints));
730 $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
731 $template->setVariable("BACKLINK_TEXT", "&lt;&lt; " . $this->lng->txt("back"));
732 return $template->get();
733 }
734
747 public function getResultsOfUserOutput($testSession, $active_id, $pass, $targetGUI, $show_pass_details = true, $show_answers = true, $show_question_only = false, $show_reached_points = false)
748 {
749 global $ilObjDataCache;
750
751 include_once("./Services/UICore/classes/class.ilTemplate.php");
752 $template = new ilTemplate("tpl.il_as_tst_results_participant.html", true, true, "Modules/Test");
753
754 if ($this->participantData instanceof ilTestParticipantData) {
755 $user_id = $this->participantData->getUserIdByActiveId($active_id);
756 $uname = $this->participantData->getConcatedFullnameByActiveId($active_id, false);
757 } else {
758 $user_id = $this->object->_getUserIdFromActiveId($active_id);
759 $uname = $this->object->userLookupFullName($user_id, true);
760 }
761
762 if (((array_key_exists("pass", $_GET)) && (strlen($_GET["pass"]) > 0)) || (!is_null($pass))) {
763 if (is_null($pass)) {
764 $pass = $_GET["pass"];
765 }
766 }
767
768 if (!is_null($pass)) {
769 require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
770 $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
771
772 $objectivesList = null;
773
774 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
775 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($active_id, $pass);
776 $testSequence->loadFromDb();
777 $testSequence->loadQuestions();
778
779 require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
780 $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
781
782 $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
783 $objectivesList->loadObjectivesTitles();
784
785 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
786 $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
787 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
788 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
789 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
790 }
791
792 $result_array = $this->object->getTestResult(
793 $active_id,
794 $pass,
795 false,
796 !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
797 );
798
799 $user_id = $this->object->_getUserIdFromActiveId($active_id);
800 $showAllAnswers = true;
801 if ($this->object->isExecutable($testSession, $user_id)) {
802 $showAllAnswers = false;
803 }
804 if ($show_answers) {
805 $list_of_answers = $this->getPassListOfAnswers(
806 $result_array,
807 $active_id,
808 $pass,
809 $_SESSION['tst_results_show_best_solutions'],
810 $showAllAnswers,
811 $show_question_only,
812 $show_reached_points,
813 $show_pass_details,
814 $objectivesList,
815 $testResultHeaderLabelBuilder
816 );
817 $template->setVariable("LIST_OF_ANSWERS", $list_of_answers);
818 }
819
820 if ($show_pass_details) {
821 $overviewTableGUI = $this->getPassDetailsOverviewTableGUI($result_array, $active_id, $pass, $targetGUI, "getResultsOfUserOutput", '', $show_answers, $objectivesList);
822 $overviewTableGUI->setTitle($testResultHeaderLabelBuilder->getPassDetailsHeaderLabel($pass + 1));
823 $template->setVariable("PASS_DETAILS", $overviewTableGUI->getHTML());
824 }
825
826 $signature = $this->getResultsSignature();
827 $template->setVariable("SIGNATURE", $signature);
828
829 if ($this->object->isShowExamIdInTestResultsEnabled()) {
830 $template->setCurrentBlock('exam_id_footer');
831 $template->setVariable('EXAM_ID_VAL', ilObjTest::lookupExamId(
832 $testSession->getActiveId(),
833 $pass
834 ));
835 $template->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
836 $template->parseCurrentBlock();
837 }
838 }
839
840 $template->setCurrentBlock('participant_back_anchor');
841 $template->setVariable("HREF_PARTICIPANT_BACK_ANCHOR", "#tst_results_toolbar");
842 $template->setVariable("TXT_PARTICIPANT_BACK_ANCHOR", $this->lng->txt('tst_back_to_top'));
843 $template->parseCurrentBlock();
844
845 $template->setCurrentBlock('participant_block_id');
846 $template->setVariable("PARTICIPANT_BLOCK_ID", "participant_active_{$active_id}");
847 $template->parseCurrentBlock();
848
849 if ($this->isGradingMessageRequired()) {
850 $gradingMessageBuilder = $this->getGradingMessageBuilder($active_id);
851 $gradingMessageBuilder->buildList();
852
853 $template->setCurrentBlock('grading_message');
854 $template->setVariable('GRADING_MESSAGE', $gradingMessageBuilder->getList());
855 $template->parseCurrentBlock();
856 }
857
858
859 $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, true);
860 $template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name"), $uname));
861 $template->setVariable("USER_DATA", $user_data);
862
864
865 return $template->get();
866 }
867
875 public function getResultsHeadUserAndPass($active_id, $pass)
876 {
877 $template = new ilTemplate("tpl.il_as_tst_results_head_user_pass.html", true, true, "Modules/Test");
878 include_once './Services/User/classes/class.ilObjUser.php';
879 $user_id = $this->object->_getUserIdFromActiveId($active_id);
880 if (strlen(ilObjUser::_lookupLogin($user_id)) > 0) {
881 $user = new ilObjUser($user_id);
882 } else {
883 $user = new ilObjUser();
884 $user->setLastname($this->lng->txt("deleted_user"));
885 }
886 $title_matric = "";
887 if (strlen($user->getMatriculation()) && (($this->object->getAnonymity() == false))) {
888 $template->setCurrentBlock("user_matric");
889 $template->setVariable("TXT_USR_MATRIC", $this->lng->txt("matriculation"));
890 $template->parseCurrentBlock();
891 $template->setCurrentBlock("user_matric_value");
892 $template->setVariable("VALUE_USR_MATRIC", $user->getMatriculation());
893 $template->parseCurrentBlock();
894 $template->touchBlock("user_matric_separator");
895 $title_matric = " - " . $this->lng->txt("matriculation") . ": " . $user->getMatriculation();
896 }
897
898 $invited_user = array_pop($this->object->getInvitedUsers($user_id));
899 if (strlen($invited_user["clientip"])) {
900 $template->setCurrentBlock("user_clientip");
901 $template->setVariable("TXT_CLIENT_IP", $this->lng->txt("client_ip"));
902 $template->parseCurrentBlock();
903 $template->setCurrentBlock("user_clientip_value");
904 $template->setVariable("VALUE_CLIENT_IP", $invited_user["clientip"]);
905 $template->parseCurrentBlock();
906 $template->touchBlock("user_clientip_separator");
907 $title_client = " - " . $this->lng->txt("clientip") . ": " . $invited_user["clientip"];
908 }
909
910 $template->setVariable("TXT_USR_NAME", $this->lng->txt("name"));
911 $uname = $this->object->userLookupFullName($user_id, false);
912 $template->setVariable("VALUE_USR_NAME", $uname);
913 $template->setVariable("TXT_PASS", $this->lng->txt("scored_pass"));
914 $template->setVariable("VALUE_PASS", $pass);
915 return $template->get();
916 }
917
925 public function getQuestionResultForTestUsers($question_id, $test_id)
926 {
927 // prepare generation before contents are processed (for mathjax)
928 require_once 'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
930
931 // REQUIRED, since we call this object regardless of the loop
932 $question_gui = $this->object->createQuestionGUI("", $question_id);
933
934 $foundusers = $this->object->getParticipantsForTestAndQuestion($test_id, $question_id);
935 $output = '';
936 foreach ($foundusers as $active_id => $passes) {
937 $resultpass = $this->object->_getResultPass($active_id);
938 for ($i = 0; $i < count($passes); $i++) {
939 if (($resultpass !== null) && ($resultpass == $passes[$i]["pass"])) {
940 if ($output) {
941 $output .= "<br /><br /><br />";
942 }
943
944 // check if re-instantiation is really neccessary
945 $question_gui = $this->object->createQuestionGUI("", $passes[$i]["qid"]);
946 $output .= $this->getResultsHeadUserAndPass($active_id, $resultpass + 1);
947 $question_gui->setRenderPurpose(assQuestionGUI::RENDER_PURPOSE_PRINT_PDF);
948 $output .= $question_gui->getSolutionOutput(
949 $active_id,
950 $resultpass,
951 $graphicalOutput = false,
952 $result_output = false,
953 $show_question_only = false,
954 $show_feedback = false
955 );
956 }
957 }
958 }
959
960 require_once './Modules/Test/classes/class.ilTestPDFGenerator.php';
961 ilTestPDFGenerator::generatePDF($output, ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $question_gui->object->getTitleFilenameCompliant(), PDF_USER_RESULT);
962 }
963
967 protected function buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
968 {
969 require_once 'Modules/Test/classes/tables/class.ilTestPassDetailsOverviewTableGUI.php';
970 $tableGUI = new ilTestPassDetailsOverviewTableGUI($this->ctrl, $targetGUI, $targetCMD);
971 $tableGUI->setIsPdfGenerationRequest($this->isPdfDeliveryRequest());
972 return $tableGUI;
973 }
974
975 protected function isGradingMessageRequired()
976 {
977 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
978 return false;
979 }
980
981 if ($this->object->isShowGradingStatusEnabled()) {
982 return true;
983 }
984
985 if ($this->object->isShowGradingMarkEnabled()) {
986 return true;
987 }
988
989 if ($this->object->areObligationsEnabled()) {
990 return true;
991 }
992
993 return false;
994 }
995
1000 protected function getGradingMessageBuilder($activeId)
1001 {
1002 require_once 'Modules/Test/classes/class.ilTestGradingMessageBuilder.php';
1003 $gradingMessageBuilder = new ilTestGradingMessageBuilder($this->lng, $this->object);
1004
1005 $gradingMessageBuilder->setActiveId($activeId);
1006
1007 return $gradingMessageBuilder;
1008 }
1009
1010 protected function buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
1011 {
1012 require_once 'Modules/Test/classes/class.ilTestQuestionRelatedObjectivesList.php';
1013 $questionRelatedObjectivesList = new ilTestQuestionRelatedObjectivesList();
1014
1015 $objectivesAdapter->buildQuestionRelatedObjectiveList($testSequence, $questionRelatedObjectivesList);
1016
1017 return $questionRelatedObjectivesList;
1018 }
1019
1020 protected function getFilteredTestResult($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions)
1021 {
1022 global $ilDB, $ilPluginAdmin;
1023
1024 $table_gui = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
1025 $table_gui->initFilter();
1026
1027 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
1028 $questionList = new ilAssQuestionList($ilDB, $this->lng, $ilPluginAdmin);
1029
1030 $questionList->setParentObjIdsFilter(array($this->object->getId()));
1031 $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_DUPLICATES);
1032
1033 foreach ($table_gui->getFilterItems() as $item) {
1034 if (substr($item->getPostVar(), 0, strlen('tax_')) == 'tax_') {
1035 $v = $item->getValue();
1036
1037 if (is_array($v) && count($v) && !(int) $v[0]) {
1038 continue;
1039 }
1040
1041 $taxId = substr($item->getPostVar(), strlen('tax_'));
1042 $questionList->addTaxonomyFilter($taxId, $item->getValue(), $this->object->getId(), 'tst');
1043 } elseif ($item->getValue() !== false) {
1044 $questionList->addFieldFilter($item->getPostVar(), $item->getValue());
1045 }
1046 }
1047
1048 $questionList->load();
1049
1050 $filteredTestResult = array();
1051
1052 $resultData = $this->object->getTestResult($active_id, $pass, false, $considerHiddenQuestions, $considerOptionalQuestions);
1053
1054 foreach ($resultData as $resultItemKey => $resultItemValue) {
1055 if ($resultItemKey === 'test' || $resultItemKey === 'pass') {
1056 continue;
1057 }
1058
1059 if (!$questionList->isInList($resultItemValue['qid'])) {
1060 continue;
1061 }
1062
1063 $filteredTestResult[] = $resultItemValue;
1064 }
1065
1066 return $filteredTestResult;
1067 }
1068
1072 protected function populateContent($content)
1073 {
1074 if ($this->isPdfDeliveryRequest()) {
1075 require_once 'Modules/Test/classes/class.ilTestPDFGenerator.php';
1076
1078 $content,
1080 $this->object->getTitleFilenameCompliant(),
1082 );
1083 } else {
1084 $this->tpl->setContent($content);
1085 }
1086 }
1087
1092 {
1093 require_once 'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
1094 $toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->tpl, $this->lng);
1095
1096 $toolbar->setSkillResultButtonEnabled($this->object->isSkillServiceToBeConsidered());
1097
1098 return $toolbar;
1099 }
1100
1101 protected function outCorrectSolutionCmd()
1102 {
1103 $this->outCorrectSolution(); // cannot be named xxxCmd, because it's also called from context without Cmd in names
1104 }
1105
1111 protected function outCorrectSolution()
1112 {
1113 if (!$this->object->getShowSolutionDetails()) {
1114 ilUtil::sendInfo($this->lng->txt("no_permission"), true);
1115 $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1116 }
1117
1118 $testSession = $this->testSessionFactory->getSession();
1119 $activeId = $testSession->getActiveId();
1120
1121 if (!($activeId > 0)) {
1122 $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
1123 }
1124
1125 $this->ctrl->saveParameter($this, "pass");
1126 $pass = (int) $_GET['pass'];
1127
1128 $questionId = (int) $_GET['evaluation'];
1129
1130 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($activeId, $pass);
1131 $testSequence->loadFromDb();
1132 $testSequence->loadQuestions();
1133
1134 if (!$testSequence->questionExists($questionId)) {
1136 }
1137
1138 if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1139 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($activeId, $pass);
1140 $testSequence->loadFromDb();
1141 $testSequence->loadQuestions();
1142
1143 require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
1144 $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
1145 $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
1146 $objectivesList->loadObjectivesTitles();
1147 } else {
1148 $objectivesList = null;
1149 }
1150
1151 global $ilTabs;
1152
1153 if ($this instanceof ilTestEvalObjectiveOrientedGUI) {
1154 $ilTabs->setBackTarget(
1155 $this->lng->txt("tst_back_to_virtual_pass"),
1156 $this->ctrl->getLinkTarget($this, 'showVirtualPass')
1157 );
1158 } else {
1159 $ilTabs->setBackTarget(
1160 $this->lng->txt("tst_back_to_pass_details"),
1161 $this->ctrl->getLinkTarget($this, 'outUserPassDetails')
1162 );
1163 }
1164
1165 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1166 $this->tpl->setCurrentBlock("ContentStyle");
1167 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
1168 $this->tpl->parseCurrentBlock();
1169
1170 $this->tpl->setCurrentBlock("SyntaxStyle");
1171 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
1172 $this->tpl->parseCurrentBlock();
1173
1174 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1175 if ($this->object->getShowSolutionAnswersOnly()) {
1176 $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1177 }
1178
1179 $solution = $this->getCorrectSolutionOutput($questionId, $activeId, $pass, $objectivesList);
1180
1181 $this->tpl->setContent($solution);
1182 }
1183
1188 public function populatePassFinishDate($tpl, $passFinishDate)
1189 {
1192 $passFinishDate = ilDatePresentation::formatDate(new ilDateTime($passFinishDate, IL_CAL_UNIX));
1194 $tpl->setVariable("PASS_FINISH_DATE_LABEL", $this->lng->txt('tst_pass_finished_on'));
1195 $tpl->setVariable("PASS_FINISH_DATE_VALUE", $passFinishDate);
1196 }
1197}
1198
1199// internal sort function to sort the result array
1200function sortResults($a, $b)
1201{
1202 $sort = ($_GET["sort"]) ? ($_GET["sort"]) : "nr";
1203 $sortorder = ($_GET["sortorder"]) ? ($_GET["sortorder"]) : "asc";
1204 if (strcmp($sortorder, "asc")) {
1205 $smaller = 1;
1206 $greater = -1;
1207 } else {
1208 $smaller = -1;
1209 $greater = 1;
1210 }
1211 if ($a[$sort] == $b[$sort]) {
1212 return 0;
1213 }
1214 return ($a[$sort] < $b[$sort]) ? $smaller : $greater;
1215}
sprintf('%.4f', $callTime)
$_GET["client_id"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
sortResults($a, $b)
static _getReachedPoints($active_id, $question_id, $pass=null)
Returns the points, a learner has reached answering the question.
static getRequestRequestStatisticDataRegisterByActiveId($activeId)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
@classDescription Date and time handling
Class for single dates.
buildQuestionRelatedObjectiveList(ilTestQuestionSequence $a_test_sequence, ilTestQuestionRelatedObjectivesList $a_objectives_list)
static getInstance(ilTestSession $a_test_session)
static _getManualScoring()
Retrieve the manual scoring settings.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static accessViolationRedirect()
static lookupExamId($active_id, $pass)
static lookupLastTestPassAccess($activeId, $passIndex)
static _lookupLogin($a_user_id)
lookup login
static prepareGeneration()
Prepare the PDF generation This initializes the purpose for MathJax rendering It has to be called bef...
special template class to simplify handling of ITX/PEAR
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
Class ilTestPassOverviewTableGUI.
Service GUI class for tests.
getFilteredTestResult($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions)
outCorrectSolution()
Creates an output of the solution of an answer compared to the correct solution.
getCorrectSolutionOutput($question_id, $active_id, $pass, ilTestQuestionRelatedObjectivesList $objectivesList=null)
Returns an output of the solution to an answer compared to the correct solution.
getResultsOfUserOutput($testSession, $active_id, $pass, $targetGUI, $show_pass_details=true, $show_answers=true, $show_question_only=false, $show_reached_points=false)
Output of the pass overview for a test called by a test participant.
buildPassOverviewTableGUI($targetGUI, $targetCmd='')
setObjectiveOrientedContainer(ilTestObjectiveOrientedContainer $objectiveOrientedContainer)
executeCommand()
execute command
populatePassFinishDate($tpl, $passFinishDate)
__construct(ilObjTest $a_object)
The constructor takes the test object reference as parameter.
getResultsSignature()
Returns HTML code for a signature field.
getCommand($cmd)
Retrieves the ilCtrl command.
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)
getResultsHeadUserAndPass($active_id, $pass)
Returns the user and pass data for a test results output.
setParticipantData($participantData)
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
getPassListOfAnswersWithScoring(&$result_array, $active_id, $pass, $show_solutions=false)
Returns the list of answers of a users test pass and offers a scoring option.
Service class for tests.
Test session handler.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static initDomEvent()
Init YUI DomEvent.
$counter
$template
$key
Definition: croninfo.php:18
$i
Definition: disco.tpl.php:19
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
global $ilCtrl
Definition: ilias.php:18
const PDF_USER_RESULT
PDF Purposes.
redirection script todo: (a better solution should control the processing via a xml file)
$ret
Definition: parser.php:6
if(empty($password)) $table
Definition: pwgen.php:24
global $ilDB
$ilUser
Definition: imgupload.php:18