55 #private $originalFilterTaxId = null;
57 #private $originalFilterTaxNodeId = null;
59 #private $mappedFilterTaxId = null;
61 #private $mappedFilterTaxNodeId = null;
171 $this->originalTaxonomyFilter = $filter;
181 return empty($this->originalTaxonomyFilter) ? null : serialize($this->originalTaxonomyFilter);
191 $this->originalTaxonomyFilter = empty($value) ? array() : unserialize($value);
209 $this->mappedTaxonomyFilter = $filter;
218 return empty($this->mappedTaxonomyFilter) ? null : serialize($this->mappedTaxonomyFilter);
227 $this->mappedTaxonomyFilter = empty($value) ? array() : unserialize($value);
237 $this->mappedTaxonomyFilter = array();
238 foreach ($this->originalTaxonomyFilter as $taxId => $nodeIds) {
239 $mappedNodeIds = array();
240 foreach ($nodeIds as $nodeId) {
243 $this->mappedTaxonomyFilter[$taxonomiesKeysMap->
getMappedTaxonomyId($taxId)] = $mappedNodeIds;
263 return empty($this->typeFilter) ? null : serialize($this->typeFilter);
272 $this->typeFilter = empty($value) ? array() : unserialize($value);
296 return empty($this->lifecycleFilter) ? null : serialize($this->lifecycleFilter);
304 $this->lifecycleFilter = empty($dbValue) ? array() : unserialize($dbValue);
315 $map[$row[
'question_type_id']] = $row[
'type_tag'];
319 foreach ($this->typeFilter as $type_id) {
320 if (isset($map[$type_id])) {
321 $tags[] = $map[$type_id];
336 $map[$row[
'type_tag']] = $row[
'question_type_id'];
339 $this->typeFilter = [];
340 foreach ($tags as $type_tag) {
341 if (isset($map[$type_tag])) {
342 $this->typeFilter[] = $map[$type_tag];
374 foreach ($dataArray as $field => $value) {
377 $this->
setId($value);
391 case 'pool_quest_count':
394 case 'origin_tax_filter':
397 case 'mapped_tax_filter':
403 case 'lifecycle_filter':
423 $res = $this->db->queryF(
424 "SELECT * FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
429 while ($row = $this->db->fetchAssoc(
$res)) {
440 if ($this->
getId()) {
454 $this->db->manipulateF(
455 "DELETE FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
457 array($this->
getId())
467 'tst_rnd_quest_set_qpls',
469 'test_fi' => array(
'integer', $testId),
470 'pool_fi' => array(
'integer', $this->
getPoolId()),
471 'pool_ref_id' => array(
'integer', $this->
getPoolRefId()),
473 'pool_path' => array(
'text', $this->
getPoolPath()),
483 'def_id' => array(
'integer', $this->
getId())
493 $nextId = $this->db->nextId(
'tst_rnd_quest_set_qpls');
495 $this->db->insert(
'tst_rnd_quest_set_qpls', array(
496 'def_id' => array(
'integer', $nextId),
497 'test_fi' => array(
'integer', $testId),
498 'pool_fi' => array(
'integer', $this->
getPoolId()),
499 'pool_ref_id' => array(
'integer', $this->
getPoolRefId()),
501 'pool_path' => array(
'text', $this->
getPoolPath()),
511 $this->
setId($nextId);
521 $path->enableTextOnly(
true);
525 $poolInfoLabel = sprintf(
526 $lng->txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
527 $this->getPoolTitle(),
529 $this->getPoolQuestionCount()
532 return $poolInfoLabel;
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
static _lookupObjId(int $ref_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
setTypeFilterFromTypeTags(array $tags)
Set the type filter from a list of type tags.
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
getTypeFilterAsTypeTags()
Get the type filter as a list of type tags.
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()