ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestQuestionNavigationGUI Class Reference
+ Collaboration diagram for ilTestQuestionNavigationGUI:

Public Member Functions

 __construct (protected ilLanguage $lng, protected UIFactory $ui_factory, protected UIRenderer $ui_renderer)
 
 getEditSolutionCommand ()
 
 setEditSolutionCommand ($editSolutionCommand)
 
 isQuestionWorkedThrough ()
 
 setQuestionWorkedThrough ($questionWorkedThrough)
 
 getSubmitSolutionCommand ()
 
 setSubmitSolutionCommand ($submitSolutionCommand)
 
 getRevertChangesLinkTarget ()
 
 setRevertChangesLinkTarget ($revertChangesLinkTarget)
 
 isDiscardSolutionButtonEnabled ()
 
 setDiscardSolutionButtonEnabled ($discardSolutionButtonEnabled)
 
 getSkipQuestionLinkTarget ()
 
 setSkipQuestionLinkTarget ($skipQuestionLinkTarget)
 
 getInstantFeedbackCommand ()
 
 setInstantFeedbackCommand ($instantFeedbackCommand)
 
 isAnswerFreezingEnabled ()
 
 isForceInstantResponseEnabled ()
 
 setForceInstantResponseEnabled ($forceInstantResponseEnabled)
 
 setAnswerFreezingEnabled ($answerFreezingEnabled)
 
 getRequestHintCommand ()
 
 setRequestHintCommand ($requestHintCommand)
 
 getShowHintsCommand ()
 
 setShowHintsCommand ($showHintsCommand)
 
 hintRequestsExist ()
 
 setHintRequestsExist ($hintRequestsExist)
 
 getQuestionMarkLinkTarget ()
 
 setQuestionMarkLinkTarget ($questionMarkLinkTarget)
 
 isQuestionMarked ()
 
 setQuestionMarked ($questionMarked)
 
 isAnythingRendered ()
 
 setAnythingRendered ()
 
 getActionsHTML ()
 
 getHTML ()
 

Data Fields

const SHOW_DISABLED_COMMANDS = false
 
const CSS_CLASS_SUBMIT_BUTTONS = 'ilc_qsubmit_Submit'
 

Private Member Functions

 getEditSolutionButtonLabel ()
 
 getCheckButtonLabel ()
 
 getRequestHintButtonLabel ()
 
 getQuestionMarkActionLabel ()
 
 getQuestionMarkIconLabel ()
 
 getQuestionMarkIconSource ()
 
 getTemplate ($a_purpose='toolbar')
 Get the template. More...
 
 parseNavigation (ilTemplate $tpl)
 
 parseButtonsBlock (ilTemplate $tpl)
 
 renderButtonInstance (ilTemplate $tpl, Button $button)
 
 renderSubmitButton (ilTemplate $tpl, string $command, string $label)
 
 renderInstantFeedbackButton (ilTemplate $tpl, string $command, string $label, bool $is_primary)
 
 getOnLoadCode (string $command)
 
 renderIcon (ilTemplate $tpl, $command, $iconSrc, $label, $cssClass)
 
 renderActionsIcon (ilTemplate $tpl, $iconSrc, $label, $cssClass)
 

Private Attributes

ILIAS DI UIServices $ui
 
 $editSolutionCommand = ''
 
 $questionWorkedThrough = false
 
 $submitSolutionCommand = ''
 
 $revertChangesLinkTarget = ''
 
 $discardSolutionButtonEnabled = false
 
 $skipQuestionLinkTarget = ''
 
 $instantFeedbackCommand = ''
 
 $answerFreezingEnabled = false
 
 $forceInstantResponseEnabled = false
 
 $requestHintCommand = ''
 
 $showHintsCommand = ''
 
 $hintRequestsExist = false
 
 $questionMarkLinkTarget = ''
 
 $questionMarked = false
 
 $anythingRendered = false
 

Detailed Description

