ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilExerciseExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2012 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  include_once("./Modules/Exercise/classes/class.ilExerciseDataSet.php");
23  $this->ds = new ilExerciseDataSet();
24  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
25  $this->ds->setDSPrefix("ds");
26  }
27 
36  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
37  {
38  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
39  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
40  }
41 
49  function getValidSchemaVersions($a_entity)
50  {
51  return array (
52  "4.1.0" => array(
53  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/4_1",
54  "xsd_file" => "ilias_exc_4_1.xsd",
55  "uses_dataset" => true,
56  "min" => "4.1.0",
57  "max" => "4.3.99"),
58  "4.4.0" => array(
59  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/4_4",
60  "xsd_file" => "ilias_exc_4_4.xsd",
61  "uses_dataset" => true,
62  "min" => "4.4.0",
63  "max" => "4.4.99"),
64  "5.0.0" => array(
65  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_0",
66  "xsd_file" => "ilias_exc_5_0.xsd",
67  "uses_dataset" => true,
68  "min" => "5.0.0",
69  "max" => "5.0.99"),
70  "5.1.0" => array(
71  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_1",
72  "xsd_file" => "ilias_exc_5_1.xsd",
73  "uses_dataset" => true,
74  "min" => "5.1.0",
75  "max" => "5.1.99"),
76  "5.2.0" => array(
77  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_2",
78  "xsd_file" => "ilias_exc_5_2.xsd",
79  "uses_dataset" => true,
80  "min" => "5.2.0",
81  "max" => "")
82  );
83  }
84 
85 }
86 
87 ?>
Xml Exporter class.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
Exercise data set class.
Create styles array
The data for the language used.
Exporter class for exercise.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.