4 require_once
'Modules/Test/classes/class.ilTestServiceGUI.php';
27 parent::__construct($testOBJ);
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()) {
72 $this->tpl->setBodyClass(
"kiosk");
73 $this->tpl->setAddFooter(
false);
85 require_once
'Modules/Test/classes/class.ilTestPlayerCommands.php';
86 require_once
'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
87 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
88 require_once
'Services/UIComponent/Button/classes/class.ilButton.php';
91 $toolbar->setId($toolbarId);
93 $backUrl = $this->ctrl->getLinkTarget(
95 $this->object->getListOfQuestionsEnd() ?
100 $button->setCaption(
'btn_previous');
101 $button->setUrl($backUrl);
102 $toolbar->addButtonInstance($button);
104 if ($this->object->getShowExamviewPdf()) {
105 $pdfUrl = $this->ctrl->getLinkTarget($this,
'pdfDownload');
108 $button->setCaption(
'pdf_export');
109 $button->setUrl($pdfUrl);
111 $toolbar->addButtonInstance($button);
114 $this->ctrl->setParameter($this->testOutputGUI,
'reviewed', 1);
116 $this->ctrl->setParameter($this->testOutputGUI,
'reviewed', 0);
119 $button->setPrimary(
true);
120 $button->setCaption(
'btn_next');
121 $button->setUrl($nextUrl);
122 $toolbar->addButtonInstance($button);
130 $ilObjDataCache = $DIC[
'ilObjDataCache'];
132 require_once
'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
135 $objectivesList = null;
138 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
139 $testSequence->loadFromDb();
140 $testSequence->loadQuestions();
142 require_once
'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
146 $objectivesList->loadObjectivesTitles();
148 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
149 $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
150 $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
151 $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
152 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
155 $results = $this->
object->getTestResult(
156 $this->testSession->getActiveId(),
157 $this->testSession->getPass(),
162 require_once
'class.ilTestEvaluationGUI.php';
164 $testevaluationgui->setContextResultPresentation(
false);
166 $results_output = $testevaluationgui->getPassListOfAnswers(
168 $this->testSession->getActiveId(),
169 $this->testSession->getPass(),
176 $testResultHeaderLabelBuilder
179 return $results_output;
188 if ($this->object->isShowExamIdInTestPassEnabled() && !$this->
object->getKioskMode()) {
189 $examIdTpl =
new ilTemplate(
"tpl.exam_id_block.html",
true,
true,
'Modules/Test');
191 $this->testSession->getActiveId(),
192 $this->testSession->getPass(),
193 $this->
object->getId()
195 $examIdTpl->setVariable(
'EXAM_ID_TXT', $this->lng->txt(
'exam_id'));
196 $html .= $examIdTpl->get();
199 $this->tpl->setVariable(
210 require_once
'Modules/Test/classes/class.ilTestPDFGenerator.php';
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.
special template class to simplify handling of ITX/PEAR
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)
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)