ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTestNavigationToolbarGUI Class Reference
+ Inheritance diagram for ilTestNavigationToolbarGUI:
+ Collaboration diagram for ilTestNavigationToolbarGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $lng, ilTestPlayerAbstractGUI $playerGUI)
 
 isSuspendTestButtonEnabled ()
 
 setSuspendTestButtonEnabled ($suspendTestButtonEnabled)
 
 isQuestionListButtonEnabled ()
 
 setQuestionListButtonEnabled ($questionListButtonEnabled)
 
 isQuestionTreeButtonEnabled ()
 
 setQuestionTreeButtonEnabled ($questionTreeButtonEnabled)
 
 isQuestionTreeVisible ()
 
 setQuestionTreeVisible ($questionTreeVisible)
 
 isQuestionSelectionButtonEnabled ()
 
 setQuestionSelectionButtonEnabled ($questionSelectionButtonEnabled)
 
 isFinishTestButtonEnabled ()
 
 setFinishTestButtonEnabled ($finishTestButtonEnabled)
 
 getFinishTestCommand ()
 
 setFinishTestCommand ($finishTestCommand)
 
 isFinishTestButtonPrimary ()
 
 setFinishTestButtonPrimary ($finishTestButtonPrimary)
 
 isDisabledStateEnabled ()
 
 setDisabledStateEnabled ($disabledStateEnabled)
 
 build ()
 
