ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
32
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
64 {
65 $this->addFormButton(
66 $this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'),
68 );
69 }
70}
language handling
__construct(ilCtrlInterface $ctrl, ilLanguage $lng, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
addFormButton(string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc