ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 (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)
 

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
 $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() )
57  {
59  }
60  }
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 62 of file class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php.

References array.

Referenced by populateNewQuestionSelectionRuleInputs().

63  {
64  $sourcePoolSelectOptionArray = array();
65 
66  foreach($availablePools as $poolId => $poolData)
67  {
68  $sourcePoolSelectOptionArray[$poolId] = $poolData['title'];
69  }
70 
71  return $sourcePoolSelectOptionArray;
72  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ populateNewQuestionSelectionRuleInputs()

ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI::populateNewQuestionSelectionRuleInputs ( )
private

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

References ilToolbarGUI\addFormButton(), ilToolbarGUI\addInputItem(), buildSourcePoolSelectOptionsArray(), and ilTestRandomQuestionSetConfigGUI\CMD_SHOW_CREATE_SRC_POOL_DEF_FORM.

Referenced by build().

75  {
76  $availablePools = $this->questionSetConfig->getSelectableQuestionPools();
77 
78  require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
79  $poolSelection = new ilSelectInputGUI(null, 'quest_pool_id');
80  $poolSelection->setOptions($this->buildSourcePoolSelectOptionsArray($availablePools));
81 
82  $this->addInputItem($poolSelection, true);
83 
84  $this->addFormButton(
85  $this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'),
87  );
88  }
This class represents a selection list property in a property form.
addInputItem(ilToolbarItem $a_item, $a_output_label=false)
Add input item.
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: