38 string $a_mode =
"xml" 43 $ilDB = $DIC->database();
45 $this->glo_obj = $a_glo_obj;
47 $this->mode = $a_mode;
51 $this->inst_id = $settings[
"inst_id"] ? $settings[
'inst_id'] : 0;
54 switch ($this->mode) {
56 $this->export_dir = $this->glo_obj->getExportDirectory();
57 $this->subdir = $date .
"__" . $this->inst_id .
"__" .
58 $this->glo_obj->getType() .
"_" . $this->glo_obj->getId();
59 $this->filename = $this->subdir .
".xml";
63 $this->export_dir = $this->glo_obj->getExportDirectory(
"html");
64 $this->subdir = $this->glo_obj->getType() .
"_" . $this->glo_obj->getId();
65 $this->filename = $this->subdir .
".zip";
81 switch ($this->mode) {
98 $this->xml->xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"https://www.ilias.uni-koeln.de/download/dtd/ilias_co_3_7.dtd\">");
101 $this->xml->xmlSetGenCmt(
"Export of ILIAS Glossary " .
102 $this->glo_obj->getId() .
" of installation " . $this->inst_id .
".");
105 $this->xml->xmlHeader();
108 $this->glo_obj->createExportDirectory();
113 $expDir = $this->glo_obj->getExportDirectory();
114 $expLog =
new ilLog($expDir,
"export.log");
116 $expLog->setLogFormat(
"");
117 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Start Export");
120 $this->glo_obj->exportXML(
123 $this->export_dir .
"/" . $this->subdir,
130 $this->xml->xmlDumpFile($this->export_dir .
"/" . $this->subdir .
"/" . $this->filename,
false);
134 $this->export_dir .
"/" . $this->subdir,
135 $this->export_dir .
"/" . $this->subdir .
".zip" 138 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Finished Export");
140 return $this->export_dir .
"/" . $this->subdir .
".zip";
149 $this->glo_obj->createExportDirectory(
"html");
152 $exp = new \ILIAS\Glossary\Export\GlossaryHtmlExport(
157 return $exp->exportHTML();
__construct(ilObjGlossary $a_glo_obj, string $a_mode="xml")
buildExportFileHTML()
build html export file
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildExportFileXML()
build export file (complete zip file)
buildExportFile()
build export file (complete zip file)
static zip(string $a_dir, string $a_file, bool $compress_content=false)
zips given directory/file into given zip.file
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...