ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilHTMLLearningModuleExporter.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 public function init()
21 {
22 include_once("./Modules/HTMLLearningModule/classes/class.ilHTMLLearningModuleDataSet.php");
23 $this->ds = new ilHTMLLearningModuleDataSet();
24 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
25 $this->ds->setDSPrefix("ds");
26 }
27
28
37 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
38 {
39 $deps = [];
40 $md_ids = [];
41 foreach ($a_ids as $id) {
42 $md_ids[] = $id . ":0:htlm";
43 }
44
45 $deps[] = [
46 "component" => "Services/MetaData",
47 "entity" => "md",
48 "ids" => $md_ids
49 ];
50
51 // service settings
52 $deps[] = [
53 "component" => "Services/Object",
54 "entity" => "common",
55 "ids" => $a_ids
56 ];
57
58 return $deps;
59 }
60
69 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
70 {
71 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
72 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
73 }
74
82 public function getValidSchemaVersions($a_entity)
83 {
84 return array(
85 "4.1.0" => array(
86 "namespace" => "http://www.ilias.de/Modules/HTMLLearningModule/htlm/4_1",
87 "xsd_file" => "ilias_htlm_4_1.xsd",
88 "uses_dataset" => true,
89 "min" => "4.1.0",
90 "max" => "")
91 );
92 }
93}
An exception for terminatinating execution or to throw for unit testing.
HTML learning module data set class.
Exporter class for html learning modules.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
Xml Exporter class.
if(!array_key_exists('StateId', $_REQUEST)) $id