ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI Class Reference
+ Inheritance diagram for ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI:
+ Collaboration diagram for ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $lng, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
 
 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)
 

Data Fields

 $ctrl = null
 
 $lng = null
 
 $questionSetConfigGUI = null
 
 $questionSetConfig = null
 
- Data Fields inherited from ilToolbarGUI
 $items = array()
 

Private Member Functions

 buildSourcePoolSelectOptionsArray ($availablePools)
 
 populateNewQuestionSelectionRuleInputs ()
 

Additional Inherited Members

- 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...
 
- 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
 
- Static Protected Attributes inherited from ilToolbarGUI
static $instances = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ build()

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::build ( )

Definition at line 52 of file class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php.

References populateNewQuestionSelectionRuleInputs(), and ilToolbarGUI\setFormAction().

53  {
54  $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
55 
56  if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
58  }
59  }
setFormAction($a_val, $a_multipart=false, $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
+ Here is the call graph for this function:

◆ buildSourcePoolSelectOptionsArray()

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::buildSourcePoolSelectOptionsArray (   $availablePools)
private

Definition at line 61 of file class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php.

References array.

62  {
63  $sourcePoolSelectOptionArray = array();
64 
65  foreach ($availablePools as $poolId => $poolData) {
66  $sourcePoolSelectOptionArray[$poolId] = $poolData['title'];
67  }
68 
69  return $sourcePoolSelectOptionArray;
70  }
Create styles array
The data for the language used.

◆ populateNewQuestionSelectionRuleInputs()

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::populateNewQuestionSelectionRuleInputs ( )
private

Definition at line 72 of file class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php.

References ilToolbarGUI\addFormButton(), and ilTestRandomQuestionSetConfigGUI\CMD_SHOW_POOL_SELECTOR_EXPLORER.

Referenced by build().

73  {
74  // hey: randomPoolSelector - remove dropdown from toolbar
75  #$availablePools = $this->questionSetConfig->getSelectableQuestionPools();
76 
77  #require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
78  #$poolSelection = new ilSelectInputGUI(null, 'quest_pool_id');
79  #$poolSelection->setOptions($this->buildSourcePoolSelectOptionsArray($availablePools));
80 
81  #$this->addInputItem($poolSelection, true);
82 
83  $this->addFormButton(
84  $this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'),
85  #ilTestRandomQuestionSetConfigGUI::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM
87  );
88  // hey.
89  }
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::$ctrl = null

◆ $lng

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::$lng = null

◆ $questionSetConfig

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::$questionSetConfig = null

◆ $questionSetConfigGUI

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::$questionSetConfigGUI = null

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