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);
131 require_once
'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
134 $objectivesList = null;
137 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
138 $testSequence->loadFromDb();
139 $testSequence->loadQuestions();
141 require_once
'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
145 $objectivesList->loadObjectivesTitles();
147 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
148 $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
149 $testResultHeaderLabelBuilder->setTestObjId($this->
object->getId());
150 $testResultHeaderLabelBuilder->setTestRefId($this->
object->getRefId());
151 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
154 $results = $this->
object->getTestResult(
155 $this->testSession->getActiveId(),
156 $this->testSession->getPass(),
161 require_once
'class.ilTestEvaluationGUI.php';
163 $testevaluationgui->setContextResultPresentation(
false);
165 $results_output = $testevaluationgui->getPassListOfAnswers(
167 $this->testSession->getActiveId(),
168 $this->testSession->getPass(),
175 $testResultHeaderLabelBuilder
178 return $results_output;
194 require_once
'./Services/PDFGeneration/classes/class.ilPDFGeneration.php';
197 require_once
'Modules/Test/classes/class.ilTestPDFGenerator.php';
212 $inst_id = $ilSetting->get(
'inst_id', null);
214 require_once
'Services/Utilities/classes/class.ilUtil.php';
218 if (!is_dir(
$path)) {
223 $filename .= $inst_id .
'-' . $this->testOutputGUI->object->getId();
224 $filename .=
'-' . $this->testSession->getActiveId() .
'-';
225 $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)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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)
static prepareGeneration()
Prepare the PDF generation This initializes the purpose for MathJax rendering It has to be called bef...
Create new PHPExcel object
obj_idprivate
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