ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAssQuestionPreviewGUI Class Reference
+ Collaboration diagram for ilAssQuestionPreviewGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilTabsGUI $tabs, ilTemplate $tpl, ilLanguage $lng, ilDBInterface $db, ilObjUser $user)
 
 initQuestion ($questionId, $parentObjId)
 
 initPreviewSettings ($parentRefId)
 
 initPreviewSession ($userId, $questionId)
 
 initHintTracking ()
 
 initStyleSheets ()
 
 executeCommand ()
 
 saveQuestionSolution ()
 
 gatewayConfirmHintRequestCmd ()
 
 gatewayShowHintListCmd ()
 

Data Fields

const CMD_SHOW = 'show'
 
const CMD_RESET = 'reset'
 
const CMD_INSTANT_RESPONSE = 'instantResponse'
 
const CMD_HANDLE_QUESTION_ACTION = 'handleQuestionAction'
 
const CMD_GATEWAY_CONFIRM_HINT_REQUEST = 'gatewayConfirmHintRequest'
 
const CMD_GATEWAY_SHOW_HINT_LIST = 'gatewayShowHintList'
 
const TAB_ID_QUESTION_PREVIEW = 'preview'
 

Protected Attributes

 $ctrl
 
 $tabs
 
 $tpl
 
 $lng
 
 $db
 
 $user
 
 $questionGUI
 
 $questionOBJ
 
 $previewSettings
 
 $previewSession
 
 $hintTracking
 

Private Member Functions

 showCmd ()
 
 resetCmd ()
 
 instantResponseCmd ()
 
 handleQuestionActionCmd ()
 
 populatePreviewToolbar (ilTemplate $tpl)
 
 populateQuestionOutput (ilTemplate $tpl)
 
 populateSolutionOutput (ilTemplate $tpl)
 
 populateQuestionNavigation (ilTemplate $tpl)
 
 populateGenericQuestionFeedback (ilTemplate $tpl)
 
 populateSpecificQuestionFeedback (ilTemplate $tpl)
 
 isShowBestSolutionRequired ()
 
 isShowGenericQuestionFeedbackRequired ()
 
 isShowSpecificQuestionFeedbackRequired ()
 
 getQuestionAnswerShuffler ()
 

Detailed Description

Definition at line 18 of file class.ilAssQuestionPreviewGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionPreviewGUI::__construct ( ilCtrl  $ctrl,
ilTabsGUI  $tabs,
ilTemplate  $tpl,
ilLanguage  $lng,
ilDBInterface  $db,
ilObjUser  $user 
)

Definition at line 84 of file class.ilAssQuestionPreviewGUI.php.

References $ctrl, $db, $lng, $tabs, $tpl, $user, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilAssQuestionPreviewGUI::executeCommand ( )

Definition at line 150 of file class.ilAssQuestionPreviewGUI.php.

References $DIC.

151  {
152  global $DIC; /* @var \ILIAS\DI\Container $DIC */
153  $ilHelp = $DIC['ilHelp']; /* @var ilHelpGUI $ilHelp */
154  $ilHelp->setScreenIdComponent('qpl');
155 
156  $this->tabs->setTabActive(self::TAB_ID_QUESTION_PREVIEW);
157 
158  $this->lng->loadLanguageModule('content');
159 
160  $nextClass = $this->ctrl->getNextClass($this);
161 
162  switch ($nextClass) {
163  case 'ilassquestionhintrequestgui':
164 
165  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
166  $gui = new ilAssQuestionHintRequestGUI($this, self::CMD_SHOW, $this->questionGUI, $this->hintTracking);
167 
168  $this->ctrl->forwardCommand($gui);
169 
170  break;
171 
172  case 'ilassspecfeedbackpagegui':
173  case 'ilassgenfeedbackpagegui':
174  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackPageObjectCommandForwarder.php';
175  $forwarder = new ilAssQuestionFeedbackPageObjectCommandForwarder($this->questionOBJ, $this->ctrl, $this->tabs, $this->lng);
176  $forwarder->forward();
177  break;
178 
179  default:
180 
181  $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
182 
183  $this->$cmd();
184  }
185  }
global $DIC
Definition: saml.php:7

◆ gatewayConfirmHintRequestCmd()

ilAssQuestionPreviewGUI::gatewayConfirmHintRequestCmd ( )

Definition at line 408 of file class.ilAssQuestionPreviewGUI.php.

