ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilTestQuestionPoolExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Export/classes/class.ilXmlExporter.php");
5
14{
15 private $ds;
16
20 function init()
21 {
22 }
23
30 public static function lookupExportDirectory($a_obj_type, $a_obj_id, $a_export_type = 'xml', $a_entity = "")
31 {
32 if($a_export_type == 'xml')
33 {
34 return ilUtil::getDataDir() . "/qpl_data" . "/qpl_" . $a_obj_id . "/export_zip";
35
36 }
37 return ilUtil::getDataDir()."/qpl_data"."/qpl_".$a_obj_id."/export_".$a_export_type;
38 }
39
40
49 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
50 {
51 include_once './Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
52 $qpl = new ilObjQuestionPool($a_id,false);
53
54 include_once("./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
55 $qpl_exp = new ilQuestionpoolExport($qpl, 'xml');
56 $zip = $qpl_exp->buildExportFile();
57
58 $GLOBALS['ilLog']->write(__METHOD__.': Created zip file '.$zip);
59 }
60
68 function getValidSchemaVersions($a_entity)
69 {
70 return array (
71 "4.1.0" => array(
72 "namespace" => "http://www.ilias.de/Modules/TestQuestionPool/htlm/4_1",
73 "xsd_file" => "ilias_qpl_4_1.xsd",
74 "uses_dataset" => false,
75 "min" => "4.1.0",
76 "max" => "")
77 );
78 }
79
80}
81
82?>
Export class for questionpools.
Used for container export with tests.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
static lookupExportDirectory($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
Overwritten for qpl.
static getDataDir()
get data directory (outside webspace)
Xml Exporter class.
$GLOBALS['ct_recipient']