24 include_once
"./Modules/Survey/classes/inc.SurveyConstants.php";
53 $this->survey_obj =& $a_survey_obj;
58 $this->mode = $a_mode;
60 $settings = $this->ilias->getAllSettings();
62 $this->inst_id = IL_INST_ID;
68 $this->export_dir = $this->survey_obj->getExportDirectory();
69 $this->subdir = $date.
"__".$this->inst_id.
"__".
70 "svy".
"_".$this->survey_obj->getId();
71 $this->filename = $this->subdir.
".xml";
105 $ilBench->start(
"SurveyExport",
"buildExportFile");
108 $this->survey_obj->createExportDirectory();
109 include_once
"./Services/Utilities/classes/class.ilUtil.php";
114 $expDir = $this->survey_obj->getExportDirectory();
115 include_once
"./Services/Logging/classes/class.ilLog.php";
116 $expLog =
new ilLog($expDir,
"export.log");
118 $expLog->setLogFormat(
"");
119 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export");
122 $xmlFile = fopen($this->export_dir.
"/".$this->subdir.
"/".$this->filename,
"w");
123 fwrite($xmlFile, $this->survey_obj->toXML());
130 $ilBench->start(
"SurveyExport",
"buildExportFileXML_zipFile");
131 ilUtil::zip($this->export_dir.
"/".$this->subdir, $this->export_dir.
"/".$this->subdir.
".zip");
132 $ilBench->stop(
"SurveyExport",
"buildExportFileXML_zipFile");
134 if (@file_exists($this->export_dir.
"/".$this->subdir.
".zip"))
137 if (@is_dir($this->export_dir.
"/".$this->subdir))
142 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export");
143 $ilBench->stop(
"SurveyExport",
"buildExportFile");
145 return $this->export_dir.
"/".$this->subdir.
".zip";
151 $ilBench->start(
"SurveyExport",
"exportXHTMLMediaObjects");
152 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
155 foreach (
$mobs as $mob)
158 $mob_obj->exportFiles($a_export_dir);
172 $ilBench->stop(
"SurveyExport",
"exportXHTMLMediaObjects");