ILIAS  release_8 Revision v8.24
class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php
Go to the documentation of this file.
1<?php
2
26{
27 public ilCtrl $ctrl;
30
32 {
33 $this->ctrl = $ctrl;
34 $this->lng = $lng;
35 $this->questionSetConfigGUI = $questionSetConfigGUI;
36 $this->questionSetConfig = $questionSetConfig;
37
39 }
40
41 public function build(): void
42 {
43 $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
44
45 if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
47 }
48 }
49
50 private function buildSourcePoolSelectOptionsArray($availablePools): array
51 {
52 $sourcePoolSelectOptionArray = array();
53
54 foreach ($availablePools as $poolId => $poolData) {
55 $sourcePoolSelectOptionArray[$poolId] = $poolData['title'];
56 }
57
58 return $sourcePoolSelectOptionArray;
59 }
60
62 {
63 $this->addFormButton(
64 $this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'),
66 );
67 }
68}
Class ilCtrl provides processing control methods.
language handling
__construct(ilCtrl $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)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc