4 include_once(
"./Services/Export/classes/class.ilXmlImporter.php");
24 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_id))
27 #$newObj->setImportDirectory(dirname(rtrim($this->getImportDirectory(),'/')));
32 $GLOBALS[
'ilLog']->write(__METHOD__.
': Called in non container mode');
37 include_once
"./Services/Survey/classes/class.SurveyImportParser.php";
41 if(!@file_exists($xml_file))
43 $GLOBALS[
'ilLog']->write(__METHOD__.
': Cannot find xml definition: '. $xml_file);
48 $import->setSurveyObject($newObj);
49 $import->startParsing();
51 if (is_array(
$_SESSION[
"import_mob_xhtml"]))
53 include_once
"./Services/MediaObjects/classes/class.ilObjMediaObject.php";
54 include_once
"./Services/RTE/classes/class.ilRTE.php";
55 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
56 foreach (
$_SESSION[
"import_mob_xhtml"] as $mob)
58 $importfile = dirname($xml_file) .
"/" . $mob[
"uri"];
59 if (file_exists($importfile))
63 $newObj->setIntroduction(str_replace(
"src=\"" . $mob[
"mob"] .
"\"",
"src=\"" .
"il_" . IL_INST_ID .
"_mob_" . $media_object->getId() .
"\"", $newObj->getIntroduction()));
64 $newObj->setOutro(str_replace(
"src=\"" . $mob[
"mob"] .
"\"",
"src=\"" .
"il_" . IL_INST_ID .
"_mob_" . $media_object->getId() .
"\"", $newObj->getOutro()));
69 $ilLog->write(
"Error: Could not open XHTML mob file for test introduction during test import. File $importfile does not exist!");
77 $a_mapping->addMapping(
"Modules/Survey",
"svy", $a_id, $newObj->getId());
90 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$this->getImportDirectory());