4 require_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
33 $this->cont_obj =& $a_cont_obj;
38 $this->mode = $a_mode;
40 $settings = $this->ilias->getAllSettings();
42 $this->inst_id = IL_INST_ID;
48 $this->export_dir = $this->cont_obj->getExportDirectory(
"html");
49 $this->subdir = $this->cont_obj->getType().
"_".$this->cont_obj->getId();
50 $this->filename = $this->subdir.
".zip";
54 $this->export_dir = $this->cont_obj->getExportDirectory(
"scorm");
55 $this->subdir = $this->cont_obj->getType().
"_".$this->cont_obj->getId();
56 $this->filename = $this->subdir.
".zip";
60 $this->export_dir = $this->cont_obj->getOfflineDirectory();
61 $this->subdir = $date.
"__".$this->inst_id.
"__".
62 $this->cont_obj->getType().
"_".$this->cont_obj->getId();
63 $this->filename = $this->subdir.
".fo";
67 $this->export_dir = $this->cont_obj->getExportDirectory();
68 $this->subdir = $date.
"__".$this->inst_id.
"__".
69 $this->cont_obj->getType().
"_".$this->cont_obj->getId();
70 $this->filename = $this->subdir.
".xml";
115 $ilBench->start(
"ContentObjectExport",
"buildExportFile");
117 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
122 $this->xml->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.de/download/dtd/ilias_co_3_7.dtd\">");
125 $this->xml->xmlSetGenCmt(
"Export of ILIAS Content Module ".
126 $this->cont_obj->getId().
" of installation ".$this->inst.
".");
129 $this->xml->xmlHeader();
132 $this->cont_obj->createExportDirectory();
137 $expDir = $this->cont_obj->getExportDirectory();
138 $expLog =
new ilLog($expDir,
"export.log");
140 $expLog->setLogFormat(
"");
141 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export");
145 $ilBench->start(
"ContentObjectExport",
"buildExportFile_getXML");
146 $this->cont_obj->exportXML($this->xml, $this->inst_id,
147 $this->export_dir.
"/".$this->subdir, $expLog);
148 $ilBench->stop(
"ContentObjectExport",
"buildExportFile_getXML");
151 if ($this->cont_obj->getStyleSheetId() > 0)
153 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
154 $style_obj =
new ilObjStyleSheet($this->cont_obj->getStyleSheetId(),
false);
157 $style_file = $style_obj->export();
158 if (is_file($style_file))
160 copy($style_file, $this->export_dir.
"/".$this->subdir.
"/style.zip");
172 $this->xml->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->filename
178 include_once(
"./Services/Export/classes/class.ilExport.php");
180 $exp->exportEntity(
"help", $this->cont_obj->getId(),
"4.3.0",
"Services/Help",
181 "OnlineHelp", $this->export_dir.
"/".$this->subdir);
186 $this->export_dir.
"/".$this->subdir.
".zip");
189 $this->xml->_XmlWriter;
191 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export");
192 $ilBench->stop(
"ContentObjectExport",
"buildExportFile");
194 return $this->export_dir.
"/".$this->subdir.
".zip";
212 $ilBench->start(
"ContentObjectExport",
"buildHTMLPackage");
215 $this->cont_obj->createExportDirectory(
"html");
218 $ilBench->start(
"ContentObjectExport",
"buildHTMLPackage_getHTML");
219 $this->cont_obj->exportHTML($this->export_dir.
"/".$this->subdir, $expLog);
220 $ilBench->stop(
"ContentObjectExport",
"buildHTMLPackage_getHTML");
223 $ilBench->stop(
"ContentObjectExport",
"buildHTMLPackage");
233 $ilBench->start(
"ContentObjectExport",
"buildSCORMPackage");
236 $this->cont_obj->createExportDirectory(
"scorm");
239 $ilBench->start(
"ContentObjectExport",
"buildSCORMPackage_getSCORM");
240 $this->cont_obj->exportSCORM($this->export_dir.
"/".$this->subdir, $expLog);
241 $ilBench->stop(
"ContentObjectExport",
"buildSCORMPackage_getSCORM");
244 $ilBench->stop(
"ContentObjectExport",
"buildSCORMPackage");