4 require_once
'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
5 require_once
'Services/Taxonomy/classes/class.ilTaxonomyTree.php';
6 require_once
'Services/Taxonomy/classes/class.ilTaxNodeAssignment.php';
7 require_once
'Modules/TestQuestionPool/classes/class.ilQuestionPoolDuplicatedTaxonomiesKeysMap.php';
92 foreach ($poolTaxonomyIds as $poolTaxId) {
97 $this->duplicatedTaxonomiesKeysMap->getMappedTaxonomyId($poolTaxId)
105 $testTaxonomy->create();
108 $poolTaxonomy->doCloneObject($testTaxonomy, null, null);
110 $poolTaxonomy->getTree()->readRootId();
111 $testTaxonomy->getTree()->readRootId();
113 $testTaxonomy->update();
117 $this->duplicatedTaxonomiesKeysMap->addDuplicatedTaxonomy($poolTaxonomy, $testTaxonomy);
127 $assignments = $originalTaxAssignment->getAssignmentsOfItem($originalQuestionId);
129 foreach ($assignments as $assData) {
130 $mappedNodeId = $this->duplicatedTaxonomiesKeysMap->getMappedTaxNodeId($assData[
'node_id']);
132 $duplicatedTaxAssignment->addAssignment($mappedNodeId, $duplicatedQuestionId);
Taxonomy node <-> item assignment.
getDuplicatedTaxonomiesKeysMap()
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
setTargetObjType($targetObjType)
$duplicatedTaxonomiesKeysMap
setSourceObjType($sourceObjType)
duplicate($poolTaxonomyIds)
setQuestionIdMapping($questionIdMapping)
transferAssignmentsFromOriginalToDuplicatedTaxonomy($originalTaxonomyId, $mappedTaxonomyId)
setSourceObjId($sourceObjId)
getAllTaxonomiesForSourceObject()
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.
setTargetObjId($targetObjId)
duplicateTaxonomyFromPoolToTest($poolTaxonomyId)