Definition at line 31 of file class.ilTestQuestionNavigationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestQuestionNavigationGUI::__construct ( protected ilLanguage  $lng,
protected UIFactory  $ui_factory,
protected UIRenderer  $ui_renderer 
)
Parameters
ilLanguage$lng

Definition at line 122 of file class.ilTestQuestionNavigationGUI.php.

126  {
127  }

Member Function Documentation

◆ getActionsHTML()

ilTestQuestionNavigationGUI::getActionsHTML ( )

Definition at line 373 of file class.ilTestQuestionNavigationGUI.php.

References $id, getQuestionMarkActionLabel(), getQuestionMarkIconLabel(), getQuestionMarkIconSource(), getQuestionMarkLinkTarget(), getRevertChangesLinkTarget(), getSkipQuestionLinkTarget(), getTemplate(), isDiscardSolutionButtonEnabled(), ILIAS\Repository\lng(), renderActionsIcon(), and ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode().

373  : string
374  {
375  $tpl = $this->getTemplate('actions');
376  $actions = [];
377 
378  if ($this->getQuestionMarkLinkTarget()) {
379  $this->renderActionsIcon(
380  $tpl,
381  $this->getQuestionMarkIconSource(),
382  $this->getQuestionMarkIconLabel(),
383  'ilTestMarkQuestionIcon'
384  );
385  $target = $this->getQuestionMarkLinkTarget();
386  $actions[] = $this->ui_factory->button()->shy(
388  ''
389  )->withAdditionalOnLoadCode(
390  static function (string $id) use ($target): string {
391  return "document.getElementById('$id').addEventListener('click', "
392  . '(e) => {'
393  . " il.TestPlayerQuestionEditControl.checkNavigation('{$target}', 'show', e);"
394  . '});';
395  }
396  );
397  }
398 
399  if ($this->getSkipQuestionLinkTarget()) {
400  $actions[] = $this->ui_factory->button()->shy(
401  $this->lng->txt('postpone_question'),
403  );
404  }
405 
406  if ($actions !== []) {
407  $actions[] = $this->ui_factory->divider()->horizontal();
408  }
409 
410  $actions[] = $this->ui_factory->button()->shy(
411  $this->lng->txt('tst_revert_changes'),
413  )->withUnavailableAction(!$this->getRevertChangesLinkTarget());
414 
415  $actions[] = $this->ui_factory->button()->shy(
416  $this->lng->txt('discard_answer'),
417  '#'
418  )
419  ->withUnavailableAction(!$this->isDiscardSolutionButtonEnabled())
421  fn($id) => "document.getElementById('$id').addEventListener(
422  'click',
423  ()=>$('#tst_discard_solution_modal').modal('show')
424  )"
425  );
426 
427  $list = $this->ui_factory->dropdown()->standard($actions)->withLabel($this->lng->txt("actions"));
428  $tpl->setVariable('ACTION_MENU', $this->ui_renderer->render($list));
429 
430  return $tpl->get();
431  }
renderActionsIcon(ilTemplate $tpl, $iconSrc, $label, $cssClass)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
getTemplate($a_purpose='toolbar')
Get the template.
+ Here is the call graph for this function:

◆ getCheckButtonLabel()

ilTestQuestionNavigationGUI::getCheckButtonLabel ( )
private

Definition at line 498 of file class.ilTestQuestionNavigationGUI.php.

References isAnswerFreezingEnabled(), and ILIAS\Repository\lng().

Referenced by getHTML().

