46 $ilDB = $DIC->database();
48 $this->spl_obj = $a_spl_obj;
51 $this->mode = $a_mode;
53 $this->inst_id = IL_INST_ID;
56 switch ($this->mode) {
58 $this->export_dir = $this->spl_obj->getExportDirectory();
59 $this->subdir = $date .
"__" . $this->inst_id .
"__" .
60 "spl" .
"_" . $this->spl_obj->getId();
61 $this->filename = $this->subdir .
".xml";
80 switch ($this->mode) {
93 $this->spl_obj->createExportDirectory();
97 include_once
"./Services/Logging/classes/class.ilLog.php";
98 $expLog =
new ilLog($this->spl_obj->getExportDirectory(),
"export.log");
100 $expLog->setLogFormat(
"");
101 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Start Export");
103 $qti_file =
fopen($this->export_dir .
"/" . $this->subdir .
"/" . $this->filename,
"w");
104 fwrite($qti_file, $this->spl_obj->toXML($questions));
107 $this->xml->_XmlWriter;
110 $this->export_dir .
"/" . $this->subdir,
111 $this->export_dir .
"/" . $this->subdir .
".zip" 114 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Finished Export");
116 return $this->export_dir .
"/" . $this->subdir .
".zip";
buildExportFile($questions=null)
build export file (complete zip file)
__construct($a_spl_obj, $a_mode="xml")
Constructor public.
Export class for survey questionpools.
buildExportFileXML($questions=null)
build xml export 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 ...