References ilAssQuestionHintRequestGUI\CMD_CONFIRM_REQUEST, saveQuestionSolution(), and showCmd().

409  {
410  if (!$this->saveQuestionSolution()) {
411  $this->previewSession->setInstantResponseActive(false);
412  $this->showCmd();
413  return;
414  }
415 
416  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
417 
418  $this->ctrl->redirectByClass(
419  'ilAssQuestionHintRequestGUI',
421  );
422  }
+ Here is the call graph for this function:

◆ gatewayShowHintListCmd()

ilAssQuestionPreviewGUI::gatewayShowHintListCmd ( )

Definition at line 424 of file class.ilAssQuestionPreviewGUI.php.

References ilAssQuestionHintRequestGUI\CMD_SHOW_LIST, saveQuestionSolution(), and showCmd().

425  {
426  if (!$this->saveQuestionSolution()) {
427  $this->previewSession->setInstantResponseActive(false);
428  $this->showCmd();
429  return;
430  }
431 
432  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
433 
434  $this->ctrl->redirectByClass(
435  'ilAssQuestionHintRequestGUI',
437  );
438  }
+ Here is the call graph for this function:

◆ getQuestionAnswerShuffler()

ilAssQuestionPreviewGUI::getQuestionAnswerShuffler ( )
private
Returns
ilArrayElementShuffler

Definition at line 443 of file class.ilAssQuestionPreviewGUI.php.

Referenced by populateQuestionOutput().

444  {
445  require_once 'Services/Randomization/classes/class.ilArrayElementShuffler.php';
446  $shuffler = new ilArrayElementShuffler();
447 
448  if (!$this->previewSession->randomizerSeedExists()) {
449  $this->previewSession->setRandomizerSeed($shuffler->buildRandomSeed());
450  }
451 
452  $shuffler->setSeed($this->previewSession->getRandomizerSeed());
453 
454  return $shuffler;
455  }
+ Here is the caller graph for this function:

◆ handleQuestionActionCmd()

ilAssQuestionPreviewGUI::handleQuestionActionCmd ( )
private

Definition at line 237 of file class.ilAssQuestionPreviewGUI.php.

238  {
239  $this->questionOBJ->persistPreviewState($this->previewSession);
240  $this->ctrl->redirect($this, self::CMD_SHOW);
241  }

◆ initHintTracking()

ilAssQuestionPreviewGUI::initHintTracking ( )

Definition at line 131 of file class.ilAssQuestionPreviewGUI.php.

132  {
133  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewHintTracking.php';
134  $this->hintTracking = new ilAssQuestionPreviewHintTracking($this->db, $this->previewSession);
135  }

◆ initPreviewSession()

ilAssQuestionPreviewGUI::initPreviewSession (   $userId,
  $questionId 
)

Definition at line 123 of file class.ilAssQuestionPreviewGUI.php.

124  {
125  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewSession.php';
126  $this->previewSession = new ilAssQuestionPreviewSession($userId, $questionId);
127 
128  $this->previewSession->init();
129  }

◆ initPreviewSettings()

ilAssQuestionPreviewGUI::initPreviewSettings (   $parentRefId)

Definition at line 115 of file class.ilAssQuestionPreviewGUI.php.

116  {
117  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewSettings.php';
118  $this->previewSettings = new ilAssQuestionPreviewSettings($parentRefId);
119 
120  $this->previewSettings->init();
121  }

◆ initQuestion()

ilAssQuestionPreviewGUI::initQuestion (   $questionId,
  $parentObjId 
)

Definition at line 94 of file class.ilAssQuestionPreviewGUI.php.

References assQuestion\instantiateQuestionGUI(), OUTPUT_JAVASCRIPT, and assQuestionGUI\RENDER_PURPOSE_DEMOPLAY.

95  {
96  require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
97 
98  $this->questionGUI = assQuestion::instantiateQuestionGUI($questionId);
99  $this->questionOBJ = $this->questionGUI->object;
100 
101  $this->questionOBJ->setObjId($parentObjId);
102 
103  $this->questionGUI->setQuestionTabs();
104  $this->questionGUI->outAdditionalOutput();
105 
106  $this->questionGUI->populateJavascriptFilesRequiredForWorkForm($this->tpl);
107  $this->questionOBJ->setOutputType(OUTPUT_JAVASCRIPT); // TODO: remove including depending stuff
108 
109  $this->questionGUI->setTargetGui($this);
110  $this->questionGUI->setQuestionActionCmd(self::CMD_HANDLE_QUESTION_ACTION);
111 
112  $this->questionGUI->setRenderPurpose(assQuestionGUI::RENDER_PURPOSE_DEMOPLAY);
113  }
const OUTPUT_JAVASCRIPT
static instantiateQuestionGUI($a_question_id)
Creates an instance of a question gui with a given question id.
+ Here is the call graph for this function:

