ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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  {
121  $navTpl->setCurrentBlock("direct_feedback");
122  $navTpl->setVariable("CMD_SHOW_INSTANT_RESPONSE", $this->getInstantResponseCmd());
123  $navTpl->setVariable("TEXT_SHOW_INSTANT_RESPONSE", $this->lng->txt("check"));
124  $navTpl->parseCurrentBlock();
125 
126  $parseQuestionRelatedNavigation = true;
127  }
128 
129  if( $this->isHintProvidingEnabled() )
130  {
131  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
132  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
133 
134  if( $this->areHintRequestsPossible() )
135  {
136  if( $this->doesHintRequestsExist() )
137  {
138  $buttonText = $this->lng->txt("button_request_next_question_hint");
139  }
140  else
141  {
142  $buttonText = $this->lng->txt("button_request_question_hint");
143  }
144 
145  $navTpl->setCurrentBlock("button_request_next_question_hint");
146  $navTpl->setVariable("CMD_REQUEST_NEXT_QUESTION_HINT", $this->getHintRequestCmd());
147  $navTpl->setVariable("TEXT_REQUEST_NEXT_QUESTION_HINT", $buttonText);
148  $navTpl->parseCurrentBlock();
149 
150  $parseQuestionRelatedNavigation = true;
151  }
152 
153  if( $this->doesHintRequestsExist() )
154  {
155  $navTpl->setCurrentBlock("button_show_requested_question_hints");
156  $navTpl->setVariable("CMD_SHOW_REQUESTED_QUESTION_HINTS", $this->getHintListCmd());
157  $navTpl->setVariable("TEXT_SHOW_REQUESTED_QUESTION_HINTS", $this->lng->txt("button_show_requested_question_hints"));
158  $navTpl->parseCurrentBlock();
159 
160  $parseQuestionRelatedNavigation = true;
161  }
162  }
163 
164  if( $parseQuestionRelatedNavigation )
165  {
166  $navTpl->setCurrentBlock("question_related_navigation");
167  $navTpl->parseCurrentBlock();
168  }
169 
170  return $navTpl->get();
171  }
172 }
This class provides processing control methods.
special template class to simplify handling of ITX/PEAR
language handling