Public Member Functions | |
| ilSurveyQuestionpoolExport (&$a_spl_obj, $a_mode="xml") | |
| Constructor public. | |
| getInstId () | |
| buildExportFile ($questions) | |
| build export file (complete zip file) | |
| buildExportFileXML ($questions) | |
| build xml export file | |
Data Fields | |
| $err | |
| $db | |
| $ilias | |
| $spl_obj | |
| $inst_id | |
| $mode | |
Definition at line 31 of file class.ilSurveyQuestionpoolExport.php.
| ilSurveyQuestionpoolExport::buildExportFile | ( | $ | questions | ) |
build export file (complete zip file)
public
Definition at line 83 of file class.ilSurveyQuestionpoolExport.php.
References buildExportFileXML().
{
switch ($this->mode)
{
default:
return $this->buildExportFileXML($questions);
break;
}
}
Here is the call graph for this function:| ilSurveyQuestionpoolExport::buildExportFileXML | ( | $ | questions | ) |
build xml export file
Definition at line 96 of file class.ilSurveyQuestionpoolExport.php.
References $ilBench.
Referenced by buildExportFile().
{
global $ilBench;
$ilBench->start("SurveyQuestionpoolExport", "buildExportFile");
// create directories
$this->spl_obj->createExportDirectory();
// get Log File
$expDir = $this->spl_obj->getExportDirectory();
$expLog = new ilLog($expDir, "export.log");
$expLog->delete();
$expLog->setLogFormat("");
$expLog->write(date("[y-m-d H:i:s] ")."Start Export");
// write qti file
$qti_file = fopen($expDir . "/" . $this->filename, "w");
fwrite($qti_file, $this->spl_obj->to_xml($questions));
fclose($qti_file);
// destroy writer object
$this->xml->_XmlWriter;
$expLog->write(date("[y-m-d H:i:s] ")."Finished Export");
$ilBench->stop("SurveyQuestionpoolExport", "buildExportFile");
return $this->filename;
}
Here is the caller graph for this function:| ilSurveyQuestionpoolExport::getInstId | ( | ) |
Definition at line 71 of file class.ilSurveyQuestionpoolExport.php.
{
return $this->inst_id;
}
| ilSurveyQuestionpoolExport::ilSurveyQuestionpoolExport | ( | &$ | a_spl_obj, | |
| $ | a_mode = "xml" | |||
| ) |
Constructor public.
Definition at line 44 of file class.ilSurveyQuestionpoolExport.php.
References $ilErr, $ilias, and $settings.
{
global $ilErr, $ilDB, $ilias;
$this->spl_obj =& $a_spl_obj;
$this->err =& $ilErr;
$this->ilias =& $ilias;
$this->db =& $ilDB;
$this->mode = $a_mode;
$settings = $this->ilias->getAllSettings();
//$this->inst_id = $settings["inst_id"];
$this->inst_id = IL_INST_ID;
$date = time();
switch($this->mode)
{
default:
$this->export_dir = $this->spl_obj->getExportDirectory();
$this->subdir = $date."__".$this->inst_id."__".
"spl"."__".$this->spl_obj->getId();
$this->filename = $this->subdir.".xml";
break;
}
}
| ilSurveyQuestionpoolExport::$db |
Definition at line 34 of file class.ilSurveyQuestionpoolExport.php.
| ilSurveyQuestionpoolExport::$err |
Definition at line 33 of file class.ilSurveyQuestionpoolExport.php.
| ilSurveyQuestionpoolExport::$ilias |
Definition at line 35 of file class.ilSurveyQuestionpoolExport.php.
Referenced by ilSurveyQuestionpoolExport().
| ilSurveyQuestionpoolExport::$inst_id |
Definition at line 37 of file class.ilSurveyQuestionpoolExport.php.
| ilSurveyQuestionpoolExport::$mode |
Definition at line 38 of file class.ilSurveyQuestionpoolExport.php.
| ilSurveyQuestionpoolExport::$spl_obj |
Definition at line 36 of file class.ilSurveyQuestionpoolExport.php.
1.7.1