74 $this->
setTitle($this->
lng->txt(
'tst_rnd_quest_set_cfg_pool_form'));
75 $this->
setId(
'tstRndQuestSetCfgPoolForm');
79 $this->
lng->txt(
'save_and_back')
85 $this->
lng->txt(
'tst_save_and_create_new_rule')
91 $this->
lng->txt(
'cancel')
95 $hiddenDefId->setValue((
string) $sourcePool->
getId());
99 $hiddenPoolId->setValue((
string) $sourcePool->
getPoolId());
103 $this->
lng->txt(
'tst_inp_source_pool_label'),
108 $this->
addItem($nonEditablePoolLabel);
111 if (count($availableTaxonomyIds)) {
113 require_once
'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
116 require_once
'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
117 ilOverlayGUI::initJavaScript();
120 foreach ($availableTaxonomyIds as $taxId) {
122 $taxLabel = sprintf($this->
lng->txt(
'tst_inp_source_pool_filter_tax_x'), $taxonomy->getTitle());
128 $this->
ctrl->setParameterByClass(
'iltaxselectinputgui',
'src_pool_def_id', $sourcePool->
getId());
129 $this->
ctrl->setParameterByClass(
'iltaxselectinputgui',
'quest_pool_id', $sourcePool->
getPoolId());
131 $taxSelect->setRequired(
true);
133 if (isset($filter[$taxId])) {
134 $taxCheckbox->setChecked(
true);
135 $taxSelect->setValue($filter[$taxId]);
137 $taxCheckbox->addSubItem($taxSelect);
141 #$taxRadio = new ilRadioGroupInputGUI(
142 # $this->lng->txt('tst_inp_source_pool_filter_tax'), 'filter_tax'
145 #$taxRadio->setRequired(true);
147 #$taxRadio->addOption(new ilRadioOption(
148 # $this->lng->txt('tst_inp_source_pool_no_tax_filter'), 0
151 #$taxRadio->setValue(0);
153 #require_once 'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
155 #foreach($availableTaxonomyIds as $taxId)
157 # $taxonomy = new ilObjTaxonomy($taxId);
158 # $label = sprintf($this->lng->txt('tst_inp_source_pool_filter_tax_x'), $taxonomy->getTitle());
160 # $taxRadioOption = new ilRadioOption($label, $taxId);
162 # $taxRadio->addOption($taxRadioOption);
164 # $taxSelect = new ilTaxSelectInputGUI($taxId, "filter_tax_$taxId", false);
165 # $taxSelect->setRequired(true);
166 # $taxRadioOption->addSubItem($taxSelect);
168 # if( $taxId == $sourcePool->getOriginalFilterTaxId() )
170 # $taxRadio->setValue( $sourcePool->getOriginalFilterTaxId() );
171 # $taxSelect->setValue( $sourcePool->getOriginalFilterTaxNodeId() );
175 #$this->addItem($taxRadio);
179 $hiddenNoTax->setValue(
'0');
183 $this->
lng->txt(
'tst_inp_source_pool_filter_tax'),
186 $nonEditableNoTax->setValue($this->
lng->txt(
'tst_inp_no_available_tax_hint'));
187 $this->
addItem($nonEditableNoTax);
191 $lifecycleCheckbox =
new ilCheckboxInputGUI($this->
lng->txt(
'tst_filter_lifecycle_enabled'),
'filter_lifecycle_enabled');
192 $lifecycleCheckbox->setChecked(!empty($lifecycleFilterValues));
193 $lifecycleFilter =
new ilSelectInputGUI($this->
lng->txt(
'qst_lifecycle'),
'filter_lifecycle');
194 $lifecycleFilter->setRequired(
true);
195 $lifecycleFilter->setMulti(
true);
197 $lifecycleFilter->setValue($lifecycleFilterValues);
198 $lifecycleCheckbox->addSubItem($lifecycleFilter);
199 $this->
addItem($lifecycleCheckbox);
202 $typeFilterOptions = array();
203 require_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
205 $typeFilterOptions[
$data[
'question_type_id']] = $translation;
208 $typeCheckbox =
new ilCheckboxInputGUI($this->
lng->txt(
'tst_filter_question_type_enabled'),
'filter_type_enabled');
209 $typeCheckbox->setChecked(!empty($filterIds));
210 $typeFilter =
new ilSelectInputGUI($this->
lng->txt(
'tst_filter_question_type'),
'filter_type');
211 $typeFilter->setRequired(
true);
212 $typeFilter->setMulti(
true);
213 $typeFilter->setOptions($typeFilterOptions);
214 $typeFilter->setValue($filterIds);
215 $typeCheckbox->addSubItem($typeFilter);
219 if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
221 $this->
lng->txt(
'tst_inp_quest_amount_per_source_pool'),
222 'question_amount_per_pool'
225 $questionAmountPerSourcePool->setRequired(
true);
226 $questionAmountPerSourcePool->allowDecimals(
false);
227 $questionAmountPerSourcePool->setMinValue(0);
228 $questionAmountPerSourcePool->setMinvalueShouldBeGreater(
true);
229 $questionAmountPerSourcePool->setSize(4);
232 $questionAmountPerSourcePool->setValue(
237 $this->
addItem($questionAmountPerSourcePool);
245 foreach ($availableTaxonomyIds as $taxId) {
247 $nodeIds = (array) $this->
getItemByPostVar(
"filter_tax_nodes_$taxId")->getValue();
248 if (!empty($nodeIds)) {
249 foreach ($nodeIds as $nodeId) {
250 $filter[(
int) $taxId][] = (
int) $nodeId;
259 # case $this->getItemByPostVar('source_pool_filter_tax') === null:
261 # case !in_array($this->getItemByPostVar('filter_tax')->getValue(), $availableTaxonomyIds):
263 # $sourcePoolDefinition->setOriginalFilterTaxId(null);
264 # $sourcePoolDefinition->setOriginalFilterTaxNodeId(null);
269 # $taxId = $this->getItemByPostVar('filter_tax')->getValue();
271 # $sourcePoolDefinition->setOriginalFilterTaxId( $taxId );
273 # $sourcePoolDefinition->setOriginalFilterTaxNodeId( $this->getItemByPostVar("filter_tax_$taxId")->getValue() );
290 if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
static getDraftInstance()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CMD_SHOW_SRC_POOL_DEF_LIST
setQuestionAmount($questionAmount)
setLifecycleFilter($lifecycleFilter)
setOriginalTaxonomyFilter($filter=array())
set the original taxonomy filter condition
setTypeFilter($typeFilter=array())
getPoolInfoLabel(ilLanguage $lng)
getOriginalTaxonomyFilter()
get the original taxonomy filter conditions
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc