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        $expLog = 
new ilLog($this->spl_obj->getExportDirectory(), 
"export.log");
 
   99        $expLog->setLogFormat(
"");
 
  100        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Start Export");
 
  102        $qti_file = fopen($this->export_dir . 
"/" . $this->subdir . 
"/" . $this->filename, 
"w");
 
  103        fwrite($qti_file, $this->spl_obj->toXML($questions));
 
  106        $this->xml->_XmlWriter;
 
  109            $this->export_dir . 
"/" . $this->subdir,
 
  110            $this->export_dir . 
"/" . $this->subdir . 
".zip" 
  113        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Finished Export");
 
  115        return $this->export_dir . 
"/" . $this->subdir . 
".zip";
 
An exception for terminatinating execution or to throw for unit testing.
Export class for survey questionpools.
buildExportFile($questions=null)
build export file (complete zip file)
buildExportFileXML($questions=null)
build xml export file
__construct($a_spl_obj, $a_mode="xml")
Constructor @access public.
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 ...