ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSurveyExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 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
24
33 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
34 {
35 $refs = ilObject::_getAllReferences($a_id);
36 $svy_ref_id = current($refs);
37
38 include_once './Modules/Survey/classes/class.ilObjSurvey.php';
39 $svy = new ilObjSurvey($a_id,false);
40 $svy->loadFromDb();
41
42 include_once("./Modules/Survey/classes/class.ilSurveyExport.php");
43 $svy_exp = new ilSurveyExport($svy, 'xml');
44 $zip = $svy_exp->buildExportFile();
45
46 // Unzip, since survey deletes this dir
47 ilUtil::unzip($zip);
48
49 $GLOBALS['ilLog']->write(__METHOD__.': Created zip file '.$zip);
50 }
51
59 function getValidSchemaVersions($a_entity)
60 {
61 return array (
62 "4.1.0" => array(
63 "namespace" => "http://www.ilias.de/Modules/Survey/htlm/4_1",
64 "xsd_file" => "ilias_svy_4_1.xsd",
65 "uses_dataset" => false,
66 "min" => "4.1.0",
67 "max" => "")
68 );
69 }
70}
71
72?>
static _getAllReferences($a_id)
get all reference ids of object
Export class for surveys.
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 unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
Xml Exporter class.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276