4 require_once
'Services/Taxonomy/classes/class.ilTaxonomyTree.php';
5 require_once
'Services/Taxonomy/classes/class.ilTaxNodeAssignment.php';
6 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetDuplicatedTaxonomiesKeysMap.php';
66 foreach($poolTaxonomyIds as $poolTaxId)
71 $poolTaxId, $this->duplicatedTaxonomiesKeysMap->getMappedTaxonomyId($poolTaxId)
79 $testTaxonomy->create();
82 $poolTaxonomy->doCloneObject($testTaxonomy, null, null);
84 $poolTaxonomy->getTree()->readRootId();
85 $testTaxonomy->getTree()->readRootId();
87 $testTaxonomy->update();
91 $this->duplicatedTaxonomiesKeysMap->addDuplicatedTaxonomy($poolTaxonomy, $testTaxonomy);
98 $duplicatedTaxAssignment =
new ilTaxNodeAssignment(
'tst', $this->testOBJ->getId(),
'quest', $mappedTaxonomyId);
104 foreach($assignments as $assData)
106 $mappedNodeId = $this->duplicatedTaxonomiesKeysMap->getMappedTaxNodeId($assData[
'node_id']);
108 $duplicatedTaxAssignment->addAssignment($mappedNodeId, $duplicatedQuestionId);
getAssignmentsOfItem($a_item_id)
Get assignments for item.
Taxonomy node <-> item assignment.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
__construct(ilObjTest $testOBJ, $sourcePoolId, $questionIdMapping)
$duplicatedTaxonomiesKeysMap
setQuestionIdMapping($questionIdMapping)
getDuplicatedTaxonomiesKeysMap()
duplicateTaxonomyFromPoolToTest($poolTaxonomyId)
setSourcePoolId($sourcePoolId)
transferAssignmentsFromOriginalToDuplicatedTaxonomy($originalTaxonomyId, $mappedTaxonomyId)
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.