37 #private $originalFilterTaxId = null; 39 #private $originalFilterTaxNodeId = null; 41 #private $mappedFilterTaxId = null; 43 #private $mappedFilterTaxNodeId = null; 138 $this->originalTaxonomyFilter = $filter;
148 return empty($this->originalTaxonomyFilter) ? null : serialize($this->originalTaxonomyFilter);
158 $this->originalTaxonomyFilter = empty($value) ?
array() : unserialize($value);
176 $this->mappedTaxonomyFilter = $filter;
185 return empty($this->mappedTaxonomyFilter) ? null : serialize($this->mappedTaxonomyFilter);
194 $this->mappedTaxonomyFilter = empty($value) ?
array() : unserialize($value);
204 $this->mappedTaxonomyFilter =
array();
205 foreach ($this->originalTaxonomyFilter as $taxId => $nodeIds) {
206 $mappedNodeIds =
array();
207 foreach ($nodeIds as $nodeId) {
210 $this->mappedTaxonomyFilter[$taxonomiesKeysMap->
getMappedTaxonomyId($taxId)] = $mappedNodeIds;
230 return empty($this->typeFilter) ? null : serialize($this->typeFilter);
239 $this->typeFilter = empty($value) ?
array() : unserialize($value);
313 case 'def_id': $this->
setId($value);
break;
314 case 'pool_fi': $this->
setPoolId($value);
break;
316 case 'pool_path': $this->
setPoolPath($value);
break;
319 #case 'origin_tax_fi': $this->setOriginalFilterTaxId($value); break; 320 #case 'origin_node_fi': $this->setOriginalFilterTaxNodeId($value); break; 321 #case 'mapped_tax_fi': $this->setMappedFilterTaxId($value); break; 322 #case 'mapped_node_fi': $this->setMappedFilterTaxNodeId($value); break; 339 $res = $this->db->queryF(
340 "SELECT * FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
345 while (
$row = $this->db->fetchAssoc(
$res)) {
356 if ($this->
getId()) {
370 $this->db->manipulateF(
371 "DELETE FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
383 'tst_rnd_quest_set_qpls',
385 'test_fi' =>
array(
'integer', $testId),
391 #
'origin_tax_fi' =>
array(
'integer', $this->getOriginalFilterTaxId()),
392 #
'origin_node_fi' =>
array(
'integer', $this->getOriginalFilterTaxNodeId()),
393 #
'mapped_tax_fi' =>
array(
'integer', $this->getMappedFilterTaxId()),
394 #
'mapped_node_fi' =>
array(
'integer', $this->getMappedFilterTaxNodeId()),
413 $nextId = $this->db->nextId(
'tst_rnd_quest_set_qpls');
415 $this->db->insert(
'tst_rnd_quest_set_qpls',
array(
416 'def_id' =>
array(
'integer', $nextId),
417 'test_fi' =>
array(
'integer', $testId),
423 #
'origin_tax_fi' =>
array(
'integer', $this->getOriginalFilterTaxId()),
424 #
'origin_node_fi' =>
array(
'integer', $this->getOriginalFilterTaxNodeId()),
425 #
'mapped_tax_fi' =>
array(
'integer', $this->getMappedFilterTaxId()),
426 #
'mapped_node_fi' =>
array(
'integer', $this->getMappedFilterTaxNodeId()),
435 $this->
setId($nextId);
442 $poolInfoLabel = sprintf(
443 $lng->
txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
449 return $poolInfoLabel;
initFromArray($dataArray)
setOriginalTaxonomyFilter($filter=array())
set the original taxonomy filter condition
getPoolInfoLabel(ilLanguage $lng)
setOriginalTaxonomyFilterFromDbValue($value)
get the original taxonomy filter from database value
getMappedTaxonomyId($originalTaxonomyId)
setQuestionAmount($questionAmount)
__construct(ilDBInterface $db, ilObjTest $testOBJ)
setMappedTaxonomyFilterFromDbValue($value)
get the original taxonomy filter from database value
setTypeFilterFromDbValue($value)
get the question type filter from database value
setMappedTaxonomyFilter($filter=array())
set the original taxonomy filter condition
foreach($_POST as $key=> $value) $res
getOriginalTaxonomyFilterForDbValue()
get the original taxonomy filter for insert into the database
setPoolQuestionCount($poolQuestionCount)
getMappedTaxNodeId($originalTaxNodeId)
cloneToDbForTestId($testId)
mapTaxonomyFilter(ilQuestionPoolDuplicatedTaxonomiesKeysMap $taxonomiesKeysMap)
set the mapped taxonomy filter from original by applying a keys map
Create styles array
The data for the language used.
setTypeFilter($typeFilter=array())
setSequencePosition($sequencePosition)
getTypeFilterForDbValue()
get the question type filter for insert into the database
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getMappedTaxonomyFilterForDbValue()
get the original taxonomy filter for insert into the database
getMappedTaxonomyFilter()
get the mapped taxonomy filter conditions
getOriginalTaxonomyFilter()
get the original taxonomy filter conditions