498  : string
499  {
500  if ($this->isAnswerFreezingEnabled()) {
501  return $this->lng->txt('submit_and_check');
502  }
503 
504  return $this->lng->txt('check');
505  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditSolutionButtonLabel()

ilTestQuestionNavigationGUI::getEditSolutionButtonLabel ( )
private

Definition at line 489 of file class.ilTestQuestionNavigationGUI.php.

References isQuestionWorkedThrough(), and ILIAS\Repository\lng().

Referenced by getHTML().

489  : string
490  {
491  if ($this->isQuestionWorkedThrough()) {
492  return $this->lng->txt('edit_answer');
493  }
494 
495  return $this->lng->txt('answer_question');
496  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditSolutionCommand()

ilTestQuestionNavigationGUI::getEditSolutionCommand ( )
Returns
string

Definition at line 132 of file class.ilTestQuestionNavigationGUI.php.

References $editSolutionCommand.

Referenced by getHTML().

132  : string
133  {
135  }
+ Here is the caller graph for this function:

◆ getHTML()

ilTestQuestionNavigationGUI::getHTML ( )
Returns
string

Definition at line 437 of file class.ilTestQuestionNavigationGUI.php.

References getCheckButtonLabel(), getEditSolutionButtonLabel(), getEditSolutionCommand(), getInstantFeedbackCommand(), getRequestHintButtonLabel(), getRequestHintCommand(), getShowHintsCommand(), getTemplate(), isAnythingRendered(), isForceInstantResponseEnabled(), ILIAS\Repository\lng(), parseNavigation(), renderInstantFeedbackButton(), and renderSubmitButton().

437  : string
438  {
439  // fau: testNav - add parameter for toolbar template purpose
440  $tpl = $this->getTemplate('toolbar');
441  // fau.
442  if ($this->getEditSolutionCommand()) {
443  $this->renderSubmitButton(
444  $tpl,
445  $this->getEditSolutionCommand(),
447  );
448  }
449 
450  // fau: testNav - don't show the standard submit button.
451  // fau: testNav - discard answer is moved to the actions menu.
452  // fau: testNav - skip question (postpone) is moved to the actions menu.
453 
454  if ($this->getInstantFeedbackCommand()) {
456  $tpl,
457  $this->getInstantFeedbackCommand(),
458  $this->getCheckButtonLabel(),
460  );
461  }
462 
463  if ($this->getRequestHintCommand()) {
464  $this->renderSubmitButton(
465  $tpl,
466  $this->getRequestHintCommand(),
468  );
469  }
470 
471  if ($this->getShowHintsCommand()) {
472  $this->renderSubmitButton(
473  $tpl,
474  $this->getShowHintsCommand(),
475  $this->lng->txt('show_requested_question_hints')
476  );
477  }
478 
479  // fau: testNav - question mark is moved to the actions menu.
480  // fau: testNav - char selector is moved to the actions menu.
481 
482  if ($this->isAnythingRendered()) {
483  $this->parseNavigation($tpl);
484  }
485 
486  return $tpl->get();
487  }
renderSubmitButton(ilTemplate $tpl, string $command, string $label)
renderInstantFeedbackButton(ilTemplate $tpl, string $command, string $label, bool $is_primary)
getTemplate($a_purpose='toolbar')
Get the template.
+ Here is the call graph for this function:

◆ getInstantFeedbackCommand()

ilTestQuestionNavigationGUI::getInstantFeedbackCommand ( )
Returns
string

Definition at line 230 of file class.ilTestQuestionNavigationGUI.php.

References $instantFeedbackCommand.

Referenced by getHTML().

230  : string
231  {
233  }
+ Here is the caller graph for this function:

◆ getOnLoadCode()

ilTestQuestionNavigationGUI::getOnLoadCode ( string  $command)
private

Definition at line 645 of file class.ilTestQuestionNavigationGUI.php.

References $id.

Referenced by renderInstantFeedbackButton(), and renderSubmitButton().

645  : Closure
646  {
647  return static function ($id) use ($command): string {
648  return "document.getElementById('$id').addEventListener('click', "
649  . '(e) => {'
650  . " e.target.setAttribute('name', 'cmd[$command]');"
651  . ' e.target.form.requestSubmit(e.target);'
652  . '});';
653  };
654  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ getQuestionMarkActionLabel()

ilTestQuestionNavigationGUI::getQuestionMarkActionLabel ( )
private

Definition at line 517 of file class.ilTestQuestionNavigationGUI.php.

References isQuestionMarked(), and ILIAS\Repository\lng().

Referenced by getActionsHTML().

517  : string
518  {
519  if ($this->isQuestionMarked()) {
520  return $this->lng->txt('tst_remove_mark');
521  }
522 
523  return $this->lng->txt('tst_question_mark');
524  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionMarkIconLabel()

ilTestQuestionNavigationGUI::getQuestionMarkIconLabel ( )
private

Definition at line 527 of file class.ilTestQuestionNavigationGUI.php.

References isQuestionMarked(), and ILIAS\Repository\lng().

Referenced by getActionsHTML().

527  : string
528  {
529  if ($this->isQuestionMarked()) {
530  return $this->lng->txt('tst_question_marked');
531  }
532 
533  return$this->lng->txt('tst_question_not_marked');
534  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionMarkIconSource()

ilTestQuestionNavigationGUI::getQuestionMarkIconSource ( )
private

Definition at line 537 of file class.ilTestQuestionNavigationGUI.php.

References ilUtil\getImagePath(), and isQuestionMarked().

Referenced by getActionsHTML().

537  : string
538  {
539  if ($this->isQuestionMarked()) {
540  return ilUtil::getImagePath('object/marked.svg');
541  }
542 
543  return ilUtil::getImagePath('object/marked_.svg');
544  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionMarkLinkTarget()

ilTestQuestionNavigationGUI::getQuestionMarkLinkTarget ( )
Returns
string

Definition at line 327 of file class.ilTestQuestionNavigationGUI.php.

References $questionMarkLinkTarget.

Referenced by getActionsHTML().

327  : string
328  {
330  }
+ Here is the caller graph for this function:

◆ getRequestHintButtonLabel()

ilTestQuestionNavigationGUI::getRequestHintButtonLabel ( )
private

Definition at line 507 of file class.ilTestQuestionNavigationGUI.php.

References hintRequestsExist(), and ILIAS\Repository\lng().

Referenced by getHTML().

507  : string
508  {
509  if ($this->hintRequestsExist()) {
510  return $this->lng->txt('button_request_next_question_hint');
511  }
512 
513  return $this->lng->txt('button_request_question_hint');
514  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRequestHintCommand()

ilTestQuestionNavigationGUI::getRequestHintCommand ( )
Returns
string

Definition at line 278 of file class.ilTestQuestionNavigationGUI.php.

References $requestHintCommand.

Referenced by getHTML().

278  : string
279  {
281  }
+ Here is the caller graph for this function:

◆ getRevertChangesLinkTarget()

ilTestQuestionNavigationGUI::getRevertChangesLinkTarget ( )
Returns
string

Definition at line 181 of file class.ilTestQuestionNavigationGUI.php.

References $revertChangesLinkTarget.

Referenced by getActionsHTML().

181  : string
182  {
184  }
+ Here is the caller graph for this function:

◆ getShowHintsCommand()

ilTestQuestionNavigationGUI::getShowHintsCommand ( )
Returns
string

Definition at line 294 of file class.ilTestQuestionNavigationGUI.php.

References $showHintsCommand.

Referenced by getHTML().

294  : string
295  {
297  }
+ Here is the caller graph for this function:

◆ getSkipQuestionLinkTarget()

ilTestQuestionNavigationGUI::getSkipQuestionLinkTarget ( )
Returns
string

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

References $skipQuestionLinkTarget.

Referenced by getActionsHTML().

214  : string
215  {
217  }
+ Here is the caller graph for this function:

◆ getSubmitSolutionCommand()

ilTestQuestionNavigationGUI::getSubmitSolutionCommand ( )
Returns
string

Definition at line 164 of file class.ilTestQuestionNavigationGUI.php.

References $submitSolutionCommand.

164  : string
165  {
167  }

◆ getTemplate()

ilTestQuestionNavigationGUI::getTemplate (   $a_purpose = 'toolbar')
private

Get the template.

Parameters
string$a_purpose('toolbar' | 'actions')
Returns
ilTemplate

Definition at line 552 of file class.ilTestQuestionNavigationGUI.php.

Referenced by getActionsHTML(), and getHTML().

552  : ilTemplate
553  {
554  switch ($a_purpose) {
555  case 'toolbar':
556  return new ilTemplate(
557  'tpl.tst_question_navigation.html',
558  true,
559  true,
560  'Modules/Test'
561  );
562  default:
563  case 'actions':
564  return new ilTemplate(
565  'tpl.tst_question_actions.html',
566  true,
567  true,
568  'Modules/Test'
569  );
570  }
571  }
+ Here is the caller graph for this function:

◆ hintRequestsExist()

ilTestQuestionNavigationGUI::hintRequestsExist ( )
Returns
boolean

Definition at line 310 of file class.ilTestQuestionNavigationGUI.php.

References $hintRequestsExist.

Referenced by getRequestHintButtonLabel(), and setHintRequestsExist().

310  : bool
311  {
313  }
+ Here is the caller graph for this function:

◆ isAnswerFreezingEnabled()

ilTestQuestionNavigationGUI::isAnswerFreezingEnabled ( )
Returns
boolean

Definition at line 246 of file class.ilTestQuestionNavigationGUI.php.

References $answerFreezingEnabled.

Referenced by getCheckButtonLabel().

246  : bool
247  {
249  }
+ Here is the caller graph for this function:

◆ isAnythingRendered()

ilTestQuestionNavigationGUI::isAnythingRendered ( )
Returns
boolean

Definition at line 360 of file class.ilTestQuestionNavigationGUI.php.

References $anythingRendered.

Referenced by getHTML().

360  : bool
361  {
363  }
+ Here is the caller graph for this function:

◆ isDiscardSolutionButtonEnabled()

ilTestQuestionNavigationGUI::isDiscardSolutionButtonEnabled ( )
Returns
bool

Definition at line 198 of file class.ilTestQuestionNavigationGUI.php.

References $discardSolutionButtonEnabled.

Referenced by getActionsHTML().

+ Here is the caller graph for this function:

◆ isForceInstantResponseEnabled()

ilTestQuestionNavigationGUI::isForceInstantResponseEnabled ( )
Returns
boolean

Definition at line 254 of file class.ilTestQuestionNavigationGUI.php.

References $forceInstantResponseEnabled.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ isQuestionMarked()

ilTestQuestionNavigationGUI::isQuestionMarked ( )
Returns
boolean

Definition at line 344 of file class.ilTestQuestionNavigationGUI.php.

References $questionMarked.

Referenced by getQuestionMarkActionLabel(), getQuestionMarkIconLabel(), and getQuestionMarkIconSource().

344  : bool
345  {
346  return $this->questionMarked;
347  }
+ Here is the caller graph for this function:

◆ isQuestionWorkedThrough()

ilTestQuestionNavigationGUI::isQuestionWorkedThrough ( )
Returns
boolean

Definition at line 148 of file class.ilTestQuestionNavigationGUI.php.

References $questionWorkedThrough.

Referenced by getEditSolutionButtonLabel().

148  : bool
149  {
151  }
+ Here is the caller graph for this function:

◆ parseButtonsBlock()

ilTestQuestionNavigationGUI::parseButtonsBlock ( ilTemplate  $tpl)
private
Parameters
ilTemplate$tpl

Definition at line 586 of file class.ilTestQuestionNavigationGUI.php.

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

Referenced by renderButtonInstance(), and renderIcon().

587  {
588  $tpl->setCurrentBlock('buttons');
589  $tpl->parseCurrentBlock();
590  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseNavigation()

ilTestQuestionNavigationGUI::parseNavigation ( ilTemplate  $tpl)
private
Parameters
ilTemplate$tpl

Definition at line 577 of file class.ilTestQuestionNavigationGUI.php.

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

Referenced by getHTML().

578  {
579  $tpl->setCurrentBlock('question_related_navigation');
580  $tpl->parseCurrentBlock();
581  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderActionsIcon()

ilTestQuestionNavigationGUI::renderActionsIcon ( ilTemplate  $tpl,
  $iconSrc,
  $label,
  $cssClass 
)
private

Definition at line 677 of file class.ilTestQuestionNavigationGUI.php.

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

Referenced by getActionsHTML().

678  {
679  $tpl->setCurrentBlock("actions_icon");
680  $tpl->setVariable("ICON_SRC", $iconSrc);
681  $tpl->setVariable("ICON_TEXT", $label);
682  $tpl->setVariable("ICON_CLASS", $cssClass);
683  $tpl->parseCurrentBlock();
684  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:546
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderButtonInstance()

ilTestQuestionNavigationGUI::renderButtonInstance ( ilTemplate  $tpl,
Button  $button 
)
private
Parameters
ilTemplate$tpl
$button

Definition at line 596 of file class.ilTestQuestionNavigationGUI.php.

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

Referenced by renderInstantFeedbackButton(), and renderSubmitButton().

597  {
598  $tpl->setCurrentBlock("button_instance");
599  $tpl->setVariable("BUTTON_INSTANCE", $this->ui_renderer->render($button));
600  $tpl->parseCurrentBlock();
601 
602  $this->parseButtonsBlock($tpl);
603  $this->setAnythingRendered();
604  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:546
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderIcon()

ilTestQuestionNavigationGUI::renderIcon ( ilTemplate  $tpl,
  $command,
  $iconSrc,
  $label,
  $cssClass 
)
private
Parameters
ilTemplate$tpl
$command
$iconSrc
$label
$cssClass

Definition at line 663 of file class.ilTestQuestionNavigationGUI.php.

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

664  {
665  $tpl->setCurrentBlock("submit_icon");
666  $tpl->setVariable("SUBMIT_ICON_CMD", $command);
667  $tpl->setVariable("SUBMIT_ICON_SRC", $iconSrc);
668  $tpl->setVariable("SUBMIT_ICON_TEXT", $label);
669  $tpl->setVariable("SUBMIT_ICON_CLASS", $cssClass);
670  $tpl->parseCurrentBlock();
671 
672  $this->parseButtonsBlock($tpl);
673  $this->setAnythingRendered();
674  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:546
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ renderInstantFeedbackButton()

ilTestQuestionNavigationGUI::renderInstantFeedbackButton ( ilTemplate  $tpl,
string  $command,
string  $label,
bool  $is_primary 
)
private

Definition at line 624 of file class.ilTestQuestionNavigationGUI.php.

References getOnLoadCode(), and renderButtonInstance().

Referenced by getHTML().

629  : void {
630  $on_load_code = $this->getOnLoadCode($command);
631  if ($is_primary) {
632  $this->renderButtonInstance(
633  $tpl,
634  $this->ui_factory->button()->primary($label, '')->withAdditionalOnLoadCode($on_load_code)
635  );
636  return;
637  }
638 
639  $this->renderButtonInstance(
640  $tpl,
641  $this->ui_factory->button()->standard($label, '')->withAdditionalOnLoadCode($on_load_code)
642  );
643  }
renderButtonInstance(ilTemplate $tpl, Button $button)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderSubmitButton()

ilTestQuestionNavigationGUI::renderSubmitButton ( ilTemplate  $tpl,
string  $command,
string  $label 
)
private
Parameters
ilTemplate$tpl
$command
$label
bool | false$primary

Definition at line 612 of file class.ilTestQuestionNavigationGUI.php.

References getOnLoadCode(), and renderButtonInstance().

Referenced by getHTML().

616  : void {
617  $on_load_code = $this->getOnLoadCode($command);
618  $this->renderButtonInstance(
619  $tpl,
620  $this->ui_factory->button()->standard($label, '')->withAdditionalOnLoadCode($on_load_code)
621  );
622  }
renderButtonInstance(ilTemplate $tpl, Button $button)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAnswerFreezingEnabled()

ilTestQuestionNavigationGUI::setAnswerFreezingEnabled (   $answerFreezingEnabled)
Parameters
boolean$answerFreezingEnabled

Definition at line 270 of file class.ilTestQuestionNavigationGUI.php.

References $answerFreezingEnabled.

271  {
272  $this->answerFreezingEnabled = $answerFreezingEnabled;
273  }

◆ setAnythingRendered()

ilTestQuestionNavigationGUI::setAnythingRendered ( )
Parameters
boolean$buttonRendered

Definition at line 368 of file class.ilTestQuestionNavigationGUI.php.

Referenced by renderButtonInstance(), and renderIcon().

369  {
370  $this->anythingRendered = true;
371  }
+ Here is the caller graph for this function:

◆ setDiscardSolutionButtonEnabled()

ilTestQuestionNavigationGUI::setDiscardSolutionButtonEnabled (   $discardSolutionButtonEnabled)
Parameters
bool$discardSolutionButtonEnabled

Definition at line 206 of file class.ilTestQuestionNavigationGUI.php.

References $discardSolutionButtonEnabled.

207  {
208  $this->discardSolutionButtonEnabled = $discardSolutionButtonEnabled;
209  }

◆ setEditSolutionCommand()

ilTestQuestionNavigationGUI::setEditSolutionCommand (   $editSolutionCommand)
Parameters
string$editSolutionCommand

Definition at line 140 of file class.ilTestQuestionNavigationGUI.php.

References $editSolutionCommand.

141  {
142  $this->editSolutionCommand = $editSolutionCommand;
143  }

◆ setForceInstantResponseEnabled()

ilTestQuestionNavigationGUI::setForceInstantResponseEnabled (   $forceInstantResponseEnabled)
Parameters
boolean$forceInstantResponseEnabled

Definition at line 262 of file class.ilTestQuestionNavigationGUI.php.

References $forceInstantResponseEnabled.

263  {
264  $this->forceInstantResponseEnabled = $forceInstantResponseEnabled;
265  }

◆ setHintRequestsExist()

ilTestQuestionNavigationGUI::setHintRequestsExist (   $hintRequestsExist)
Parameters
boolean$hintRequestsExist

Definition at line 318 of file class.ilTestQuestionNavigationGUI.php.

References $hintRequestsExist, and hintRequestsExist().

+ Here is the call graph for this function:

◆ setInstantFeedbackCommand()

ilTestQuestionNavigationGUI::setInstantFeedbackCommand (   $instantFeedbackCommand)
Parameters
string$instantFeedbackCommand

Definition at line 238 of file class.ilTestQuestionNavigationGUI.php.

References $instantFeedbackCommand.

239  {
240  $this->instantFeedbackCommand = $instantFeedbackCommand;
241  }

◆ setQuestionMarked()

ilTestQuestionNavigationGUI::setQuestionMarked (   $questionMarked)
Parameters
boolean$questionMarked

Definition at line 352 of file class.ilTestQuestionNavigationGUI.php.

References $questionMarked.

353  {
354  $this->questionMarked = $questionMarked;
355  }

◆ setQuestionMarkLinkTarget()

ilTestQuestionNavigationGUI::setQuestionMarkLinkTarget (   $questionMarkLinkTarget)
Parameters
string$questionMarkLinkTarget

Definition at line 335 of file class.ilTestQuestionNavigationGUI.php.

References $questionMarkLinkTarget.

336  {
337  $this->questionMarkLinkTarget = $questionMarkLinkTarget;
338  }

◆ setQuestionWorkedThrough()

ilTestQuestionNavigationGUI::setQuestionWorkedThrough (   $questionWorkedThrough)
Parameters
boolean$questionWorkedThrough

Definition at line 156 of file class.ilTestQuestionNavigationGUI.php.

References $questionWorkedThrough.

157  {
158  $this->questionWorkedThrough = $questionWorkedThrough;
159  }

◆ setRequestHintCommand()

ilTestQuestionNavigationGUI::setRequestHintCommand (   $requestHintCommand)
Parameters
string$requestHintCommand

Definition at line 286 of file class.ilTestQuestionNavigationGUI.php.

References $requestHintCommand.

287  {
288  $this->requestHintCommand = $requestHintCommand;
289  }

◆ setRevertChangesLinkTarget()

ilTestQuestionNavigationGUI::setRevertChangesLinkTarget (   $revertChangesLinkTarget)
Parameters
string

Definition at line 189 of file class.ilTestQuestionNavigationGUI.php.

References $revertChangesLinkTarget.

190  {
191  $this->revertChangesLinkTarget = $revertChangesLinkTarget;
192  }

◆ setShowHintsCommand()

ilTestQuestionNavigationGUI::setShowHintsCommand (   $showHintsCommand)
Parameters
string$showHintsCommand

Definition at line 302 of file class.ilTestQuestionNavigationGUI.php.

References $showHintsCommand.

303  {
304  $this->showHintsCommand = $showHintsCommand;
305  }

◆ setSkipQuestionLinkTarget()

ilTestQuestionNavigationGUI::setSkipQuestionLinkTarget (   $skipQuestionLinkTarget)
Parameters
string$skipQuestionLinkTarget

Definition at line 222 of file class.ilTestQuestionNavigationGUI.php.

References $skipQuestionLinkTarget.

223  {
224  $this->skipQuestionLinkTarget = $skipQuestionLinkTarget;
225  }

◆ setSubmitSolutionCommand()

ilTestQuestionNavigationGUI::setSubmitSolutionCommand (   $submitSolutionCommand)
Parameters
string$submitSolutionCommand

Definition at line 172 of file class.ilTestQuestionNavigationGUI.php.

References $submitSolutionCommand.

173  {
174  $this->submitSolutionCommand = $submitSolutionCommand;
175  }

Field Documentation

◆ $answerFreezingEnabled

ilTestQuestionNavigationGUI::$answerFreezingEnabled = false
private

◆ $anythingRendered

ilTestQuestionNavigationGUI::$anythingRendered = false
private

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

Referenced by isAnythingRendered().

◆ $discardSolutionButtonEnabled

ilTestQuestionNavigationGUI::$discardSolutionButtonEnabled = false
private

◆ $editSolutionCommand

ilTestQuestionNavigationGUI::$editSolutionCommand = ''
private

◆ $forceInstantResponseEnabled

ilTestQuestionNavigationGUI::$forceInstantResponseEnabled = false
private

◆ $hintRequestsExist

ilTestQuestionNavigationGUI::$hintRequestsExist = false
private

◆ $instantFeedbackCommand

ilTestQuestionNavigationGUI::$instantFeedbackCommand = ''
private

◆ $questionMarked

ilTestQuestionNavigationGUI::$questionMarked = false
private

Definition at line 110 of file class.ilTestQuestionNavigationGUI.php.

Referenced by isQuestionMarked(), and setQuestionMarked().

◆ $questionMarkLinkTarget

ilTestQuestionNavigationGUI::$questionMarkLinkTarget = ''
private

◆ $questionWorkedThrough

ilTestQuestionNavigationGUI::$questionWorkedThrough = false
private

◆ $requestHintCommand

ilTestQuestionNavigationGUI::$requestHintCommand = ''
private

◆ $revertChangesLinkTarget

ilTestQuestionNavigationGUI::$revertChangesLinkTarget = ''
private

◆ $showHintsCommand

ilTestQuestionNavigationGUI::$showHintsCommand = ''
private

◆ $skipQuestionLinkTarget

ilTestQuestionNavigationGUI::$skipQuestionLinkTarget = ''
private

◆ $submitSolutionCommand

ilTestQuestionNavigationGUI::$submitSolutionCommand = ''
private

◆ $ui

ILIAS DI UIServices ilTestQuestionNavigationGUI::$ui
private

Definition at line 36 of file class.ilTestQuestionNavigationGUI.php.

◆ CSS_CLASS_SUBMIT_BUTTONS

const ilTestQuestionNavigationGUI::CSS_CLASS_SUBMIT_BUTTONS = 'ilc_qsubmit_Submit'

Definition at line 35 of file class.ilTestQuestionNavigationGUI.php.

◆ SHOW_DISABLED_COMMANDS

const ilTestQuestionNavigationGUI::SHOW_DISABLED_COMMANDS = false

Definition at line 33 of file class.ilTestQuestionNavigationGUI.php.


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