40 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
42 if ($_REQUEST[
'prev_qid']) {
43 $DIC->ctrl()->setParameter($this,
'prev_qid', $_REQUEST[
'prev_qid']);
49 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
50 $DIC->ui()->mainTemplate()->setCurrentBlock(
"ContentStyle");
51 $DIC->ui()->mainTemplate()->setVariable(
52 "LOCATION_CONTENT_STYLESHEET",
55 $DIC->ui()->mainTemplate()->parseCurrentBlock();
58 $DIC->ui()->mainTemplate()->setCurrentBlock(
"SyntaxStyle");
59 $DIC->ui()->mainTemplate()->setVariable(
60 "LOCATION_SYNTAX_STYLESHEET",
63 $DIC->ui()->mainTemplate()->parseCurrentBlock();
64 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
67 $q_gui->setQuestionTabs();
68 $q_gui->outAdditionalOutput();
69 $q_gui->object->setObjId($this->
getTestObj()->getId());
70 $question = &$q_gui->object;
71 $DIC->ctrl()->saveParameter($this,
"q_id");
72 $DIC->language()->loadLanguageModule(
"content");
73 $DIC->ctrl()->setReturnByClass(
"ilAssQuestionPageGUI",
"view");
74 $DIC->ctrl()->setReturnByClass(
"ilObjTestGUI",
"questions");
76 $page_gui->setEditPreview(
true);
77 if (strlen($DIC->ctrl()->getCmd()) == 0) {
78 $DIC->ctrl()->setCmdClass(get_class($page_gui));
79 $DIC->ctrl()->setCmd(
"preview");
81 $page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(
true)));
82 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
83 $page_gui->setOutputMode($this->
getTestObj()->evalTotalPersons() == 0 ?
"edit" :
'preview');
84 $page_gui->setHeader($question->getTitle());
85 $page_gui->setPresentationTitle($question->getTitle() .
' [' . $DIC->language()->txt(
'question_id_short') .
': ' . $question->getId() .
']');
87 $html = $DIC->ctrl()->forwardCommand($page_gui);
88 $DIC->ui()->mainTemplate()->setContent(
$html);
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
const RENDER_PURPOSE_PREVIEW