19 declare(strict_types=1);
76 $this->
setTitle($this->
lng->txt(
'tst_rnd_quest_set_cfg_pool_form'));
77 $this->
setId(
'tstRndQuestSetCfgPoolForm');
81 $this->
lng->txt(
'save_and_back')
87 $this->
lng->txt(
'tst_save_and_create_new_rule')
93 $this->
lng->txt(
'cancel')
97 $hiddenDefId->setValue((
string) $sourcePool->
getId());
101 $hiddenPoolId->setValue((
string) $sourcePool->
getPoolId());
105 $this->
lng->txt(
'tst_inp_source_pool_label'),
110 $this->
addItem($nonEditablePoolLabel);
113 if (count($availableTaxonomyIds)) {
114 ilOverlayGUI::initJavaScript();
117 foreach ($availableTaxonomyIds as $taxId) {
119 $taxLabel = sprintf($this->
lng->txt(
'tst_inp_source_pool_filter_tax_x'), $taxonomy->getTitle());
125 $this->
ctrl->setParameterByClass(
'iltaxselectinputgui',
'src_pool_def_id', $sourcePool->
getId());
126 $this->
ctrl->setParameterByClass(
'iltaxselectinputgui',
'quest_pool_id', $sourcePool->
getPoolId());
128 $taxSelect->setRequired(
true);
130 if (isset($filter[$taxId])) {
131 $taxCheckbox->setChecked(
true);
132 $taxSelect->setValue($filter[$taxId]);
134 $taxCheckbox->addSubItem($taxSelect);
140 $hiddenNoTax->setValue(
'0');
144 $this->
lng->txt(
'tst_inp_source_pool_filter_tax'),
147 $nonEditableNoTax->setValue($this->
lng->txt(
'tst_inp_no_available_tax_hint'));
148 $this->
addItem($nonEditableNoTax);
152 $lifecycleCheckbox =
new ilCheckboxInputGUI($this->
lng->txt(
'tst_filter_lifecycle_enabled'),
'filter_lifecycle_enabled');
153 $lifecycleCheckbox->setChecked(!empty($lifecycleFilterValues));
154 $lifecycleFilter =
new ilSelectInputGUI($this->
lng->txt(
'qst_lifecycle'),
'filter_lifecycle');
156 $lifecycleFilter->setMulti(
true);
158 $lifecycleFilter->setValue($lifecycleFilterValues);
159 $lifecycleCheckbox->addSubItem($lifecycleFilter);
160 $this->
addItem($lifecycleCheckbox);
163 $typeFilterOptions = array();
165 $typeFilterOptions[
$data[
'question_type_id']] = $translation;
168 $typeCheckbox =
new ilCheckboxInputGUI($this->
lng->txt(
'tst_filter_question_type_enabled'),
'filter_type_enabled');
169 $typeCheckbox->setChecked(!empty($filterIds));
170 $typeFilter =
new ilSelectInputGUI($this->
lng->txt(
'tst_filter_question_type'),
'filter_type');
172 $typeFilter->setMulti(
true);
173 $typeFilter->setOptions($typeFilterOptions);
174 $typeFilter->setValue($filterIds);
175 $typeCheckbox->addSubItem($typeFilter);
179 if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
181 $this->
lng->txt(
'tst_inp_quest_amount_per_source_pool'),
182 'question_amount_per_pool' 185 $questionAmountPerSourcePool->setRequired(
true);
186 $questionAmountPerSourcePool->allowDecimals(
false);
187 $questionAmountPerSourcePool->setMinValue(0);
188 $questionAmountPerSourcePool->setMinvalueShouldBeGreater(
true);
189 $questionAmountPerSourcePool->setSize(4);
192 $questionAmountPerSourcePool->setValue(
197 $this->
addItem($questionAmountPerSourcePool);
205 foreach ($availableTaxonomyIds as $taxId) {
207 $nodeIds = (array) $this->
getItemByPostVar(
"filter_tax_nodes_$taxId")->getValue();
208 if (!empty($nodeIds)) {
209 foreach ($nodeIds as $nodeId) {
210 $filter[(
int) $taxId][] = (
int) $nodeId;
231 if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setOriginalTaxonomyFilter(array $filter=[])
getPoolInfoLabel(ilLanguage $lng)
setQuestionAmount(?int $question_amount)
const CMD_SHOW_SRC_POOL_DEF_LIST
setTypeFilter(array $type_filter=[])
setLifecycleFilter(array $lifecycle_filter)
static getDraftInstance()
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
getOriginalTaxonomyFilter()