ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAssQuestionRelatedNavigationBarGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
12 {
16  protected $ctrl;
17 
21  protected $lng;
22 
24 
26 
28 
30 
31  protected $hintRequestsExist;
32 
33  protected $hintRequestCmd;
34 
35  protected $hintListCmd;
36 
38  {
39  $this->ctrl = $ctrl;
40  $this->lng = $lng;
41  }
42 
43  public function getHintListCmd()
44  {
45  return $this->hintListCmd;
46  }
47 
48  public function setHintListCmd($hintListCmd)
49  {
50  $this->hintListCmd = $hintListCmd;
51  }
52 
53  public function getHintRequestCmd()
54  {
55  return $this->hintRequestCmd;
56  }
57 
59  {
60  $this->hintRequestCmd = $hintRequestCmd;
61  }
62 
64  {
65  $this->hintRequestsExist = $hintRequestsExist;
66  }
67 
68  public function doesHintRequestsExist()
69  {
71  }
72 
74  {
75  $this->hintRequestsPossible = $hintRequestsPossible;
76  }
77 
78  public function areHintRequestsPossible()
79  {
81  }
82 
84  {
85  $this->hintProvidingEnabled = $hintProvidingEnabled;
86  }
87 
88  public function isHintProvidingEnabled()
89  {
91  }
92 
93  public function setInstantResponseEnabled($instantFeedbackEnabled)
94  {
95  $this->instantResponseEnabled = $instantFeedbackEnabled;
96  }
97 
98  public function isInstantResponseEnabled()
99  {
101  }
102 
104  {
105  $this->instantResponseCmd = $instantResponseCmd;
106  }
107 
108  public function getInstantResponseCmd()
109  {
111  }
112 
113  public function getHTML()
114  {
115  $navTpl = new ilTemplate('tpl.qst_question_related_navigation.html', true, true, 'Modules/TestQuestionPool');
116 
117  $parseQuestionRelatedNavigation = false;
118 
119  if ($this->isInstantResponseEnabled()) {
120  $navTpl->setCurrentBlock("direct_feedback");
121  $navTpl->setVariable("CMD_SHOW_INSTANT_RESPONSE", $this->getInstantResponseCmd());
122  $navTpl->setVariable("TEXT_SHOW_INSTANT_RESPONSE", $this->lng->txt("check"));
123  $navTpl->parseCurrentBlock();
124 
125  $parseQuestionRelatedNavigation = true;
126  }
127 
128  if ($this->isHintProvidingEnabled()) {
129  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
130  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
131 
132  if ($this->areHintRequestsPossible()) {
133  if ($this->doesHintRequestsExist()) {
134  $buttonText = $this->lng->txt("button_request_next_question_hint");
135  } else {
136  $buttonText = $this->lng->txt("button_request_question_hint");
137  }
138 
139  $navTpl->setCurrentBlock("button_request_next_question_hint");
140  $navTpl->setVariable("CMD_REQUEST_NEXT_QUESTION_HINT", $this->getHintRequestCmd());
141  $navTpl->setVariable("TEXT_REQUEST_NEXT_QUESTION_HINT", $buttonText);
142  $navTpl->parseCurrentBlock();
143 
144  $parseQuestionRelatedNavigation = true;
145  }
146 
147  if ($this->doesHintRequestsExist()) {
148  $navTpl->setCurrentBlock("button_show_requested_question_hints");
149  $navTpl->setVariable("CMD_SHOW_REQUESTED_QUESTION_HINTS", $this->getHintListCmd());
150  $navTpl->setVariable("TEXT_SHOW_REQUESTED_QUESTION_HINTS", $this->lng->txt("button_show_requested_question_hints"));
151  $navTpl->parseCurrentBlock();
152 
153  $parseQuestionRelatedNavigation = true;
154  }
155  }
156 
157  if ($parseQuestionRelatedNavigation) {
158  $navTpl->setCurrentBlock("question_related_navigation");
159  $navTpl->parseCurrentBlock();
160  }
161 
162  return $navTpl->get();
163  }
164 }
This class provides processing control methods.
special template class to simplify handling of ITX/PEAR
language handling