ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 (ilToolbarItem $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...
 
 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
 $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 320 of file class.ilTestNavigationToolbarGUI.php.

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

Referenced by build().

321  {
323  $btn->setNextCommand($this->getFinishTestCommand());
324  $btn->setUrl($this->ctrl->getLinkTarget(
325  $this->playerGUI, $this->getFinishTestCommand()
326  ));
327  $btn->setCaption('finish_test');
328  //$btn->setDisabled($this->isDisabledStateEnabled());
329  $btn->setPrimary($this->isFinishTestButtonPrimary());
330  $btn->addCSSClass('ilTstNavElem');
331  $this->addButtonInstance($btn);
332  }
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 274 of file class.ilTestNavigationToolbarGUI.php.

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

Referenced by build().

275  {
277  $btn->setNextCommand(ilTestPlayerCommands::QUESTION_SUMMARY);
278  $btn->setUrl($this->ctrl->getLinkTarget(
280  ));
281  $btn->setCaption('question_summary_btn');
282  //$btn->setDisabled($this->isDisabledStateEnabled());
283  $btn->addCSSClass('ilTstNavElem');
284  $this->addButtonInstance($btn);
285  }
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 287 of file class.ilTestNavigationToolbarGUI.php.

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

Referenced by build().

288  {
290  $btn->setNextCommand(ilTestPlayerCommands::SHOW_QUESTION_SELECTION);
291  $btn->setUrl($this->ctrl->getLinkTarget(
293  ));
294  $btn->setCaption('tst_change_dyn_test_question_selection');
295  //$btn->setDisabled($this->isDisabledStateEnabled());
296  $btn->addCSSClass('ilTstNavElem');
297  $this->addButtonInstance($btn);
298  }
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 300 of file class.ilTestNavigationToolbarGUI.php.

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

Referenced by build().

301  {
303  $btn->setNextCommand(ilTestPlayerCommands::TOGGLE_SIDE_LIST);
304  $btn->setUrl($this->ctrl->getLinkTarget(
306  ));
307  if( $this->isQuestionTreeVisible() )
308  {
309  $btn->setCaption('tst_hide_side_list');
310  }
311  else
312  {
313  $btn->setCaption('tst_show_side_list');
314  }
315  //$btn->setDisabled($this->isDisabledStateEnabled());
316  $btn->addCSSClass('ilTstNavElem');
317  $this->addButtonInstance($btn);
318  }
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 261 of file class.ilTestNavigationToolbarGUI.php.

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

Referenced by build().

262  {
264  $btn->setNextCommand(ilTestPlayerCommands::SUSPEND_TEST);
265  $btn->setUrl($this->ctrl->getLinkTarget(
266  $this->playerGUI, ilTestPlayerCommands::SUSPEND_TEST
267  ));
268  $btn->setCaption('cancel_test');
269  //$btn->setDisabled($this->isDisabledStateEnabled());
270  $btn->addCSSClass('ilTstNavElem');
271  $this->addButtonInstance($btn);
272  }
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  {
237  $this->addQuestionTreeButton();
238  }
239 
240  if( $this->isQuestionListButtonEnabled() )
241  {
242  $this->addQuestionListButton();
243  }
244 
245  if( $this->isQuestionSelectionButtonEnabled() )
246  {
248  }
249 
250  if( $this->isSuspendTestButtonEnabled() )
251  {
252  $this->addSuspendTestButton();
253  }
254 
255  if( $this->isFinishTestButtonEnabled() )
256  {
257  $this->addFinishTestButton();
258  }
259  }
+ 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: