Export class for content objects.
More...
◆ buildExportFile()
ilContObjectExport::buildExportFile |
( |
| ) |
|
◆ buildExportFileHTML()
ilContObjectExport::buildExportFileHTML |
( |
| ) |
|
build html package
Definition at line 216 of file class.ilContObjectExport.php.
References $ilBench.
Referenced by buildExportFile().
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);
◆ buildExportFilePDF()
ilContObjectExport::buildExportFilePDF |
( |
| ) |
|
◆ buildExportFileSCORM()
ilContObjectExport::buildExportFileSCORM |
( |
| ) |
|
build scorm package
Definition at line 238 of file class.ilContObjectExport.php.
References $ilBench.
Referenced by buildExportFile().
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");
◆ buildExportFileXML()
ilContObjectExport::buildExportFileXML |
( |
| ) |
|
build xml export file
Definition at line 119 of file class.ilContObjectExport.php.
References $_GET, $ilBench, ilObjContentObject\isOnlineHelpModule(), ilUtil\makeDir(), ilObjStyleSheet\setExportSubDir(), ilXmlWriter\xmlSetDtdDef(), and ilUtil\zip().
Referenced by buildExportFile().
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";
xmlSetDtdDef($dtdDef)
Sets dtd definition.
setExportSubDir($a_dir)
Set local directory, that will be included within the zip 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.
◆ getInstId()
ilContObjectExport::getInstId |
( |
| ) |
|
◆ ilContObjectExport()
ilContObjectExport::ilContObjectExport |
( |
& |
$a_cont_obj, |
|
|
|
$a_mode = "xml" , |
|
|
|
$a_lang = "" |
|
) |
| |
Constructor public.
Definition at line 29 of file class.ilContObjectExport.php.
References $ilErr, and $ilias.
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";
redirection script todo: (a better solution should control the processing via a xml file) ...
◆ $cont_obj
ilContObjectExport::$cont_obj |
◆ $db
◆ $err
◆ $ilias
ilContObjectExport::$ilias |
◆ $inst_id
ilContObjectExport::$inst_id |
◆ $mode
ilContObjectExport::$mode |
The documentation for this class was generated from the following file: