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
177 $this->export_dir.
"/".$this->subdir.
".zip");
180 $this->xml->_XmlWriter;
182 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export");
183 $ilBench->stop(
"ContentObjectExport",
"buildExportFile");
185 return $this->export_dir.
"/".$this->subdir.
".zip";
195 $ilBench->start(
"ContentObjectExport",
"buildPDFFile");
197 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
225 $ilBench->start(
"ContentObjectExport",
"buildPDFFile_getFO");
226 $this->cont_obj->exportFO($this->xml,
227 $this->export_dir.
"/".$this->subdir, $expLog);
228 $ilBench->stop(
"ContentObjectExport",
"buildPDFFile_getFO");
232 $ilBench->start(
"ContentObjectExport",
"buildPDFFile_dumpToFile");
234 $this->xml->xmlDumpFile($this->export_dir.
"/".$this->filename
236 $ilBench->stop(
"ContentObjectExport",
"buildPDFFile_dumpToFile");
240 include_once(
"classes/class.ilFOPUtil.php");
242 $this->export_dir.
"/".$this->subdir.
".pdf");
246 $this->xml->_XmlWriter;
249 $ilBench->stop(
"ContentObjectExport",
"buildPDFFile");
259 $ilBench->start(
"ContentObjectExport",
"buildHTMLPackage");
262 $this->cont_obj->createExportDirectory(
"html");
265 $ilBench->start(
"ContentObjectExport",
"buildHTMLPackage_getHTML");
266 $this->cont_obj->exportHTML($this->export_dir.
"/".$this->subdir, $expLog);
267 $ilBench->stop(
"ContentObjectExport",
"buildHTMLPackage_getHTML");
270 $ilBench->stop(
"ContentObjectExport",
"buildHTMLPackage");
280 $ilBench->start(
"ContentObjectExport",
"buildSCORMPackage");
283 $this->cont_obj->createExportDirectory(
"scorm");
286 $ilBench->start(
"ContentObjectExport",
"buildSCORMPackage_getSCORM");
287 $this->cont_obj->exportSCORM($this->export_dir.
"/".$this->subdir, $expLog);
288 $ilBench->stop(
"ContentObjectExport",
"buildSCORMPackage_getSCORM");
291 $ilBench->stop(
"ContentObjectExport",
"buildSCORMPackage");