46 $this->spl_obj = $a_spl_obj;
49 $this->mode = $a_mode;
51 $this->inst_id = IL_INST_ID;
57 $this->export_dir = $this->spl_obj->getExportDirectory();
58 $this->subdir = $date.
"__".$this->inst_id.
"__".
59 "spl".
"_".$this->spl_obj->getId();
60 $this->filename = $this->subdir.
".xml";
94 $ilBench->start(
"SurveyQuestionpoolExport",
"buildExportFile");
97 $this->spl_obj->createExportDirectory();
101 include_once
"./Services/Logging/classes/class.ilLog.php";
102 $expLog =
new ilLog($this->spl_obj->getExportDirectory(),
"export.log");
104 $expLog->setLogFormat(
"");
105 $expLog->write(
date(
"[y-m-d H:i:s] ").
"Start Export");
107 $qti_file = fopen($this->export_dir.
"/".$this->subdir.
"/". $this->filename,
"w");
108 fwrite($qti_file, $this->spl_obj->toXML($questions));
111 $this->xml->_XmlWriter;
114 $this->export_dir.
"/".$this->subdir.
".zip");
116 $expLog->write(
date(
"[y-m-d H:i:s] ").
"Finished Export");
117 $ilBench->stop(
"SurveyQuestionpoolExport",
"buildExportFile");
119 return $this->export_dir.
"/".$this->subdir.
".zip";
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
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)
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...