4 include_once
'./Services/Export/classes/class.ilExportFileInfo.php';
5 include_once
'./Services/Export/classes/class.ilExport.php';
47 $sub_dir = $ts.
"__".IL_INST_ID.
"__".$a_type.
"_".$a_id;
49 $this->cont_export_dir = $export_dir.DIRECTORY_SEPARATOR.$sub_dir;
52 $GLOBALS[
'ilLog']->write(__METHOD__.
' using base directory: '.$this->export_run_dir);
56 $this->
addSubitems($a_id,$a_type,$a_target_release);
59 ilUtil::zip($this->cont_export_dir, $this->cont_export_dir.
'.zip');
69 $GLOBALS[
'ilLog']->write(__METHOD__.
': wrinting manifest');
70 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
72 $this->cont_manifest_writer->xmlHeader();
73 $this->cont_manifest_writer->xmlStartTag(
76 "MainEntity" => $a_type,
78 "TargetRelease" => $a_target_release,
79 "InstallationId" => IL_INST_ID,
80 "InstallationUrl" => ILIAS_HTTP_PATH)
103 foreach($this->eo->getSubitemsForExport() as
$ref_id)
117 $exp_full = $exp_dir.DIRECTORY_SEPARATOR.$expi->getFilename();
119 $GLOBALS[
'ilLog']->write(__METHOD__.
': zip path '.$exp_full);
128 $new_path_rel =
'set_'.$set_number.DIRECTORY_SEPARATOR.$expi->getBasename();
129 $new_path_abs = $this->cont_export_dir.DIRECTORY_SEPARATOR.$new_path_rel;
131 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$new_path_rel.
' '.$new_path_abs);
135 $exp_dir.DIRECTORY_SEPARATOR.$expi->getBasename(),
139 $GLOBALS[
'ilLog']->write($exp_dir.DIRECTORY_SEPARATOR.$expi->getBasename().
' -> '.$new_path_abs);
145 if(file_exists($exp_full))
147 $GLOBALS[
'ilLog']->write(__METHOD__.
': Deleting'. $exp_full);
152 $this->cont_manifest_writer->xmlElement(
155 'Path' => $new_path_rel,
174 $this->cont_manifest_writer->xmlEndTag(
'Manifest');
175 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$this->cont_export_dir.DIRECTORY_SEPARATOR.
'manifest.xml');
176 $this->cont_manifest_writer->xmlDumpFile($this->cont_export_dir.DIRECTORY_SEPARATOR.
'manifest.xml',
true);