ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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  public 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 
42  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
43  {
44  $res = [];
45 
46  if ($a_entity == "exc") {
47  // service settings
48  $res[] = array(
49  "component" => "Services/Object",
50  "entity" => "common",
51  "ids" => $a_ids
52  );
53  }
54 
55  return $res;
56  }
57 
65  public function getValidSchemaVersions($a_entity)
66  {
67  return array(
68  "4.1.0" => array(
69  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/4_1",
70  "xsd_file" => "ilias_exc_4_1.xsd",
71  "uses_dataset" => true,
72  "min" => "4.1.0",
73  "max" => "4.3.99"),
74  "4.4.0" => array(
75  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/4_4",
76  "xsd_file" => "ilias_exc_4_4.xsd",
77  "uses_dataset" => true,
78  "min" => "4.4.0",
79  "max" => "4.4.99"),
80  "5.0.0" => array(
81  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_0",
82  "xsd_file" => "ilias_exc_5_0.xsd",
83  "uses_dataset" => true,
84  "min" => "5.0.0",
85  "max" => "5.0.99"),
86  "5.1.0" => array(
87  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_1",
88  "xsd_file" => "ilias_exc_5_1.xsd",
89  "uses_dataset" => true,
90  "min" => "5.1.0",
91  "max" => "5.1.99"),
92  "5.2.0" => array(
93  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_2",
94  "xsd_file" => "ilias_exc_5_2.xsd",
95  "uses_dataset" => true,
96  "min" => "5.2.0",
97  "max" => "5.2.99"),
98  "5.3.0" => array(
99  "namespace" => "http://www.ilias.de/Modules/Exercise/exc/5_3",
100  "xsd_file" => "ilias_exc_5_3.xsd",
101  "uses_dataset" => true,
102  "min" => "5.3.0",
103  "max" => "")
104  );
105  }
106 }
Xml Exporter class.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
foreach($_POST as $key=> $value) $res
Exercise data set class.
Exporter class for exercise.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.