ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
28 {
32 
33  public function __construct(ilCtrlInterface $ctrl, ilLanguage $lng, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
34  {
35  $this->ctrl = $ctrl;
36  $this->lng = $lng;
37  $this->questionSetConfigGUI = $questionSetConfigGUI;
38  $this->questionSetConfig = $questionSetConfig;
39 
41  }
42 
43  public function build(): void
44  {
45  $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
46 
47  if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
49  }
50  }
51 
52  private function buildSourcePoolSelectOptionsArray($availablePools): array
53  {
54  $sourcePoolSelectOptionArray = [];
55 
56  foreach ($availablePools as $poolId => $poolData) {
57  $sourcePoolSelectOptionArray[$poolId] = $poolData['title'];
58  }
59 
60  return $sourcePoolSelectOptionArray;
61  }
62 
63  private function populateNewQuestionSelectionRuleInputs(): void
64  {
65  $this->addFormButton(
66  $this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'),
68  );
69  }
70 }
__construct(ilCtrlInterface $ctrl, ilLanguage $lng, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
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)
__construct(Container $dic, ilPlugin $plugin)
addFormButton(string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)