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";
114 $ilBench->start(
"GlossaryExport",
"buildExportFile");
116 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
121 $this->xml->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.uni-koeln.de/download/dtd/ilias_co_3_7.dtd\">");
124 $this->xml->xmlSetGenCmt(
"Export of ILIAS Glossary ".
125 $this->glo_obj->getId().
" of installation ".$this->inst.
".");
128 $this->xml->xmlHeader();
131 $this->glo_obj->createExportDirectory();
136 $expDir = $this->glo_obj->getExportDirectory();
137 include_once
'./Services/Logging/classes/class.ilLog.php';
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(
"GlossaryExport",
"buildExportFile_getXML");
146 $this->glo_obj->exportXML($this->xml, $this->inst_id,
147 $this->export_dir.
"/".$this->subdir, $expLog);
148 $ilBench->stop(
"GlossaryExport",
"buildExportFile_getXML");
159 $ilBench->start(
"GlossaryExport",
"buildExportFile_dumpToFile");
160 $this->xml->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->filename
162 $ilBench->stop(
"GlossaryExport",
"buildExportFile_dumpToFile");
165 $ilBench->start(
"GlossaryExport",
"buildExportFile_zipFile");
167 $this->export_dir.
"/".$this->subdir.
".zip");
168 $ilBench->stop(
"GlossaryExport",
"buildExportFile_zipFile");
171 $this->xml->_XmlWriter;
173 $expLog->write(
date(
"[y-m-d H:i:s] ").
"Finished Export");
174 $ilBench->stop(
"GlossaryExport",
"buildExportFile");
176 return $this->export_dir.
"/".$this->subdir.
".zip";
187 $this->glo_obj->createExportDirectory(
"html");
190 $expDir = $this->glo_obj->getExportDirectory();
193 $this->glo_obj->exportHTML($this->export_dir.
"/".$this->subdir, $expLog);
buildExportFileHTML()
build html export file
xmlSetDtdDef($dtdDef)
Sets dtd definition.
buildExportFileXML()
build export file (complete zip file)
buildExportFile()
build export file (complete zip file)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
redirection script todo: (a better solution should control the processing via a xml file) ...
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
__construct(&$a_glo_obj, $a_mode="xml")
Constructor public.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Export class for content objects.