- Public Member Functions inherited from ilToolbarGUI
 __construct ()
 
 setFormAction ($a_val, $a_multipart=false, $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 Get form action. More...
 
 setLeadingImage ($a_img, $a_alt)
 Set leading image. More...
 
 setHidden ($a_val)
 Set hidden. More...
 
 getHidden ()
 Get hidden. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 addButton ( $a_txt, $a_cmd, $a_target="", $a_acc_key="", $a_additional_attrs='', $a_id="", $a_class='submit')
 Add button to toolbar. More...
 
 addFormButton ($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
 Add form button to toolbar. More...
 
 addInputItem (ilToolbarItem $a_item, $a_output_label=false)
 Add input item. More...
 
 addStickyItem ($a_item, $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown ($a_txt, $a_dd_html)
 Add input item. More...
 
 addSeparator ()
 Add separator. More...
 
 addText ($a_text)
 Add text. More...
 
 addSpacer ($a_width=null)
 Add spacer. More...
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 Add component. More...
 
 addLink ($a_caption, $a_url, $a_disabled=false)
 Add link. More...
 
 setOpenFormTag ($a_val)
 Set open form tag. More...
 
 getOpenFormTag ()
 Get open form tag. More...
 
 setCloseFormTag ($a_val)
 Set close form tag. More...
 
 getCloseFormTag ()
 Get close form tag. More...
 
 setFormName ($a_val)
 Set form name. More...
 
 getFormName ()
 Get form name. More...
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems ($items)
 

Protected Attributes

 $ctrl
 
 $lng
 
 $playerGUI
 
- Protected Attributes inherited from ilToolbarGUI
 $lng
 
 $id = ''
 
 $form_action = ''
 
 $hidden
 
 $lead_img
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $form_target = ""
 
 $form_name = ""
 
 $prevent_double_submission = false
 
 $sticky_items = array()
 
 $has_separator = false
 

Private Member Functions

 addSuspendTestButton ()
 
 addQuestionListButton ()
 
 addQuestionSelectionButton ()
 
 addQuestionTreeButton ()
 
 addFinishTestButton ()
 

Private Attributes

 $suspendTestButtonEnabled = false
 
 $questionListButtonEnabled = false
 
 $questionTreeButtonEnabled = false
 
 $questionTreeVisible = false
 
 $questionSelectionButtonEnabled = false
 
 $finishTestButtonEnabled = false
 
 $finishTestCommand = ''
 
 $finishTestButtonPrimary = false
 
 $disabledStateEnabled = false
 

Additional Inherited Members

- Data Fields inherited from ilToolbarGUI
 $items = array()
 
- Protected Member Functions inherited from ilToolbarGUI
 applyAutoStickyToSingleElement ()
 If the toolbar consists of only one button, make it sticky Note: Atm this is only possible for buttons. More...
 
- Static Protected Attributes inherited from ilToolbarGUI
static $instances = 0
 

Detailed Description

Definition at line 13 of file class.ilTestNavigationToolbarGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestNavigationToolbarGUI::__construct ( ilCtrl  $ctrl,
ilLanguage  $lng,
ilTestPlayerAbstractGUI  $playerGUI 
)
Parameters
ilCtrl$ctrl
ilLanguage$lng
ilTestPlayerAbstractGUI$playerGUI

Definition at line 80 of file class.ilTestNavigationToolbarGUI.php.

References $ctrl, $lng, and $playerGUI.

81  {
82  $this->ctrl = $ctrl;
83  $this->lng = $lng;
84  $this->playerGUI = $playerGUI;
85 
86  parent::__construct();
87  }

Member Function Documentation

◆ addFinishTestButton()

ilTestNavigationToolbarGUI::addFinishTestButton ( )
private

Definition at line 316 of file class.ilTestNavigationToolbarGUI.php.

References ilToolbarGUI\addButtonInstance(), getFinishTestCommand(), ilTestPlayerNavButton\getInstance(), and isFinishTestButtonPrimary().

Referenced by build().

317  {
319  $btn->setNextCommand($this->getFinishTestCommand());
320  $btn->setUrl($this->ctrl->getLinkTarget(
321  $this->playerGUI,
322  $this->getFinishTestCommand()
323  ));
324  $btn->setCaption('finish_test');
325  //$btn->setDisabled($this->isDisabledStateEnabled());
326  $btn->setPrimary($this->isFinishTestButtonPrimary());
327  $btn->addCSSClass('ilTstNavElem');
328  $this->addButtonInstance($btn);
329  }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addQuestionListButton()

ilTestNavigationToolbarGUI::addQuestionListButton ( )
private

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

References ilToolbarGUI\addButtonInstance(), ilTestPlayerNavButton\getInstance(), and ilTestPlayerCommands\QUESTION_SUMMARY.

Referenced by build().

271  {
273  $btn->setNextCommand(ilTestPlayerCommands::QUESTION_SUMMARY);
274  $btn->setUrl($this->ctrl->getLinkTarget(
275  $this->playerGUI,
277  ));
278  $btn->setCaption('question_summary_btn');
279  //$btn->setDisabled($this->isDisabledStateEnabled());
280  $btn->addCSSClass('ilTstNavElem');
281  $this->addButtonInstance($btn);
282  }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addQuestionSelectionButton()

ilTestNavigationToolbarGUI::addQuestionSelectionButton ( )
private

Definition at line 284 of file class.ilTestNavigationToolbarGUI.php.

References ilToolbarGUI\addButtonInstance(), ilTestPlayerNavButton\getInstance(), and ilTestPlayerCommands\SHOW_QUESTION_SELECTION.

Referenced by build().

285  {
287  $btn->setNextCommand(ilTestPlayerCommands::SHOW_QUESTION_SELECTION);
288  $btn->setUrl($this->ctrl->getLinkTarget(
289  $this->playerGUI,
291  ));
292  $btn->setCaption('tst_change_dyn_test_question_selection');
293  //$btn->setDisabled($this->isDisabledStateEnabled());
294  $btn->addCSSClass('ilTstNavElem');
295  $this->addButtonInstance($btn);
296  }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addQuestionTreeButton()

ilTestNavigationToolbarGUI::addQuestionTreeButton ( )
private

Definition at line 298 of file class.ilTestNavigationToolbarGUI.php.

References ilToolbarGUI\addButtonInstance(), ilTestPlayerNavButton\getInstance(), isQuestionTreeVisible(), and ilTestPlayerCommands\TOGGLE_SIDE_LIST.

Referenced by build().

299  {
301  $btn->setNextCommand(ilTestPlayerCommands::TOGGLE_SIDE_LIST);
302  $btn->setUrl($this->ctrl->getLinkTarget(
303  $this->playerGUI,
305  ));
306  if ($this->isQuestionTreeVisible()) {
307  $btn->setCaption('tst_hide_side_list');
308  } else {
309  $btn->setCaption('tst_show_side_list');
310  }
311  //$btn->setDisabled($this->isDisabledStateEnabled());
312  $btn->addCSSClass('ilTstNavElem');
313  $this->addButtonInstance($btn);
314  }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSuspendTestButton()

ilTestNavigationToolbarGUI::addSuspendTestButton ( )
private

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

References ilToolbarGUI\addButtonInstance(), ilTestPlayerNavButton\getInstance(), and ilTestPlayerCommands\SUSPEND_TEST.

Referenced by build().

257  {
259  $btn->setNextCommand(ilTestPlayerCommands::SUSPEND_TEST);
260  $btn->setUrl($this->ctrl->getLinkTarget(
261  $this->playerGUI,
263  ));
264  $btn->setCaption('cancel_test');
265  //$btn->setDisabled($this->isDisabledStateEnabled());
266  $btn->addCSSClass('ilTstNavElem');
267  $this->addButtonInstance($btn);
268  }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build()

ilTestNavigationToolbarGUI::build ( )

Definition at line 233 of file class.ilTestNavigationToolbarGUI.php.

References addFinishTestButton(), addQuestionListButton(), addQuestionSelectionButton(), addQuestionTreeButton(), addSuspendTestButton(), isFinishTestButtonEnabled(), isQuestionListButtonEnabled(), isQuestionSelectionButtonEnabled(), isQuestionTreeButtonEnabled(), and isSuspendTestButtonEnabled().

234  {
235  if ($this->isQuestionTreeButtonEnabled()) {
236  $this->addQuestionTreeButton();
237  }
238 
239  if ($this->isQuestionListButtonEnabled()) {
240  $this->addQuestionListButton();
241  }
242 
243  if ($this->isQuestionSelectionButtonEnabled()) {
245  }
246 
247  if ($this->isSuspendTestButtonEnabled()) {
248  $this->addSuspendTestButton();
249  }
250 
251  if ($this->isFinishTestButtonEnabled()) {
252  $this->addFinishTestButton();
253  }
254  }
+ Here is the call graph for this function:

◆ getFinishTestCommand()

ilTestNavigationToolbarGUI::getFinishTestCommand ( )
Returns
string

Definition at line 188 of file class.ilTestNavigationToolbarGUI.php.

References $finishTestCommand.

Referenced by addFinishTestButton().

+ Here is the caller graph for this function:

◆ isDisabledStateEnabled()

ilTestNavigationToolbarGUI::isDisabledStateEnabled ( )
Returns
boolean

Definition at line 220 of file class.ilTestNavigationToolbarGUI.php.

References $disabledStateEnabled.

◆ isFinishTestButtonEnabled()

ilTestNavigationToolbarGUI::isFinishTestButtonEnabled ( )
Returns
boolean

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

References $finishTestButtonEnabled.

Referenced by build().

+ Here is the caller graph for this function:

◆ isFinishTestButtonPrimary()

ilTestNavigationToolbarGUI::isFinishTestButtonPrimary ( )
Returns
boolean

Definition at line 204 of file class.ilTestNavigationToolbarGUI.php.

References $finishTestButtonPrimary.

Referenced by addFinishTestButton().

+ Here is the caller graph for this function:

◆ isQuestionListButtonEnabled()

ilTestNavigationToolbarGUI::isQuestionListButtonEnabled ( )
Returns
boolean

Definition at line 108 of file class.ilTestNavigationToolbarGUI.php.

References $questionListButtonEnabled.

Referenced by build().

+ Here is the caller graph for this function:

◆ isQuestionSelectionButtonEnabled()

ilTestNavigationToolbarGUI::isQuestionSelectionButtonEnabled ( )
Returns
boolean

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

References $questionSelectionButtonEnabled.

Referenced by build().

+ Here is the caller graph for this function:

◆ isQuestionTreeButtonEnabled()

ilTestNavigationToolbarGUI::isQuestionTreeButtonEnabled ( )
Returns
boolean

Definition at line 124 of file class.ilTestNavigationToolbarGUI.php.

References $questionTreeButtonEnabled.

Referenced by build().

+ Here is the caller graph for this function:

◆ isQuestionTreeVisible()

ilTestNavigationToolbarGUI::isQuestionTreeVisible ( )
Returns
boolean

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

References $questionTreeVisible.

Referenced by addQuestionTreeButton().

+ Here is the caller graph for this function:

◆ isSuspendTestButtonEnabled()

ilTestNavigationToolbarGUI::isSuspendTestButtonEnabled ( )
Returns
boolean

Definition at line 92 of file class.ilTestNavigationToolbarGUI.php.

References $suspendTestButtonEnabled.

Referenced by build().

+ Here is the caller graph for this function:

◆ setDisabledStateEnabled()

ilTestNavigationToolbarGUI::setDisabledStateEnabled (   $disabledStateEnabled)
Parameters
boolean$disabledStateEnabled

Definition at line 228 of file class.ilTestNavigationToolbarGUI.php.

References $disabledStateEnabled.

229  {
230  $this->disabledStateEnabled = $disabledStateEnabled;
231  }

◆ setFinishTestButtonEnabled()

ilTestNavigationToolbarGUI::setFinishTestButtonEnabled (   $finishTestButtonEnabled)
Parameters
boolean$finishTestButtonEnabled

Definition at line 180 of file class.ilTestNavigationToolbarGUI.php.

References $finishTestButtonEnabled.

181  {
182  $this->finishTestButtonEnabled = $finishTestButtonEnabled;
183  }

◆ setFinishTestButtonPrimary()

ilTestNavigationToolbarGUI::setFinishTestButtonPrimary (   $finishTestButtonPrimary)
Parameters
boolean$finishTestButtonPrimary

Definition at line 212 of file class.ilTestNavigationToolbarGUI.php.

References $finishTestButtonPrimary.

Referenced by ilTestOutputGUI\handlePrimaryButton().

213  {
214  $this->finishTestButtonPrimary = $finishTestButtonPrimary;
215  }
+ Here is the caller graph for this function:

◆ setFinishTestCommand()

ilTestNavigationToolbarGUI::setFinishTestCommand (   $finishTestCommand)
Parameters
string$finishTestCommand

Definition at line 196 of file class.ilTestNavigationToolbarGUI.php.

References $finishTestCommand.

197  {
198  $this->finishTestCommand = $finishTestCommand;
199  }

◆ setQuestionListButtonEnabled()

ilTestNavigationToolbarGUI::setQuestionListButtonEnabled (   $questionListButtonEnabled)
Parameters
boolean$questionListButtonEnabled

Definition at line 116 of file class.ilTestNavigationToolbarGUI.php.

References $questionListButtonEnabled.

117  {
118  $this->questionListButtonEnabled = $questionListButtonEnabled;
119  }

◆ setQuestionSelectionButtonEnabled()

ilTestNavigationToolbarGUI::setQuestionSelectionButtonEnabled (   $questionSelectionButtonEnabled)
Parameters
boolean$questionSelectionButtonEnabled

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

References $questionSelectionButtonEnabled.

165  {
166  $this->questionSelectionButtonEnabled = $questionSelectionButtonEnabled;
167  }

◆ setQuestionTreeButtonEnabled()

ilTestNavigationToolbarGUI::setQuestionTreeButtonEnabled (   $questionTreeButtonEnabled)
Parameters
boolean$questionTreeButtonEnabled

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

References $questionTreeButtonEnabled.

133  {
134  $this->questionTreeButtonEnabled = $questionTreeButtonEnabled;
135  }

◆ setQuestionTreeVisible()

ilTestNavigationToolbarGUI::setQuestionTreeVisible (   $questionTreeVisible)
Parameters
boolean$questionTreeVisible

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

References $questionTreeVisible.

149  {
150  $this->questionTreeVisible = $questionTreeVisible;
151  }

◆ setSuspendTestButtonEnabled()

ilTestNavigationToolbarGUI::setSuspendTestButtonEnabled (   $suspendTestButtonEnabled)
Parameters
boolean$suspendTestButtonEnabled

Definition at line 100 of file class.ilTestNavigationToolbarGUI.php.

References $suspendTestButtonEnabled.

101  {
102  $this->suspendTestButtonEnabled = $suspendTestButtonEnabled;
103  }

Field Documentation

◆ $ctrl

ilTestNavigationToolbarGUI::$ctrl
protected

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

Referenced by __construct().

◆ $disabledStateEnabled

ilTestNavigationToolbarGUI::$disabledStateEnabled = false
private

◆ $finishTestButtonEnabled

ilTestNavigationToolbarGUI::$finishTestButtonEnabled = false
private

◆ $finishTestButtonPrimary

ilTestNavigationToolbarGUI::$finishTestButtonPrimary = false
private

◆ $finishTestCommand

ilTestNavigationToolbarGUI::$finishTestCommand = ''
private

◆ $lng

ilTestNavigationToolbarGUI::$lng
protected

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

Referenced by __construct().

◆ $playerGUI

ilTestNavigationToolbarGUI::$playerGUI
protected

Definition at line 28 of file class.ilTestNavigationToolbarGUI.php.

Referenced by __construct().

◆ $questionListButtonEnabled

ilTestNavigationToolbarGUI::$questionListButtonEnabled = false
private

◆ $questionSelectionButtonEnabled

ilTestNavigationToolbarGUI::$questionSelectionButtonEnabled = false
private

◆ $questionTreeButtonEnabled

ilTestNavigationToolbarGUI::$questionTreeButtonEnabled = false
private

◆ $questionTreeVisible

ilTestNavigationToolbarGUI::$questionTreeVisible = false
private

◆ $suspendTestButtonEnabled

ilTestNavigationToolbarGUI::$suspendTestButtonEnabled = false
private

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