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);
300 $map[$row[
'question_type_id']] = $row[
'type_tag'];
304 foreach ($this->typeFilter as $type_id) {
305 if (isset($map[$type_id])) {
306 $tags[] = $map[$type_id];
321 $map[$row[
'type_tag']] = $row[
'question_type_id'];
324 $this->typeFilter = [];
325 foreach ($tags as $type_tag) {
326 if (isset($map[$type_tag])) {
327 $this->typeFilter[] = $map[$type_tag];
403 foreach ($dataArray as $field => $value) {
405 case 'def_id': $this->
setId($value);
break;
406 case 'pool_fi': $this->
setPoolId($value);
break;
407 case 'pool_ref_id': $this->
setPoolRefId($value ? (
int) $value :
null);
break;
409 case 'pool_path': $this->
setPoolPath($value);
break;
412 #case 'origin_tax_fi': $this->setOriginalFilterTaxId($value); break;
413 #case 'origin_node_fi': $this->setOriginalFilterTaxNodeId($value); break;
414 #case 'mapped_tax_fi': $this->setMappedFilterTaxId($value); break;
415 #case 'mapped_node_fi': $this->setMappedFilterTaxNodeId($value); break;
433 $res = $this->db->queryF(
434 "SELECT * FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
439 while ($row = $this->db->fetchAssoc(
$res)) {
450 if ($this->
getId()) {
464 $this->db->manipulateF(
465 "DELETE FROM tst_rnd_quest_set_qpls WHERE def_id = %s",
467 array($this->
getId())
477 'tst_rnd_quest_set_qpls',
479 'test_fi' => array(
'integer', $testId),
480 'pool_fi' => array(
'integer', $this->
getPoolId()),
481 'pool_ref_id' => array(
'integer', $this->
getPoolRefId()),
483 'pool_path' => array(
'text', $this->
getPoolPath()),
493 'def_id' => array(
'integer', $this->
getId())
503 $nextId = $this->db->nextId(
'tst_rnd_quest_set_qpls');
505 $this->db->insert(
'tst_rnd_quest_set_qpls', array(
506 'def_id' => array(
'integer', $nextId),
507 'test_fi' => array(
'integer', $testId),
508 'pool_fi' => array(
'integer', $this->
getPoolId()),
509 'pool_ref_id' => array(
'integer', $this->
getPoolRefId()),
511 'pool_path' => array(
'text', $this->
getPoolPath()),
521 $this->
setId($nextId);
531 $path->enableTextOnly(
true);
535 $poolInfoLabel = sprintf(
536 $lng->txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
537 $this->getPoolTitle(),
539 $this->getPoolQuestionCount()
542 return $poolInfoLabel;
An exception for terminatinating execution or to throw for unit testing.
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
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
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()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
foreach($_POST as $key=> $value) $res