ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilAssQuestionPageGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once('./Services/COPage/classes/class.ilPageObjectGUI.php');
5require_once('./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php');
6
19{
20 const TEMP_PRESENTATION_TITLE_PLACEHOLDER = '___TEMP_PRESENTATION_TITLE_PLACEHOLDER___';
21
23
24// fau: testNav - variables for info and actions HTML
25 private $questionInfoHTML = '';
27// fau.
28
37 public function __construct($a_id = 0, $a_old_nr = 0)
38 {
39 parent::__construct('qpl', $a_id, $a_old_nr);
40 $this->setEnabledPageFocus(false);
41 }
42
44 {
46 }
47
49 {
50 $this->originalPresentationTitle = $originalPresentationTitle;
51 }
52
53 protected function isPageContainerToBeRendered()
54 {
55 return $this->getRenderPageContainer();
56 }
57
58 public function showPage()
59 {
61
62 $this->setPresentationTitle(self::TEMP_PRESENTATION_TITLE_PLACEHOLDER);
63
64// fau: testNav - enable page toc as placeholder for info and actions block (see self::insertPageToc)
65 $config = $this->getPageConfig();
66 $config->setEnablePageToc('y');
67 $this->setPageConfig($config);
68// fau.
69 return parent::showPage();
70 }
71
73 {
74 $output = str_replace(
75 self::TEMP_PRESENTATION_TITLE_PLACEHOLDER, $this->getOriginalPresentationTitle(), $output
76 );
77
78 $output = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $output);
79
80 return $output;
81 }
82
83// fau: testNav - support the addition of question info and actions below the title
84
89 public function setQuestionInfoHTML($a_html)
90 {
91 $this->questionInfoHTML = $a_html;
92 }
93
98 public function setQuestionActionsHTML($a_html)
99 {
100 $this->questionActionsHTML = $a_html;
101 }
102
111 function insertPageToc($a_output)
112 {
113 if (!empty($this->questionInfoHTML) || !empty($this->questionActionsHTML))
114 {
115 $tpl = new ilTemplate('tpl.tst_question_subtitle_blocks.html', true, true, 'Modules/TestQuestionPool');
116 $tpl->setVariable('QUESTION_INFO',$this->questionInfoHTML);
117 $tpl->setVariable('QUESTION_ACTIONS',$this->questionActionsHTML);
118 $a_output = str_replace("{{{{{PageTOC}}}}}", $tpl->get(), $a_output);
119 }
120 else
121 {
122 $a_output = str_replace("{{{{{PageTOC}}}}}", '', $a_output);
123 }
124 return $a_output;
125 }
126// fau.
127
128}
129
An exception for terminatinating execution or to throw for unit testing.
Question page GUI class.
postOutputProcessing($output)
Finalizing output processing.
setQuestionInfoHTML($a_html)
Set the HTML of a question info block below the title (number, status, ...)
__construct($a_id=0, $a_old_nr=0)
Constructor.
insertPageToc($a_output)
Replace page toc placeholder with question info and actions.
setQuestionActionsHTML($a_html)
Set the HTML of a question actions block below the title.
setOriginalPresentationTitle($originalPresentationTitle)
showPage()
display content of page
Class ilPageObjectGUI.
setPresentationTitle($a_title="")
setPageConfig($a_val)
Set page config object.
getPageConfig()
Get page config object.
setEnabledPageFocus($a_enabledpagefocus)
Set Enable page focus.
getRenderPageContainer()
Get render page container.
special template class to simplify handling of ITX/PEAR
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output