40 #private $originalFilterTaxId = null;
42 #private $originalFilterTaxNodeId = null;
44 #private $mappedFilterTaxId = null;
46 #private $mappedFilterTaxNodeId = null;
156 $this->originalTaxonomyFilter = $filter;
166 return empty($this->originalTaxonomyFilter) ? null : serialize($this->originalTaxonomyFilter);
176 $this->originalTaxonomyFilter = empty($value) ? array() : unserialize($value);
194 $this->mappedTaxonomyFilter = $filter;
203 return empty($this->mappedTaxonomyFilter) ? null : serialize($this->mappedTaxonomyFilter);
212 $this->mappedTaxonomyFilter = empty($value) ? array() : unserialize($value);
222 $this->mappedTaxonomyFilter = array();
223 foreach ($this->originalTaxonomyFilter as $taxId => $nodeIds) {
224 $mappedNodeIds = array();
225 foreach ($nodeIds as $nodeId) {
228 $this->mappedTaxonomyFilter[$taxonomiesKeysMap->
getMappedTaxonomyId($taxId)] = $mappedNodeIds;
248 return empty($this->typeFilter) ? null : serialize($this->typeFilter);
257 $this->typeFilter = empty($value) ? array() : unserialize($value);
281 return empty($this->lifecycleFilter) ? null : serialize($this->lifecycleFilter);
289 $this->lifecycleFilter = empty($dbValue) ? array() : unserialize($dbValue);
362 foreach ($dataArray as $field => $value) {
364 case 'def_id': $this->
setId($value);
break;
365 case 'pool_fi': $this->
setPoolId($value);
break;
366 case 'pool_ref_id': $this->
setPoolRefId($value ? (
int) $value :
null);
break;
368 case 'pool_path': $this->
setPoolPath($value);
break;
371 #case 'origin_tax_fi': $this->setOriginalFilterTaxId($value); break;
372 #case 'origin_node_fi': $this->setOriginalFilterTaxNodeId($value); break;
373 #case 'mapped_tax_fi': $this->setMappedFilterTaxId($value); break;
374 #case 'mapped_node_fi': $this->setMappedFilterTaxNodeId($value); break;
392 $res = $this->db->queryF(
393 "SELECT * FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
398 while ($row = $this->db->fetchAssoc(
$res)) {
409 if ($this->
getId()) {
423 $this->db->manipulateF(
424 "DELETE FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
426 array($this->
getId())
436 'tst_rnd_quest_set_qpls',
438 'test_fi' => array(
'integer', $testId),
439 'pool_fi' => array(
'integer', $this->
getPoolId()),
440 'pool_ref_id' => array(
'integer', $this->
getPoolRefId()),
442 'pool_path' => array(
'text', $this->
getPoolPath()),
445 #
'origin_tax_fi' => array(
'integer', $this->getOriginalFilterTaxId()),
446 #
'origin_node_fi' => array(
'integer', $this->getOriginalFilterTaxNodeId()),
447 #
'mapped_tax_fi' => array(
'integer', $this->getMappedFilterTaxId()),
448 #
'mapped_node_fi' => array(
'integer', $this->getMappedFilterTaxNodeId()),
458 'def_id' => array(
'integer', $this->
getId())
468 $nextId = $this->db->nextId(
'tst_rnd_quest_set_qpls');
470 $this->db->insert(
'tst_rnd_quest_set_qpls', array(
471 'def_id' => array(
'integer', $nextId),
472 'test_fi' => array(
'integer', $testId),
473 'pool_fi' => array(
'integer', $this->
getPoolId()),
474 'pool_ref_id' => array(
'integer', $this->
getPoolRefId()),
476 'pool_path' => array(
'text', $this->
getPoolPath()),
479 #
'origin_tax_fi' => array(
'integer', $this->getOriginalFilterTaxId()),
480 #
'origin_node_fi' => array(
'integer', $this->getOriginalFilterTaxNodeId()),
481 #
'mapped_tax_fi' => array(
'integer', $this->getMappedFilterTaxId()),
482 #
'mapped_node_fi' => array(
'integer', $this->getMappedFilterTaxNodeId()),
492 $this->
setId($nextId);
502 $path->enableTextOnly(
true);
503 $pool_path = $path->getPath(ROOT_FOLDER_ID, $this->
getPoolRefId());
506 $poolInfoLabel = sprintf(
507 $lng->txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
508 $this->getPoolTitle(),
510 $this->getPoolQuestionCount()
513 return $poolInfoLabel;
An exception for terminatinating execution or to throw for unit testing.
static _lookupObjId($a_id)
Creates a path for a start and endnode.
getMappedTaxonomyId($originalTaxonomyId)
getMappedTaxNodeId($originalTaxNodeId)
setQuestionAmount($questionAmount)
getMappedTaxonomyFilter()
get the mapped taxonomy filter conditions
setPoolQuestionCount($poolQuestionCount)
getOriginalTaxonomyFilterForDbValue()
get the original taxonomy filter for insert into the database
setTypeFilterFromDbValue($value)
get the question type filter from database value
setLifecycleFilter($lifecycleFilter)
setSequencePosition($sequencePosition)
initFromArray($dataArray)
mapTaxonomyFilter(ilQuestionPoolDuplicatedTaxonomiesKeysMap $taxonomiesKeysMap)
set the mapped taxonomy filter from original by applying a keys map
setOriginalTaxonomyFilter($filter=array())
set the original taxonomy filter condition
setMappedTaxonomyFilter($filter=array())
set the original taxonomy filter condition
cloneToDbForTestId($testId)
setTypeFilter($typeFilter=array())
getMappedTaxonomyFilterForDbValue()
get the original taxonomy filter for insert into the database
__construct(ilDBInterface $db, ilObjTest $testOBJ)
setOriginalTaxonomyFilterFromDbValue($value)
get the original taxonomy filter from database value
setMappedTaxonomyFilterFromDbValue($value)
get the original taxonomy filter from database value
setPoolRefId(?int $poolRefId)
getPoolInfoLabel(ilLanguage $lng)
getOriginalTaxonomyFilter()
get the original taxonomy filter conditions
getTypeFilterForDbValue()
get the question type filter for insert into the database
setLifecycleFilterFromDbValue($dbValue)
getLifecycleFilterForDbValue()
foreach($_POST as $key=> $value) $res