ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
5 
13 {
19  public $ctrl = null;
20 
26  public $lng = null;
27 
33  public $questionSetConfigGUI = null;
34 
40  public $questionSetConfig = null;
41 
43  {
44  $this->ctrl = $ctrl;
45  $this->lng = $lng;
46  $this->questionSetConfigGUI = $questionSetConfigGUI;
47  $this->questionSetConfig = $questionSetConfig;
48 
49  parent::__construct();
50  }
51 
52  public function build()
53  {
54  $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
55 
56  if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
58  }
59  }
60 
61  private function buildSourcePoolSelectOptionsArray($availablePools)
62  {
63  $sourcePoolSelectOptionArray = array();
64 
65  foreach ($availablePools as $poolId => $poolData) {
66  $sourcePoolSelectOptionArray[$poolId] = $poolData['title'];
67  }
68 
69  return $sourcePoolSelectOptionArray;
70  }
71 
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  }
90 }
This class provides processing control methods.
setFormAction($a_val, $a_multipart=false, $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
__construct(ilCtrl $ctrl, ilLanguage $lng, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
language handling