4 require_once
'Modules/Test/classes/class.ilTestServiceGUI.php';
32 if (!$this->object->getEnableExamview()) {
36 switch ($this->ctrl->getNextClass($this)) {
47 switch ($this->ctrl->getCmd()) {
50 if ($this->object->getShowExamviewPdf()) {
71 if ($this->object->getKioskMode()) {
74 $this->tpl->hideFooter();
86 require_once
'Modules/Test/classes/class.ilTestPlayerCommands.php';
87 require_once
'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
88 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
89 require_once
'Services/UIComponent/Button/classes/class.ilButton.php';
92 $toolbar->setId($toolbarId);
94 $backUrl = $this->ctrl->getLinkTarget(
96 $this->object->getListOfQuestionsEnd() ?
101 $button->setCaption(
'btn_previous');
102 $button->setUrl($backUrl);
103 $toolbar->addButtonInstance($button);
105 if ($this->object->getShowExamviewPdf()) {
106 $pdfUrl = $this->ctrl->getLinkTarget($this,
'pdfDownload');
109 $button->setCaption(
'pdf_export');
110 $button->setUrl($pdfUrl);
112 $toolbar->addButtonInstance($button);
115 $this->ctrl->setParameter($this->testOutputGUI,
'reviewed', 1);
117 $this->ctrl->setParameter($this->testOutputGUI,
'reviewed', 0);
120 $button->setPrimary(
true);
121 $button->setCaption(
'btn_next');
122 $button->setUrl($nextUrl);
123 $toolbar->addButtonInstance($button);
131 $ilObjDataCache = $DIC[
'ilObjDataCache'];
133 require_once
'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
136 $objectivesList = null;
139 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
140 $testSequence->loadFromDb();
141 $testSequence->loadQuestions();
143 require_once
'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
147 $objectivesList->loadObjectivesTitles();
149 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
150 $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
151 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
152 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
153 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
156 $results = $this->
object->getTestResult(
157 $this->testSession->getActiveId(),
158 $this->testSession->getPass(),
163 require_once
'class.ilTestEvaluationGUI.php';
165 $testevaluationgui->setContextResultPresentation(
false);
167 $results_output = $testevaluationgui->getPassListOfAnswers(
169 $this->testSession->getActiveId(),
170 $this->testSession->getPass(),
177 $testResultHeaderLabelBuilder
180 return $results_output;
185 $html = $this->
buildToolbar(
'review_nav_top')->getHTML();
187 $html .= $this->
buildToolbar(
'review_nav_bottom')->getHTML();
189 if ($this->object->isShowExamIdInTestPassEnabled() && !$this->
object->getKioskMode()) {
190 $examIdTpl =
new ilTemplate(
"tpl.exam_id_block.html",
true,
true,
'Modules/Test');
192 $this->testSession->getActiveId(),
193 $this->testSession->getPass(),
194 $this->
object->getId()
196 $examIdTpl->setVariable(
'EXAM_ID_TXT', $this->lng->txt(
'exam_id'));
197 $html .= $examIdTpl->get();
200 $this->tpl->setVariable(
228 require_once
'Services/Utilities/classes/class.ilUtil.php';
232 if (!is_dir($path)) {
237 $filename .= $inst_id .
'-' . $this->testOutputGUI->object->getId();
238 $filename .=
'-' . $this->testSession->getActiveId() .
'-';
239 $filename .= $this->testSession->getPass() .
'.pdf';
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getObjectiveOrientedContainer()
Output class for assessment test execution.
const PDF_USER_RESULT
PDF Purposes.
__construct(ilTestOutputGUI $testOutputGUI, ilObjTest $testOBJ, ilTestSession $testSession)
const BACK_FROM_FINISHING
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
static getInstance(ilTestSession $a_test_session)
Class ilTestSubmissionReviewGUI.
Output class for assessment test evaluation.
buildPdfFilename()
not in use, but we keep the code (no archive for every user at end of test !!)
static removeTrailingPathSeparators($path)
__construct(Container $dic, ilPlugin $plugin)
Service GUI class for tests.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
const PDF_OUTPUT_DOWNLOAD
static getWebspaceDir($mode="filesystem")
get webspace directory
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
static lookupExamId($active_id, $pass)