◆ initStyleSheets()

ilAssQuestionPreviewGUI::initStyleSheets ( )

Definition at line 137 of file class.ilAssQuestionPreviewGUI.php.

References ilObjStyleSheet\getContentStylePath(), and ilObjStyleSheet\getSyntaxStylePath().

138  {
139  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
140 
141  $this->tpl->setCurrentBlock("ContentStyle");
142  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
143  $this->tpl->parseCurrentBlock();
144 
145  $this->tpl->setCurrentBlock("SyntaxStyle");
146  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
147  $this->tpl->parseCurrentBlock();
148  }
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
+ Here is the call graph for this function:

◆ instantResponseCmd()

ilAssQuestionPreviewGUI::instantResponseCmd ( )
private

Definition at line 226 of file class.ilAssQuestionPreviewGUI.php.

References saveQuestionSolution().

227  {
228  if ($this->saveQuestionSolution()) {
229  $this->previewSession->setInstantResponseActive(true);
230  } else {
231  $this->previewSession->setInstantResponseActive(false);
232  }
233 
234  $this->ctrl->redirect($this, self::CMD_SHOW);
235  }
+ Here is the call graph for this function:

◆ isShowBestSolutionRequired()

ilAssQuestionPreviewGUI::isShowBestSolutionRequired ( )
private

Definition at line 376 of file class.ilAssQuestionPreviewGUI.php.

Referenced by showCmd().

377  {
378  if (!$this->previewSettings->isBestSolutionEnabled()) {
379  return false;
380  }
381 
382  return $this->previewSession->isInstantResponseActive();
383  }
+ Here is the caller graph for this function:

◆ isShowGenericQuestionFeedbackRequired()

ilAssQuestionPreviewGUI::isShowGenericQuestionFeedbackRequired ( )
private

Definition at line 385 of file class.ilAssQuestionPreviewGUI.php.

Referenced by showCmd().

386  {
387  if (!$this->previewSettings->isGenericFeedbackEnabled()) {
388  return false;
389  }
390 
391  return $this->previewSession->isInstantResponseActive();
392  }
+ Here is the caller graph for this function:

◆ isShowSpecificQuestionFeedbackRequired()

ilAssQuestionPreviewGUI::isShowSpecificQuestionFeedbackRequired ( )
private

Definition at line 394 of file class.ilAssQuestionPreviewGUI.php.

Referenced by populateQuestionOutput(), and showCmd().

395  {
396  if (!$this->previewSettings->isSpecificFeedbackEnabled()) {
397  return false;
398  }
399 
400  return $this->previewSession->isInstantResponseActive();
401  }
+ Here is the caller graph for this function:

◆ populateGenericQuestionFeedback()

ilAssQuestionPreviewGUI::populateGenericQuestionFeedback ( ilTemplate  $tpl)
private

Definition at line 351 of file class.ilAssQuestionPreviewGUI.php.

References ilAssQuestionFeedback\CSS_CLASS_FEEDBACK_CORRECT, ilAssQuestionFeedback\CSS_CLASS_FEEDBACK_WRONG, ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by showCmd().

