49         protected string $mode = 
"xml",
    50         protected ?array $questions = null
    53         $this->err = $DIC[
'ilErr'];
    54         $this->db = $DIC[
'ilDB'];
    55         $this->
ilias = $DIC[
'ilias'];
    56         $this->
lng = $DIC[
'lng'];
    58         if (!is_array($this->questions)) {
    59             $this->questions = $this->qpl_obj->getAllQuestionIds();
    65         $this->qpl_obj->createExportDirectory();
    66         switch ($this->mode) {
    68                 $this->export_dir = $this->qpl_obj->getExportDirectory(
'xml');
    69                 $this->subdir = $date . 
"__" . $this->inst_id . 
"__" .
    70                     "qpl" . 
"_" . $this->qpl_obj->getId();
    71                 $this->filename = $this->subdir . 
".xml";
    72                 $this->qti_filename = $date . 
"__" . $this->inst_id . 
"__" .
    73                     "qti" . 
"_" . $this->qpl_obj->getId() . 
".xml";
    76                 $this->export_dir = $this->qpl_obj->getExportDirectory(
'xlsx');
    77                 $this->filename = $date . 
"__" . $this->inst_id . 
"__" .
    78                     "qpl" . 
"_" . $this->qpl_obj->getId() . 
".xlsx";
    79                 $this->zipfilename = $date . 
"__" . $this->inst_id . 
"__" .
    80                     "qpl" . 
"_" . $this->qpl_obj->getId() . 
".zip";
    83                 $this->export_dir = $this->qpl_obj->getExportDirectory(
'zip');
    84                 $this->subdir = $date . 
"__" . $this->inst_id . 
"__" .
    85                     "qpl" . 
"_" . $this->qpl_obj->getId();
    86                 $this->filename = $this->subdir . 
".xml";
    87                 $this->qti_filename = $date . 
"__" . $this->inst_id . 
"__" .
    88                     "qti" . 
"_" . $this->qpl_obj->getId() . 
".xml";
   104         switch ($this->mode) {
   106                 return $this->buildExportFileXLSX();
   119         $ilBench = $DIC[
'ilBench'];
   121         $ilBench->start(
"QuestionpoolExport", 
"buildExportFile");
   124         $this->xml->xmlSetDtdDef(
"<!DOCTYPE Test SYSTEM \"http://www.ilias.uni-koeln.de/download/dtd/ilias_co.dtd\">");
   125         $this->xml->xmlSetGenCmt(
"Export of ILIAS Test Questionpool " .
   127         $this->xml->xmlHeader();
   132         $expDir = $this->qpl_obj->getExportDirectory();
   135         $expLog = 
new ilLog($expDir, 
"export.log");
   137         $expLog->setLogFormat(
"");
   138         $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Start Export");
   140         $qti_file = fopen($this->export_dir . 
"/" . $this->subdir . 
"/" . $this->qti_filename, 
"w");
   141         fwrite($qti_file, $this->qpl_obj->questionsToXML($this->questions));
   144         $ilBench->start(
"QuestionpoolExport", 
"buildExportFile_getXML");
   145         $this->qpl_obj->objectToXmlWriter(
   148             $this->export_dir . 
"/" . $this->subdir,
   152         $ilBench->stop(
"QuestionpoolExport", 
"buildExportFile_getXML");
   154         $ilBench->start(
"QuestionpoolExport", 
"buildExportFile_dumpToFile");
   155         $this->xml->xmlDumpFile($this->export_dir . 
"/" . $this->subdir . 
"/" . $this->filename, 
false);
   156         $ilBench->stop(
"QuestionpoolExport", 
"buildExportFile_dumpToFile");
   158         $ilBench->start(
"QuestionpoolExport", 
"buildExportFile_saveAdditionalMobs");
   160         $ilBench->stop(
"QuestionpoolExport", 
"buildExportFile_saveAdditionalMobs");
   162         $ilBench->start(
"QuestionpoolExport", 
"buildExportFile_zipFile");
   163         ilFileUtils::zip($this->export_dir . 
"/" . $this->subdir, $this->export_dir . 
"/" . $this->subdir . 
".zip");
   165         $ilBench->stop(
"QuestionpoolExport", 
"buildExportFile_zipFile");
   167         $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Finished Export");
   168         $ilBench->stop(
"QuestionpoolExport", 
"buildExportFile");
   170         return $this->export_dir . 
"/" . $this->subdir . 
".zip";
   175         foreach ($this->questions as $question_id) {
   177             foreach ($mobs as $mob) {
   180                     $mob_obj->exportFiles($a_export_dir);
 
Interface Observer  Contains several chained tasks and infos about them. 
 
__construct(protected ilObjQuestionPool $qpl_obj, protected string $mode="xml", protected ?array $questions=null)
Constructor  public. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static makeDirParents(string $a_dir)
Create a new directory and all parent directories. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
buildExportFile()
build export file (complete zip file) 
 
buildExportFileXML()
build xml export file 
 
Class ilObjForumAdministration. 
 
exportXHTMLMediaObjects($a_export_dir)
 
static zip(string $a_dir, string $a_file, bool $compress_content=false)
 
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...