19 declare(strict_types=1);
46 if (!$this->
object->getEnableExamview()) {
50 switch ($this->
ctrl->getNextClass($this)) {
61 switch ($this->
ctrl->getCmd()) {
76 if ($this->
object->getKioskMode()) {
79 $this->tpl->hideFooter();
94 $back_url = $this->
ctrl->getLinkTarget(
95 $this->test_output_gui,
96 $this->
object->getListOfQuestionsEnd() ?
101 $this->ui_factory->button()->standard($this->
lng->txt(
'tst_resume_test'), $back_url)
104 if ($this->finish_test_modal === null) {
105 $class = get_class($this->test_output_gui);
106 $this->
ctrl->setParameterByClass($class,
'reviewed', 1);
107 $this->finish_test_modal = $this->test_output_gui->buildFinishTestModal();
108 $this->
ctrl->setParameterByClass($class,
'reviewed', 0);
112 $this->ui_factory->button()->primary($this->
lng->txt(
'finish_test'), $this->finish_test_modal->getShowSignal())
122 $objectivesList = null;
125 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
126 $testSequence->loadFromDb();
127 $testSequence->loadQuestions();
132 $objectivesList->loadObjectivesTitles();
134 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
135 $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
136 $testResultHeaderLabelBuilder->setTestObjId($this->
object->getId());
137 $testResultHeaderLabelBuilder->setTestRefId($this->
object->getRefId());
138 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
141 $results = $this->
object->getTestResult(
142 $this->testSession->getActiveId(),
143 $this->testSession->getPass(),
149 $testevaluationgui->setContextResultPresentation(
false);
151 $results_output = $testevaluationgui->getPassListOfAnswers(
153 $this->testSession->getActiveId(),
154 $this->testSession->getPass(),
161 $testResultHeaderLabelBuilder
164 return $results_output;
167 protected function show(): void
169 $this->global_screen->tool()->context()->current()->getAdditionalData()->replace(
171 $this->
object->getTitle() .
' - ' . $this->
lng->txt(
'tst_results_overview')
175 if ($this->
object->getEnableProcessingTime()) {
176 $active_id = $this->testSession->getActiveId();
177 $starting_time = $this->
object->getStartingTimeOfUser($active_id);
183 $this->
object->getProcessingTimeInSeconds($active_id)
188 $class = $this->
getObject()->isFixedTest()
189 ? ilTestPlayerFixedQuestionSetGUI::class
190 : ilTestPlayerRandomQuestionSetGUI::class;
192 $working_time_js_template = $working_time->prepareWorkingTimeJsTemplate(
194 getdate($starting_time),
195 $this->
ctrl->getLinkTargetByClass($class,
'checkWorkingTime',
'',
true),
199 $this->tpl->addOnLoadCode($working_time_js_template->get());
202 $html .= $this->
buildToolbar(
'review_nav_top')->getHTML();
204 $html .= $this->
buildToolbar(
'review_nav_bottom')->getHTML();
206 if ($this->
object->isShowExamIdInTestPassEnabled() && !$this->
object->getKioskMode()) {
207 $examIdTpl =
new ilTemplate(
'tpl.exam_id_block.html',
true,
true,
'Modules/Test');
209 $this->testSession->getActiveId(),
210 $this->testSession->getPass(),
212 $examIdTpl->setVariable(
'EXAM_ID_TXT', $this->
lng->txt(
'exam_id'));
213 $html .= $examIdTpl->get();
216 $html .= $this->ui_renderer->render($this->finish_test_modal);
getObjectiveOrientedContainer()
Output class for assessment test execution.
const BACK_FROM_FINISHING
InterruptiveModal $finish_test_modal
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
getMessageBox(bool $verbose)
static getInstance(ilTestSession $a_test_session)
__construct(protected ilTestOutputGUI $test_output_gui, ilObjTest $testOBJ, protected ilTestSession $testSession)
Class ilTestSubmissionReviewGUI.
Output class for assessment test evaluation.
const REDIRECT_AFTER_QUESTION_LIST
const TEST_PLAYER_VIEW_TITLE
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
Service GUI class for tests.
static lookupExamId($active_id, $pass)