ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilAssQuestionRelatedNavigationBarGUI.php
Go to the documentation of this file.
1 <?php
2 
26 {
30  protected $ctrl;
31 
35  protected $lng;
38 
40  {
41  $this->ctrl = $ctrl;
42  $this->lng = $lng;
43  }
44 
45  public function setInstantResponseEnabled($instantFeedbackEnabled): void
46  {
47  $this->instantResponseEnabled = $instantFeedbackEnabled;
48  }
49 
50  public function isInstantResponseEnabled()
51  {
53  }
54 
56  {
57  $this->instantResponseCmd = $instantResponseCmd;
58  }
59 
60  public function getInstantResponseCmd()
61  {
63  }
64 
65  public function getHTML(): string
66  {
67  $navTpl = new ilTemplate('tpl.qst_question_related_navigation.html', true, true, 'components/ILIAS/TestQuestionPool');
68 
69  $parseQuestionRelatedNavigation = false;
70 
71  if ($this->isInstantResponseEnabled()) {
72  $navTpl->setCurrentBlock("direct_feedback");
73  $navTpl->setVariable("CMD_SHOW_INSTANT_RESPONSE", $this->getInstantResponseCmd());
74  $navTpl->setVariable("TEXT_SHOW_INSTANT_RESPONSE", $this->lng->txt("check"));
75  $navTpl->parseCurrentBlock();
76 
77  $parseQuestionRelatedNavigation = true;
78  }
79 
80  if ($parseQuestionRelatedNavigation) {
81  $navTpl->setCurrentBlock("question_related_navigation");
82  $navTpl->parseCurrentBlock();
83  }
84 
85  return $navTpl->get();
86  }
87 }