ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
4 include_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 ?>