4 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
62 parent::__construct();
99 $this->
setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
101 $this->
setTitle($this->lng->txt(
'tst_rnd_quest_set_cfg_pool_form'));
102 $this->
setId(
'tstRndQuestSetCfgPoolForm');
106 $this->lng->txt(
'save_and_back')
112 $this->lng->txt(
'tst_save_and_create_new_rule')
118 $this->lng->txt(
'cancel')
122 $hiddenDefId->setValue($sourcePool->
getId());
126 $hiddenPoolId->setValue($sourcePool->
getPoolId());
130 $this->lng->txt(
'tst_inp_source_pool_label'),
135 $this->
addItem($nonEditablePoolLabel);
138 if (count($availableTaxonomyIds)) {
140 require_once
'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
143 require_once
'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
144 ilOverlayGUI::initJavaScript();
147 foreach ($availableTaxonomyIds as $taxId) {
149 $taxLabel = sprintf($this->lng->txt(
'tst_inp_source_pool_filter_tax_x'), $taxonomy->getTitle());
155 $this->ctrl->setParameterByClass(
'iltaxselectinputgui',
'src_pool_def_id', $sourcePool->
getId());
156 $this->ctrl->setParameterByClass(
'iltaxselectinputgui',
'quest_pool_id', $sourcePool->
getPoolId());
158 $taxSelect->setRequired(
true);
160 if (isset($filter[$taxId])) {
161 $taxCheckbox->setChecked(
true);
162 $taxSelect->setValue($filter[$taxId]);
164 $taxCheckbox->addSubItem($taxSelect);
168 #$taxRadio = new ilRadioGroupInputGUI( 169 # $this->lng->txt('tst_inp_source_pool_filter_tax'), 'filter_tax' 172 #$taxRadio->setRequired(true); 174 #$taxRadio->addOption(new ilRadioOption( 175 # $this->lng->txt('tst_inp_source_pool_no_tax_filter'), 0 178 #$taxRadio->setValue(0); 180 #require_once 'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php'; 182 #foreach($availableTaxonomyIds as $taxId) 184 # $taxonomy = new ilObjTaxonomy($taxId); 185 # $label = sprintf($this->lng->txt('tst_inp_source_pool_filter_tax_x'), $taxonomy->getTitle()); 187 # $taxRadioOption = new ilRadioOption($label, $taxId); 189 # $taxRadio->addOption($taxRadioOption); 191 # $taxSelect = new ilTaxSelectInputGUI($taxId, "filter_tax_$taxId", false); 192 # $taxSelect->setRequired(true); 193 # $taxRadioOption->addSubItem($taxSelect); 195 # if( $taxId == $sourcePool->getOriginalFilterTaxId() ) 197 # $taxRadio->setValue( $sourcePool->getOriginalFilterTaxId() ); 198 # $taxSelect->setValue( $sourcePool->getOriginalFilterTaxNodeId() ); 202 #$this->addItem($taxRadio); 206 $hiddenNoTax->setValue(0);
210 $this->lng->txt(
'tst_inp_source_pool_filter_tax'),
213 $nonEditableNoTax->
setValue($this->lng->txt(
'tst_inp_no_available_tax_hint'));
214 $this->
addItem($nonEditableNoTax);
218 $typeFilterOptions = array();
219 require_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
221 $typeFilterOptions[
$data[
'question_type_id']] = $translation;
224 $typeCheckbox =
new ilCheckboxInputGUI($this->lng->txt(
'tst_filter_question_type_enabled'),
'filter_type_enabled');
225 $typeCheckbox->
setChecked(!empty($filterIds));
226 $typeFilter =
new ilSelectInputGUI($this->lng->txt(
'tst_filter_question_type'),
'filter_type');
228 $typeFilter->setMulti(
true);
229 $typeFilter->setOptions($typeFilterOptions);
230 $typeFilter->setValue($filterIds);
231 $typeCheckbox->addSubItem($typeFilter);
235 if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
237 $this->lng->txt(
'tst_inp_quest_amount_per_source_pool'),
238 'question_amount_per_pool' 242 $questionAmountPerSourcePool->allowDecimals(
false);
243 $questionAmountPerSourcePool->setMinValue(0);
244 $questionAmountPerSourcePool->setMinvalueShouldBeGreater(
true);
245 $questionAmountPerSourcePool->setSize(4);
251 $this->
addItem($questionAmountPerSourcePool);
259 foreach ($availableTaxonomyIds as $taxId) {
261 $nodeIds = (array) $this->
getItemByPostVar(
"filter_tax_nodes_$taxId")->getValue();
262 if (!empty($nodeIds)) {
263 foreach ($nodeIds as $nodeId) {
264 $filter[(int) $taxId][] = (
int) $nodeId;
273 # case $this->getItemByPostVar('source_pool_filter_tax') === null: 275 # case !in_array($this->getItemByPostVar('filter_tax')->getValue(), $availableTaxonomyIds): 277 # $sourcePoolDefinition->setOriginalFilterTaxId(null); 278 # $sourcePoolDefinition->setOriginalFilterTaxNodeId(null); 283 # $taxId = $this->getItemByPostVar('filter_tax')->getValue(); 285 # $sourcePoolDefinition->setOriginalFilterTaxId( $taxId ); 287 # $sourcePoolDefinition->setOriginalFilterTaxNodeId( $this->getItemByPostVar("filter_tax_$taxId")->getValue() ); 297 if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
This class provides processing control methods.
setOriginalTaxonomyFilter($filter=array())
set the original taxonomy filter condition
setValue($a_value)
Set Value.
getPoolInfoLabel(ilLanguage $lng)
setQuestionAmount($questionAmount)
const CMD_SHOW_SRC_POOL_DEF_LIST
setTypeFilter($typeFilter=array())
This class represents a non editable value in a property form.
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
getOriginalTaxonomyFilter()
get the original taxonomy filter conditions