ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSurveyQuestionPoolExporter.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  public 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  $sql_ref_id = current($refs);
37 
38  include_once './Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php';
39  $spl = new ilObjSurveyQuestionPool($a_id, false);
40  $spl->loadFromDb();
41 
42  include_once("./Modules/SurveyQuestionPool/classes/class.ilSurveyQuestionpoolExport.php");
43  $spl_exp = new ilSurveyQuestionpoolExport($spl, 'xml');
44  $zip = $spl_exp->buildExportFile();
45  $GLOBALS['ilLog']->write(__METHOD__ . ': Created zip file ' . $zip);
46  }
47 
55  public function getValidSchemaVersions($a_entity)
56  {
57  return array(
58  "4.1.0" => array(
59  "namespace" => "http://www.ilias.de/Modules/SurveyQuestionPool/htlm/4_1",
60  "xsd_file" => "ilias_spl_4_1.xsd",
61  "uses_dataset" => false,
62  "min" => "4.1.0",
63  "max" => "")
64  );
65  }
66 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getAllReferences($a_id)
get all reference ids of object
Xml Exporter class.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
Export class for survey questionpools.
Create styles array
The data for the language used.
Used for container export with tests.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.