4 require_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
33 $this->cont_obj =& $a_cont_obj;
38 $this->mode = $a_mode;
39 $this->lang = $a_lang;
41 $settings = $this->
ilias->getAllSettings();
43 $this->inst_id = IL_INST_ID;
49 if ($this->lang ==
"")
51 $this->export_dir = $this->cont_obj->getExportDirectory(
"html");
55 $this->export_dir = $this->cont_obj->getExportDirectory(
"html_".$this->lang);
57 $this->subdir = $this->cont_obj->getType().
"_".$this->cont_obj->getId();
58 $this->filename = $this->subdir.
".zip";
62 $this->export_dir = $this->cont_obj->getExportDirectory(
"scorm");
63 $this->subdir = $this->cont_obj->getType().
"_".$this->cont_obj->getId();
64 $this->filename = $this->subdir.
".zip";
68 $this->export_dir = $this->cont_obj->getOfflineDirectory();
69 $this->subdir = $date.
"__".$this->inst_id.
"__".
70 $this->cont_obj->getType().
"_".$this->cont_obj->getId();
71 $this->filename = $this->subdir.
".fo";
75 $this->export_dir = $this->cont_obj->getExportDirectory();
76 $this->subdir = $date.
"__".$this->inst_id.
"__".
77 $this->cont_obj->getType().
"_".$this->cont_obj->getId();
78 $this->filename = $this->subdir.
".xml";
123 $ilBench->start(
"ContentObjectExport",
"buildExportFile");
125 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
130 $this->xml->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.de/download/dtd/ilias_co_3_7.dtd\">");
133 $this->xml->xmlSetGenCmt(
"Export of ILIAS Content Module ".
134 $this->cont_obj->getId().
" of installation ".$this->inst.
".");
137 $this->xml->xmlHeader();
140 $this->cont_obj->createExportDirectory();
145 $expDir = $this->cont_obj->getExportDirectory();
146 $expLog =
new ilLog($expDir,
"export.log");
148 $expLog->setLogFormat(
"");
149 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export");
153 $ilBench->start(
"ContentObjectExport",
"buildExportFile_getXML");
154 $this->cont_obj->exportXML($this->xml, $this->inst_id,
155 $this->export_dir.
"/".$this->subdir, $expLog);
156 $ilBench->stop(
"ContentObjectExport",
"buildExportFile_getXML");
159 if ($this->cont_obj->getStyleSheetId() > 0)
161 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
162 $style_obj =
new ilObjStyleSheet($this->cont_obj->getStyleSheetId(),
false);
165 $style_file = $style_obj->export();
166 if (is_file($style_file))
168 copy($style_file, $this->export_dir.
"/".$this->subdir.
"/style.zip");
180 $this->xml->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->filename
186 include_once(
"./Services/Export/classes/class.ilExport.php");
188 $exp->exportEntity(
"help", $this->cont_obj->getId(),
"4.3.0",
"Services/Help",
189 "OnlineHelp", $this->export_dir.
"/".$this->subdir);
194 $this->export_dir.
"/".$this->subdir.
".zip");
197 $this->xml->_XmlWriter;
199 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export");
200 $ilBench->stop(
"ContentObjectExport",
"buildExportFile");
202 return $this->export_dir.
"/".$this->subdir.
".zip";
221 if ($this->lang ==
"")
223 $this->cont_obj->createExportDirectory(
"html");
227 $this->cont_obj->createExportDirectory(
"html_".$this->lang);
232 $this->cont_obj->exportHTML($this->export_dir.
"/".$this->subdir, $expLog,
true,
"html", $this->lang);
242 $ilBench->start(
"ContentObjectExport",
"buildSCORMPackage");
245 $this->cont_obj->createExportDirectory(
"scorm");
248 $ilBench->start(
"ContentObjectExport",
"buildSCORMPackage_getSCORM");
249 $this->cont_obj->exportSCORM($this->export_dir.
"/".$this->subdir, $expLog);
250 $ilBench->stop(
"ContentObjectExport",
"buildSCORMPackage_getSCORM");
253 $ilBench->stop(
"ContentObjectExport",
"buildSCORMPackage");
xmlSetDtdDef($dtdDef)
Sets dtd definition.
setExportSubDir($a_dir)
Set local directory, that will be included within the zip file.
buildExportFileXML()
build xml export file
Export class for content objects.
buildExportFile()
build export file (complete zip file)
ilContObjectExport(&$a_cont_obj, $a_mode="xml", $a_lang="")
Constructor public.
redirection script todo: (a better solution should control the processing via a xml file) ...
buildExportFilePDF()
build pdf offline 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 ...
static isOnlineHelpModule($a_id, $a_as_obj_id=false)
Is module an online module.
buildExportFileHTML()
build html package
buildExportFileSCORM()
build scorm package