4 include_once(
"./Services/Export/classes/class.ilXmlImporter.php");
24 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
28 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_id))
35 $GLOBALS[
'ilLog']->write(__METHOD__.
': Called in non container mode');
41 if(!@file_exists($xml_file))
43 $GLOBALS[
'ilLog']->write(__METHOD__.
': Cannot find xml definition: '. $xml_file);
46 if(!@file_exists($qti_file))
48 $GLOBALS[
'ilLog']->write(__METHOD__.
': Cannot find xml definition: '. $qti_file);
52 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
59 $GLOBALS[
'ilLog']->write(__METHOD__.
': xml file: '. $xml_file .
", qti file:" . $qti_file);
61 $newObj->setOnline(
true);
65 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
67 $result = $qtiParser->startParsing();
70 if (strlen($xml_file))
72 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
74 $contParser->setQuestionMapping($qtiParser->getImportMapping());
75 $contParser->startParsing();
78 $a_mapping->addMapping(
"Modules/TestQuestionPool",
"qpl", $a_id, $newObj->getId());
89 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$this->getImportDirectory());
96 return array($xml,$qti);