352  {
353  if ($this->questionOBJ->isPreviewSolutionCorrect($this->previewSession)) {
354  $feedback = $this->questionGUI->getGenericFeedbackOutputForCorrectSolution();
356  } else {
357  $feedback = $this->questionGUI->getGenericFeedbackOutputForIncorrectSolution();
359  }
360 
361  if (strlen($feedback)) {
362  $tpl->setCurrentBlock('instant_feedback_generic');
363  $tpl->setVariable('GENERIC_FEEDBACK', $feedback);
364  $tpl->setVariable('ILC_FB_CSS_CLASS', $cssClass);
365  $tpl->parseCurrentBlock();
366  }
367  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populatePreviewToolbar()

ilAssQuestionPreviewGUI::populatePreviewToolbar ( ilTemplate  $tpl)
private

Definition at line 243 of file class.ilAssQuestionPreviewGUI.php.

References HTML_Template_IT\setVariable().

Referenced by showCmd().

244  {
245  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewToolbarGUI.php';
246  $toolbarGUI = new ilAssQuestionPreviewToolbarGUI($this->lng);
247 
248  $toolbarGUI->setFormAction($this->ctrl->getFormAction($this, self::CMD_SHOW));
249  $toolbarGUI->setResetPreviewCmd(self::CMD_RESET);
250 
251  $toolbarGUI->build();
252 
253  $tpl->setVariable('PREVIEW_TOOLBAR', $this->ctrl->getHTML($toolbarGUI));
254  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionNavigation()

ilAssQuestionPreviewGUI::populateQuestionNavigation ( ilTemplate  $tpl)
private

Definition at line 333 of file class.ilAssQuestionPreviewGUI.php.

References HTML_Template_IT\setVariable().

Referenced by showCmd().

334  {
335  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionRelatedNavigationBarGUI.php';
336  $navGUI = new ilAssQuestionRelatedNavigationBarGUI($this->ctrl, $this->lng);
337 
338  $navGUI->setInstantResponseCmd(self::CMD_INSTANT_RESPONSE);
339  $navGUI->setHintRequestCmd(self::CMD_GATEWAY_CONFIRM_HINT_REQUEST);
340  $navGUI->setHintListCmd(self::CMD_GATEWAY_SHOW_HINT_LIST);
341 
342  $navGUI->setInstantResponseEnabled($this->previewSettings->isInstantFeedbackNavigationRequired());
343  $navGUI->setHintProvidingEnabled($this->previewSettings->isHintProvidingEnabled());
344 
345  $navGUI->setHintRequestsPossible($this->hintTracking->requestsPossible());
346  $navGUI->setHintRequestsExist($this->hintTracking->requestsExist());
347 
348  $tpl->setVariable('QUESTION_NAVIGATION', $this->ctrl->getHTML($navGUI));
349  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionOutput()

ilAssQuestionPreviewGUI::populateQuestionOutput ( ilTemplate  $tpl)
private

Definition at line 256 of file class.ilAssQuestionPreviewGUI.php.

References $_POST, array, getQuestionAnswerShuffler(), isShowSpecificQuestionFeedbackRequired(), ilPageObjectGUI\setRenderPageContainer(), and HTML_Template_IT\setVariable().

Referenced by showCmd().

257  {
258  // FOR WHAT EXACTLY IS THIS USEFUL?
259  $this->ctrl->setReturnByClass('ilAssQuestionPageGUI', 'view');
260  $this->ctrl->setReturnByClass('ilObjQuestionPoolGUI', 'questions');
261 
262  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
263  $pageGUI = new ilAssQuestionPageGUI($this->questionOBJ->getId());
264  $pageGUI->setRenderPageContainer(false);
265  $pageGUI->setEditPreview(true);
266  $pageGUI->setEnabledTabs(false);
267 
268  // FOR WHICH SITUATION IS THIS WORKAROUND NECCESSARY? (sure .. imagemaps, but where this can be done?)
269  if (strlen($this->ctrl->getCmd()) == 0 && !isset($_POST['editImagemapForward_x'])) { // workaround for page edit imagemaps, keep in mind
270  $this->ctrl->setCmdClass(get_class($pageGUI));
271  $this->ctrl->setCmd('preview');
272  }
273 
274  $this->questionGUI->setPreviewSession($this->previewSession);
275  $this->questionGUI->object->setShuffler($this->getQuestionAnswerShuffler());
276 
277  $questionHtml = $this->questionGUI->getPreview(true, $this->isShowSpecificQuestionFeedbackRequired());
278  $this->questionGUI->magicAfterTestOutput();
279 
280  $pageGUI->setQuestionHTML(array($this->questionOBJ->getId() => $questionHtml));
281 
282  //$pageGUI->setHeader($this->questionOBJ->getTitle()); // NO ADDITIONAL HEADER
283  $pageGUI->setPresentationTitle($this->questionOBJ->getTitle());
284 
285  //$pageGUI->setTemplateTargetVar("ADM_CONTENT"); // NOT REQUIRED, OR IS?
286 
287  $tpl->setVariable('QUESTION_OUTPUT', $pageGUI->preview());
288  }
Question page GUI class.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
setRenderPageContainer($a_val)
Set render page container.
Create styles array
The data for the language used.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateSolutionOutput()

ilAssQuestionPreviewGUI::populateSolutionOutput ( ilTemplate  $tpl)
private

Definition at line 290 of file class.ilAssQuestionPreviewGUI.php.

References $_POST, array, ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), ilPageObjectGUI\setEditPreview(), and HTML_Template_IT\setVariable().

Referenced by showCmd().

291  {
292  // FOR WHAT EXACTLY IS THIS USEFUL?
293  $this->ctrl->setReturnByClass('ilAssQuestionPageGUI', 'view');
294  $this->ctrl->setReturnByClass('ilObjQuestionPoolGUI', 'questions');
295 
296  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
297  $pageGUI = new ilAssQuestionPageGUI($this->questionOBJ->getId());
298 
299  $pageGUI->setEditPreview(true);
300  $pageGUI->setEnabledTabs(false);
301 
302  // FOR WHICH SITUATION IS THIS WORKAROUND NECCESSARY? (sure .. imagemaps, but where this can be done?)
303  if (strlen($this->ctrl->getCmd()) == 0 && !isset($_POST['editImagemapForward_x'])) { // workaround for page edit imagemaps, keep in mind
304  $this->ctrl->setCmdClass(get_class($pageGUI));
305  $this->ctrl->setCmd('preview');
306  }
307 
308  $this->questionGUI->setPreviewSession($this->previewSession);
309 
310  $pageGUI->setQuestionHTML(array($this->questionOBJ->getId() => $this->questionGUI->getSolutionOutput(
311  0,
312  null,
313  false,
314  false,
315  true,
316  false,
317  true,
318  false,
319  false
320  )));
321 
322  //$pageGUI->setHeader($this->questionOBJ->getTitle()); // NO ADDITIONAL HEADER
323  //$pageGUI->setPresentationTitle($this->questionOBJ->getTitle());
324 
325  //$pageGUI->setTemplateTargetVar("ADM_CONTENT"); // NOT REQUIRED, OR IS?
326 
327  $tpl->setCurrentBlock('solution_output');
328  $tpl->setVariable('TXT_CORRECT_SOLUTION', $this->lng->txt('tst_best_solution_is'));
329  $tpl->setVariable('SOLUTION_OUTPUT', $pageGUI->preview());
330  $tpl->parseCurrentBlock();
331  }
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
Question page GUI class.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
Create styles array
The data for the language used.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
$_POST["username"]
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateSpecificQuestionFeedback()

ilAssQuestionPreviewGUI::populateSpecificQuestionFeedback ( ilTemplate  $tpl)
private

Definition at line 369 of file class.ilAssQuestionPreviewGUI.php.

References ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by showCmd().

370  {
371  $tpl->setCurrentBlock('instant_feedback_specific');
372  $tpl->setVariable('ANSWER_FEEDBACK', $this->questionGUI->getSpecificFeedbackOutput(0, -1));
373  $tpl->parseCurrentBlock();
374  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetCmd()

ilAssQuestionPreviewGUI::resetCmd ( )
private

Definition at line 214 of file class.ilAssQuestionPreviewGUI.php.

References ilUtil\sendInfo().

215  {
216  $this->previewSession->setRandomizerSeed(null);
217  $this->previewSession->setParticipantsSolution(null);
218  $this->previewSession->resetRequestedHints();
219  $this->previewSession->setInstantResponseActive(false);
220 
221  ilUtil::sendInfo($this->lng->txt('qst_preview_reset_msg'), true);
222 
223  $this->ctrl->redirect($this, self::CMD_SHOW);
224  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ saveQuestionSolution()

ilAssQuestionPreviewGUI::saveQuestionSolution ( )

Definition at line 403 of file class.ilAssQuestionPreviewGUI.php.

Referenced by gatewayConfirmHintRequestCmd(), gatewayShowHintListCmd(), and instantResponseCmd().

404  {
405  return $this->questionOBJ->persistPreviewState($this->previewSession);
406  }
+ Here is the caller graph for this function:

◆ showCmd()

ilAssQuestionPreviewGUI::showCmd ( )
private

Definition at line 187 of file class.ilAssQuestionPreviewGUI.php.

References $tpl, isShowBestSolutionRequired(), isShowGenericQuestionFeedbackRequired(), isShowSpecificQuestionFeedbackRequired(), populateGenericQuestionFeedback(), populatePreviewToolbar(), populateQuestionNavigation(), populateQuestionOutput(), populateSolutionOutput(), and populateSpecificQuestionFeedback().

Referenced by gatewayConfirmHintRequestCmd(), and gatewayShowHintListCmd().

188  {
189  $tpl = new ilTemplate('tpl.qpl_question_preview.html', true, true, 'Modules/TestQuestionPool');
190 
191  $tpl->setVariable('PREVIEW_FORMACTION', $this->ctrl->getFormAction($this, self::CMD_SHOW));
192 
194 
196 
198 
201  }
202 
205  }
206 
207  if ($this->isShowBestSolutionRequired()) {
209  }
210 
211  $this->tpl->setContent($tpl->get());
212  }
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilAssQuestionPreviewGUI::$ctrl
protected

Definition at line 32 of file class.ilAssQuestionPreviewGUI.php.

Referenced by __construct().

◆ $db

ilAssQuestionPreviewGUI::$db
protected

Definition at line 52 of file class.ilAssQuestionPreviewGUI.php.

Referenced by __construct().

◆ $hintTracking

ilAssQuestionPreviewGUI::$hintTracking
protected

Definition at line 82 of file class.ilAssQuestionPreviewGUI.php.

◆ $lng

ilAssQuestionPreviewGUI::$lng
protected

Definition at line 47 of file class.ilAssQuestionPreviewGUI.php.

Referenced by __construct().

◆ $previewSession

ilAssQuestionPreviewGUI::$previewSession
protected

Definition at line 77 of file class.ilAssQuestionPreviewGUI.php.

◆ $previewSettings

ilAssQuestionPreviewGUI::$previewSettings
protected

Definition at line 72 of file class.ilAssQuestionPreviewGUI.php.

◆ $questionGUI

ilAssQuestionPreviewGUI::$questionGUI
protected

Definition at line 62 of file class.ilAssQuestionPreviewGUI.php.

◆ $questionOBJ

ilAssQuestionPreviewGUI::$questionOBJ
protected

Definition at line 67 of file class.ilAssQuestionPreviewGUI.php.

◆ $tabs

ilAssQuestionPreviewGUI::$tabs
protected

Definition at line 37 of file class.ilAssQuestionPreviewGUI.php.

Referenced by __construct().

◆ $tpl

ilAssQuestionPreviewGUI::$tpl
protected

Definition at line 42 of file class.ilAssQuestionPreviewGUI.php.

Referenced by __construct(), and showCmd().

◆ $user

ilAssQuestionPreviewGUI::$user
protected

Definition at line 57 of file class.ilAssQuestionPreviewGUI.php.

Referenced by __construct().

◆ CMD_GATEWAY_CONFIRM_HINT_REQUEST

const ilAssQuestionPreviewGUI::CMD_GATEWAY_CONFIRM_HINT_REQUEST = 'gatewayConfirmHintRequest'

Definition at line 24 of file class.ilAssQuestionPreviewGUI.php.

◆ CMD_GATEWAY_SHOW_HINT_LIST

const ilAssQuestionPreviewGUI::CMD_GATEWAY_SHOW_HINT_LIST = 'gatewayShowHintList'

Definition at line 25 of file class.ilAssQuestionPreviewGUI.php.

◆ CMD_HANDLE_QUESTION_ACTION

const ilAssQuestionPreviewGUI::CMD_HANDLE_QUESTION_ACTION = 'handleQuestionAction'

Definition at line 23 of file class.ilAssQuestionPreviewGUI.php.

◆ CMD_INSTANT_RESPONSE

const ilAssQuestionPreviewGUI::CMD_INSTANT_RESPONSE = 'instantResponse'

Definition at line 22 of file class.ilAssQuestionPreviewGUI.php.

◆ CMD_RESET

const ilAssQuestionPreviewGUI::CMD_RESET = 'reset'

Definition at line 21 of file class.ilAssQuestionPreviewGUI.php.

◆ CMD_SHOW

const ilAssQuestionPreviewGUI::CMD_SHOW = 'show'

◆ TAB_ID_QUESTION_PREVIEW

const ilAssQuestionPreviewGUI::TAB_ID_QUESTION_PREVIEW = 'preview'

The documentation for this class was generated from the following file: