24 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
51 $this->glo_obj =& $a_glo_obj;
56 $this->mode = $a_mode;
58 $settings = $this->ilias->getAllSettings();
60 $this->inst_id = $settings[
"inst_id"] ? $settings[
'inst_id'] : 0;
66 $this->export_dir = $this->glo_obj->getExportDirectory();
67 $this->subdir = $date.
"__".$this->inst_id.
"__".
68 $this->glo_obj->getType().
"_".$this->glo_obj->getId();
69 $this->filename = $this->subdir.
".xml";
73 $this->export_dir = $this->glo_obj->getExportDirectory(
"html");
74 $this->subdir = $this->glo_obj->getType().
"_".$this->glo_obj->getId();
75 $this->filename = $this->subdir.
".zip";
184 $ilBench->start(
"GlossaryExport",
"buildExportFile");
186 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
191 $this->xml->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.uni-koeln.de/download/dtd/ilias_co_3_7.dtd\">");
194 $this->xml->xmlSetGenCmt(
"Export of ILIAS Glossary ".
195 $this->glo_obj->getId().
" of installation ".$this->inst.
".");
198 $this->xml->xmlHeader();
201 $this->glo_obj->createExportDirectory();
206 $expDir = $this->glo_obj->getExportDirectory();
207 $expLog =
new ilLog($expDir,
"export.log");
209 $expLog->setLogFormat(
"");
210 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export");
214 $ilBench->start(
"GlossaryExport",
"buildExportFile_getXML");
215 $this->glo_obj->exportXML($this->xml, $this->inst_id,
216 $this->export_dir.
"/".$this->subdir, $expLog);
217 $ilBench->stop(
"GlossaryExport",
"buildExportFile_getXML");
228 $ilBench->start(
"GlossaryExport",
"buildExportFile_dumpToFile");
229 $this->xml->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->filename
231 $ilBench->stop(
"GlossaryExport",
"buildExportFile_dumpToFile");
234 $ilBench->start(
"GlossaryExport",
"buildExportFile_zipFile");
236 $this->export_dir.
"/".$this->subdir.
".zip");
237 $ilBench->stop(
"GlossaryExport",
"buildExportFile_zipFile");
240 $this->xml->_XmlWriter;
242 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export");
243 $ilBench->stop(
"GlossaryExport",
"buildExportFile");
245 return $this->export_dir.
"/".$this->subdir.
".zip";
255 $ilBench->start(
"GlossaryExport",
"buildHTMLPackage");
258 $this->glo_obj->createExportDirectory(
"html");
261 $expDir = $this->glo_obj->getExportDirectory();
269 $ilBench->start(
"GlossaryExport",
"buildExportFile_getHTML");
270 $this->glo_obj->exportHTML($this->export_dir.
"/".$this->subdir, $expLog);
271 $ilBench->stop(
"GlossaryExport",
"buildExportFile_getHTML");
273 $ilBench->stop(
"GlossaryExport",
"buildHTMLPackage");