3 include_once(
"./Services/Export/classes/class.ilXmlImporter.php");
8 require_once
"./Modules/ScormAicc/classes/class.ilScormAiccDataSet.php";
11 $this->moduleProperties = [];
29 if (file_exists($a_import_dirname))
31 $manifestFile = $a_import_dirname .
"/manifest.xml";
32 if (file_exists($manifestFile))
34 $manifest = file_get_contents ($manifestFile);
35 $manifestRoot = simplexml_load_string($manifest);
36 $this->manifest[
"scormFile"] = $manifestRoot->scormFile;
37 $this->manifest[
"properties"] = $manifestRoot->properties;
40 $propertiesFile = $a_import_dirname .
"/" . $this->manifest[
"properties"][0];
41 $xml = file_get_contents ($propertiesFile);
44 $xmlRoot = simplexml_load_string($xml);
46 foreach ($this->dataset->properties as $key => $value)
48 $this->moduleProperties[$key] = $xmlRoot->$key;
50 $this->moduleProperties[
"Title"] = $xmlRoot->Title;
51 $this->moduleProperties[
"Description"] = $xmlRoot->Description;
56 $ilLog->write(
"error parsing xml file for scorm import");
62 $ilLog->write(
"error reading manifest file");
67 $ilLog->write(
"error no manifest file found");
72 $ilLog->write(
"error file lost while importing");
80 $this->dataset->writeData($a_entity, $a_version, $a_id, $this->moduleProperties);
writeData($a_entity, $version, $a_id)
importXmlRepresentation($a_entity, $a_id, $a_import_dirname, $a_mapping)
Import XML.