4 require_once
'Services/Skill/classes/class.ilBasicSkill.php';
5 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
59 $this->targetParentObjId = null;
60 $this->importInstallationId = null;
61 $this->importMappingRegistry = null;
62 $this->importAssignmentList = null;
182 public function import()
187 $assignment->getImportSkillBaseId(), $assignment->getImportSkillTrefId()
197 'Modules/Test',
'skl_base_id_reverse', $foundSkillId[
'skill_id'], $assignment->getImportSkillBaseId()
201 'Modules/Test',
'skl_tref_id_reverse', $foundSkillId[
'tref_id'], $assignment->getImportSkillTrefId()
206 foreach($assignment->getImportSolutionComparisonExpressionList() as $solCompExp)
209 $importableAssignment->getSolutionComparisonExpressionList()->add($importableSolCompExp);
212 $importableAssignment->saveToDb();
213 $importableAssignment->saveComparisonExpressions();
223 $importableAssignment->setEvalMode($assignment->
getEvalMode());
224 $importableAssignment->setSkillPoints($assignment->
getSkillPoints());
226 $importableAssignment->setSkillBaseId($foundSkillId[
'skill_id']);
227 $importableAssignment->setSkillTrefId($foundSkillId[
'tref_id']);
235 $importableAssignment->initSolutionComparisonExpressionList();
237 return $importableAssignment;
244 $importableSolCompExp->setOrderIndex($solCompExp->
getOrderIndex());
245 $importableSolCompExp->setExpression($solCompExp->
getExpression());
246 $importableSolCompExp->setPoints($solCompExp->
getPoints());
248 return $importableSolCompExp;
253 if( !is_array($foundSkillData) || !isset($foundSkillData[
'skill_id']) || !$foundSkillData[
'skill_id'] )
265 return array(
'skill_id' => $importSkillBaseId,
'tref_id' => $importSkillTrefId );
272 return current($foundSkillData);
279 return $DIC->settings()->get(
'inst_id', 0);
getImportMappingRegistry()
setImportMappingComponent($importMappingComponent)
buildImportableAssignment(ilAssQuestionSkillAssignmentImport $assignment, $foundSkillId)
getImportInstallationId()
setImportMappingRegistry($importMappingRegistry)
getSuccessImportAssignmentList()
getFailedImportAssignmentList()
setSuccessImportAssignmentList($successImportAssignmentList)
$failedImportAssignmentList
setImportInstallationId($importInstallationId)
getImportAssignmentList()
setImportAssignmentList($importAssignmentList)
Create styles array
The data for the language used.
setTargetParentObjId($targetParentObjId)
isValidSkill($foundSkillData)
getSkillIdMapping($importSkillBaseId, $importSkillTrefId)
$successImportAssignmentList
buildImportableSolutionComparisonExpression(ilAssQuestionSolutionComparisonExpressionImport $solCompExp)
getImportMappingComponent()
static getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id=0)
Get common skill ids for import IDs (newest first)
__construct()
ilAssQuestionSkillAssignmentImporter constructor.