ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilSurveyQuestionPoolExporter.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
12 private $ds;
13
17 public function init()
18 {
19 }
20
21
30 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
31 {
32 $refs = ilObject::_getAllReferences($a_id);
33 $sql_ref_id = current($refs);
34
35 $spl = new ilObjSurveyQuestionPool($a_id, false);
36 $spl->loadFromDb();
37
38 $spl_exp = new ilSurveyQuestionpoolExport($spl, 'xml');
39 $zip = $spl_exp->buildExportFile();
40 $GLOBALS['ilLog']->write(__METHOD__ . ': Created zip file ' . $zip);
41 }
42
51 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
52 {
53 $deps = [];
54
55 // service settings
56 $deps[] = [
57 "component" => "Services/Object",
58 "entity" => "common",
59 "ids" => $a_ids
60 ];
61
62 return $deps;
63 }
64
65
73 public function getValidSchemaVersions($a_entity)
74 {
75 return array(
76 "4.1.0" => array(
77 "namespace" => "http://www.ilias.de/Modules/SurveyQuestionPool/htlm/4_1",
78 "xsd_file" => "ilias_spl_4_1.xsd",
79 "uses_dataset" => false,
80 "min" => "4.1.0",
81 "max" => "")
82 );
83 }
84}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
An exception for terminatinating execution or to throw for unit testing.
Class ilObjSurveyQuestionPool.
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.