ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 (bool $questionTreeVisible)
 
 isQuestionSelectionButtonEnabled ()
 
 setQuestionSelectionButtonEnabled ($questionSelectionButtonEnabled)
 
 isFinishTestButtonEnabled ()
 
 setFinishTestButtonEnabled ($finishTestButtonEnabled)
 
 getFinishTestCommand ()
 
 setFinishTestCommand ($finishTestCommand)
 
 isFinishTestButtonPrimary ()
 
 setFinishTestButtonPrimary ($finishTestButtonPrimary)
 
 isDisabledStateEnabled ()
 
 setDisabledStateEnabled ($disabledStateEnabled)
 
 build ()
 
- Public Member Functions inherited from ilToolbarGUI
 setFormAction (string $a_val, bool $a_multipart=false, string $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 
 setLeadingImage (string $a_img, string $a_alt)
 
 setHidden (bool $a_val)
 
 getHidden ()
 
 setId (string $a_val)
 
 getId ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 addButton (string $a_txt, string $a_cmd, string $a_target="", ?int $a_acc_key=null, string $a_additional_attrs='', string $a_id="", string $a_class='submit')
 
 addFormButton (string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
 
 addInputItem (ilToolbarItem $a_item, bool $a_output_label=false)
 
 addStickyItem ( $a_item, bool $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown (string $a_txt, string $a_dd_html)
 
 addAdvancedSelectionList (ilAdvancedSelectionListGUI $adv)
 
 addSeparator ()
 
 addText (string $a_text)
 
 addSpacer (string $a_width=null)
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 
 addLink (string $a_caption, string $a_url, bool $a_disabled=false)
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 setFormName (string $a_val)
 
 getFormName ()
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems (array $items)
 

Protected Attributes

 $ctrl
 
 $playerGUI
 
- Protected Attributes inherited from ilToolbarGUI
ilLanguage $lng
 
string $id = ''
 
string $form_action = ''
 
bool $hidden = false
 
array $lead_img
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
string $form_target = ""
 
string $form_name = ""
 
bool $prevent_double_submission = false
 
array $sticky_items = array()
 
bool $has_separator = false
 
ILIAS DI UIServices $ui
 
bool $multipart = false
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Data Fields inherited from ilToolbarGUI
array $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 int $instances = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ addFinishTestButton()

ilTestNavigationToolbarGUI::addFinishTestButton ( )
private

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

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

Referenced by build().

321  {
323  $btn->setNextCommand($this->getFinishTestCommand());
324  $btn->setUrl($this->ctrl->getLinkTarget(
325  $this->playerGUI,
326  $this->getFinishTestCommand()
327  ));
328  $btn->setCaption('finish_test');
329  //$btn->setDisabled($this->isDisabledStateEnabled());
330  $btn->setPrimary($this->isFinishTestButtonPrimary());
331  $btn->addCSSClass('ilTstNavElem');
332  $this->addButtonInstance($btn);
333  }
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(), ILIAS\Repository\ctrl(), ilTestPlayerNavButton\getInstance(), and ilTestPlayerCommands\QUESTION_SUMMARY.

Referenced by build().

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

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

Referenced by build().

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

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

Referenced by build().

303  {
305  $btn->setNextCommand(ilTestPlayerCommands::TOGGLE_SIDE_LIST);
306  $btn->setUrl($this->ctrl->getLinkTarget(
307  $this->playerGUI,
309  ));
310  if ($this->isQuestionTreeVisible()) {
311  $btn->setCaption('tst_hide_side_list');
312  } else {
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 260 of file class.ilTestNavigationToolbarGUI.php.

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

Referenced by build().

261  {
263  $btn->setNextCommand(ilTestPlayerCommands::SUSPEND_TEST);
264  $btn->setUrl($this->ctrl->getLinkTarget(
265  $this->playerGUI,
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 237 of file class.ilTestNavigationToolbarGUI.php.

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

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

◆ getFinishTestCommand()

ilTestNavigationToolbarGUI::getFinishTestCommand ( )
Returns
string

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

References $finishTestCommand.

Referenced by addFinishTestButton().

192  : string
193  {
195  }
+ Here is the caller graph for this function:

◆ isDisabledStateEnabled()

ilTestNavigationToolbarGUI::isDisabledStateEnabled ( )
Returns
boolean

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

References $disabledStateEnabled.

224  : bool
225  {
227  }

◆ isFinishTestButtonEnabled()

ilTestNavigationToolbarGUI::isFinishTestButtonEnabled ( )
Returns
boolean

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

References $finishTestButtonEnabled.

Referenced by build().

176  : bool
177  {
179  }
+ Here is the caller graph for this function:

◆ isFinishTestButtonPrimary()

ilTestNavigationToolbarGUI::isFinishTestButtonPrimary ( )
Returns
boolean

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

References $finishTestButtonPrimary.

Referenced by addFinishTestButton().

208  : bool
209  {
211  }
+ Here is the caller graph for this function:

◆ isQuestionListButtonEnabled()

ilTestNavigationToolbarGUI::isQuestionListButtonEnabled ( )
Returns
boolean

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

References $questionListButtonEnabled.

Referenced by build().

115  : bool
116  {
118  }
+ Here is the caller graph for this function:

◆ isQuestionSelectionButtonEnabled()

ilTestNavigationToolbarGUI::isQuestionSelectionButtonEnabled ( )
Returns
boolean

Definition at line 160 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 131 of file class.ilTestNavigationToolbarGUI.php.

References $questionTreeButtonEnabled.

Referenced by build().

131  : bool
132  {
134  }
+ Here is the caller graph for this function:

◆ isQuestionTreeVisible()

ilTestNavigationToolbarGUI::isQuestionTreeVisible ( )
Returns
boolean

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

References $questionTreeVisible.

Referenced by addQuestionTreeButton().

147  : bool
148  {
150  }
+ Here is the caller graph for this function:

◆ isSuspendTestButtonEnabled()

ilTestNavigationToolbarGUI::isSuspendTestButtonEnabled ( )
Returns
boolean

Definition at line 99 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 232 of file class.ilTestNavigationToolbarGUI.php.

References $disabledStateEnabled.

233  {
234  $this->disabledStateEnabled = $disabledStateEnabled;
235  }

◆ setFinishTestButtonEnabled()

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

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

References $finishTestButtonEnabled.

185  {
186  $this->finishTestButtonEnabled = $finishTestButtonEnabled;
187  }

◆ setFinishTestButtonPrimary()

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

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

References $finishTestButtonPrimary.

Referenced by ilTestOutputGUI\handlePrimaryButton().

217  {
218  $this->finishTestButtonPrimary = $finishTestButtonPrimary;
219  }
+ Here is the caller graph for this function:

◆ setFinishTestCommand()

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

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

References $finishTestCommand.

201  {
202  $this->finishTestCommand = $finishTestCommand;
203  }

◆ setQuestionListButtonEnabled()

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

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

References $questionListButtonEnabled.

124  {
125  $this->questionListButtonEnabled = $questionListButtonEnabled;
126  }

◆ setQuestionSelectionButtonEnabled()

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

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

References $questionSelectionButtonEnabled.

169  {
170  $this->questionSelectionButtonEnabled = $questionSelectionButtonEnabled;
171  }

◆ setQuestionTreeButtonEnabled()

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

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

References $questionTreeButtonEnabled.

140  {
141  $this->questionTreeButtonEnabled = $questionTreeButtonEnabled;
142  }

◆ setQuestionTreeVisible()

ilTestNavigationToolbarGUI::setQuestionTreeVisible ( bool  $questionTreeVisible)

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

References $questionTreeVisible.

152  : void
153  {
154  $this->questionTreeVisible = $questionTreeVisible;
155  }

◆ setSuspendTestButtonEnabled()

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

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

References $suspendTestButtonEnabled.

108  {
109  $this->suspendTestButtonEnabled = $suspendTestButtonEnabled;
110  }

Field Documentation

◆ $ctrl

ilTestNavigationToolbarGUI::$ctrl
protected

Definition at line 33 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

◆ $playerGUI

ilTestNavigationToolbarGUI::$playerGUI
protected

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

Referenced by __construct().

◆ $questionListButtonEnabled

ilTestNavigationToolbarGUI::$questionListButtonEnabled = false
private

◆ $questionSelectionButtonEnabled

ilTestNavigationToolbarGUI::$questionSelectionButtonEnabled = false
private

◆ $questionTreeButtonEnabled

ilTestNavigationToolbarGUI::$questionTreeButtonEnabled = false
private

◆ $questionTreeVisible

bool ilTestNavigationToolbarGUI::$questionTreeVisible = false
private

◆ $suspendTestButtonEnabled

ilTestNavigationToolbarGUI::$suspendTestButtonEnabled = false
private

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