ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilScormAiccExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 include_once("./Services/Export/classes/class.ilXmlExporter.php");
5 {
6  public function __construct()
7  {
8  include_once("./Modules/ScormAicc/classes/class.ilScormAiccDataSet.php");
9  $this->dataset = new ilScormAiccDataSet();
10  }
11 
12  public function init()
13  {
14  }
15 
16  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
17  {
18  include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
19  $lm = new ilObjSAHSLearningModule($a_id, false);
20  if ($lm->getEditable()) { // fix #0022063 (export authoring scorm lm)
21  include_once("./Modules/Scorm2004/classes/class.ilScorm2004DataSet.php");
22  $dataset = new ilScorm2004DataSet();
23  $dataset->setDSPrefix("ds");
24  $dataset->setExportDirectories($this->dir_relative, $this->dir_absolute);
25  $dataset->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
26  } else {
27  $this->dataset->setExportDirectories($this->dir_relative, $this->dir_absolute);
28  //using own getXmlRepresentation function in ilScormAiccDataSet
29  $this->dataset->getExtendedXmlRepresentation($a_entity, $a_schema_version, $a_id, "", false, true);
30  }
31  }
32 
33  //todo:check if xsd files must be provided
34  public function getValidSchemaVersions($a_entity)
35  {
36  return array(
37  "5.1.0" => array(
38  "namespace" => "http://www.ilias.de/Modules/ScormAicc/sahs/5_1",
39  "xsd_file" => "xml/ilias_sahs_5_1.xsd",
40  "uses_dataset" => true,
41  "min" => "5.1.0",
42  "max" => "")
43  );
44  }
45 
46  /*
47  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
48  {
49  $md_ids = array();
50  $md_ids[0] = "0:".$mob_id.":mob";
51 
52  return array (
53  array(
54  "component" => "Modules/ScormAicc",
55  "entity" => "md",
56  "ids" => $md_ids)
57  );
58  }
59  */
60 }
Xml Exporter class.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Class ilObjSCORMLearningModule.