ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
4include_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
56 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
57 {
58 $deps = [];
59
60 // service settings
61 $deps[] = [
62 "component" => "Services/Object",
63 "entity" => "common",
64 "ids" => $a_ids
65 ];
66
67 return $deps;
68 }
69
70
78 public function getValidSchemaVersions($a_entity)
79 {
80 return array(
81 "4.1.0" => array(
82 "namespace" => "http://www.ilias.de/Modules/SurveyQuestionPool/htlm/4_1",
83 "xsd_file" => "ilias_spl_4_1.xsd",
84 "uses_dataset" => false,
85 "min" => "4.1.0",
86 "max" => "")
87 );
88 }
89}
An exception for terminatinating execution or to throw for unit testing.
static _getAllReferences($a_id)
get all reference ids of object
Used for container export with tests.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
Export class for survey questionpools.
Xml Exporter class.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.