ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSurveyExporter Class Reference

Used for container export with tests. More...

+ Inheritance diagram for ilSurveyExporter:
+ Collaboration diagram for ilSurveyExporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 init ()
 
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories. More...
 
 getRelativeExportDirectory ()
 Get relative export directory. More...
 
 getAbsoluteExportDirectory ()
 Get absolute export directory. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version. More...
 

Private Attributes

 $ds
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Detailed Description

Used for container export with tests.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id

Definition at line 13 of file class.ilSurveyExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilSurveyExporter::getValidSchemaVersions (   $a_entity)

Returns schema versions that the component can export to.

ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top.

Returns

Reimplemented from ilXmlExporter.

Definition at line 59 of file class.ilSurveyExporter.php.

60 {
61 return array (
62 "4.1.0" => array(
63 "namespace" => "http://www.ilias.de/Modules/Survey/htlm/4_1",
64 "xsd_file" => "ilias_svy_4_1.xsd",
65 "uses_dataset" => false,
66 "min" => "4.1.0",
67 "max" => "")
68 );
69 }

◆ getXmlRepresentation()

ilSurveyExporter::getXmlRepresentation (   $a_entity,
  $a_schema_version,
  $a_id 
)

Get xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

Definition at line 33 of file class.ilSurveyExporter.php.

34 {
35 $refs = ilObject::_getAllReferences($a_id);
36 $svy_ref_id = current($refs);
37
38 include_once './Modules/Survey/classes/class.ilObjSurvey.php';
39 $svy = new ilObjSurvey($a_id,false);
40 $svy->loadFromDb();
41
42 include_once("./Modules/Survey/classes/class.ilSurveyExport.php");
43 $svy_exp = new ilSurveyExport($svy, 'xml');
44 $zip = $svy_exp->buildExportFile();
45
46 // Unzip, since survey deletes this dir
47 ilUtil::unzip($zip);
48
49 $GLOBALS['ilLog']->write(__METHOD__.': Created zip file '.$zip);
50 }
static _getAllReferences($a_id)
get all reference ids of object
Export class for surveys.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

References $GLOBALS, ilObject\_getAllReferences(), and ilUtil\unzip().

+ Here is the call graph for this function:

◆ init()

ilSurveyExporter::init ( )

Initialisation.

Reimplemented from ilXmlExporter.

Definition at line 20 of file class.ilSurveyExporter.php.

21 {
22 }

Field Documentation

◆ $ds

ilSurveyExporter::$ds
private

Definition at line 15 of file class.ilSurveyExporter.php.


The documentation for this class was generated from the following file: