private function populateSolutionOutput(ilTemplate $tpl) { // FOR WHAT EXACTLY IS THIS USEFUL? $this->ctrl->setReturnByClass('ilAssQuestionPageGUI', 'view'); $this->ctrl->setReturnByClass('ilObjQuestionPoolGUI', 'questions'); include_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php"; $pageGUI = new ilAssQuestionPageGUI($this->questionOBJ->getId()); $pageGUI->setEditPreview(true); $pageGUI->setEnabledTabs(false); // FOR WHICH SITUATION IS THIS WORKAROUND NECCESSARY? (sure .. imagemaps, but where this can be done?) if (strlen($this->ctrl->getCmd()) == 0 && !isset($_POST['editImagemapForward_x'])) { $this->ctrl->setCmdClass(get_class($pageGUI)); $this->ctrl->setCmd('preview'); } $this->questionGUI->setPreviewSession($this->previewSession); $pageGUI->setQuestionHTML(array($this->questionOBJ->getId() => $this->questionGUI->getSolutionOutput(0))); //$pageGUI->setHeader($this->questionOBJ->getTitle()); // NO ADDITIONAL HEADER //$pageGUI->setPresentationTitle($this->questionOBJ->getTitle()); //$pageGUI->setTemplateTargetVar("ADM_CONTENT"); // NOT REQUIRED, OR IS? $tpl->setCurrentBlock('solution_output'); $tpl->setVariable('SOLUTION_OUTPUT', $pageGUI->preview()); $tpl->parseCurrentBlock(); }