ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilTestQuestionPoolExporter Class Reference

Used for container export with tests. More...

+ Inheritance diagram for ilTestQuestionPoolExporter:
+ Collaboration diagram for ilTestQuestionPoolExporter:

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...
 
 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...
 

Static Public Member Functions

static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 Overwritten for qpl. More...
 
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 

Private Attributes

 $ds
 

Additional Inherited Members

- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 

Detailed Description

Used for container export with tests.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

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

Member Function Documentation

◆ getValidSchemaVersions()

ilTestQuestionPoolExporter::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 68 of file class.ilTestQuestionPoolExporter.php.

69 {
70 return array (
71 "4.1.0" => array(
72 "namespace" => "http://www.ilias.de/Modules/TestQuestionPool/htlm/4_1",
73 "xsd_file" => "ilias_qpl_4_1.xsd",
74 "uses_dataset" => false,
75 "min" => "4.1.0",
76 "max" => "")
77 );
78 }

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringschema version
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

Definition at line 49 of file class.ilTestQuestionPoolExporter.php.

50 {
51 include_once './Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
52 $qpl = new ilObjQuestionPool($a_id,false);
53
54 include_once("./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
55 $qpl_exp = new ilQuestionpoolExport($qpl, 'xml');
56 $zip = $qpl_exp->buildExportFile();
57
58 $GLOBALS['ilLog']->write(__METHOD__.': Created zip file '.$zip);
59 }
Export class for questionpools.
$GLOBALS['ct_recipient']

References $GLOBALS.

◆ init()

ilTestQuestionPoolExporter::init ( )

Initialisation.

Reimplemented from ilXmlExporter.

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

21 {
22 }

◆ lookupExportDirectory()

static ilTestQuestionPoolExporter::lookupExportDirectory (   $a_obj_type,
  $a_obj_id,
  $a_export_type = 'xml',
  $a_entity = "" 
)
static

Overwritten for qpl.

Parameters
string$a_obj_type
int$a_obj_id
string$a_export_type

Reimplemented from ilXmlExporter.

Definition at line 30 of file class.ilTestQuestionPoolExporter.php.

31 {
32 if($a_export_type == 'xml')
33 {
34 return ilUtil::getDataDir() . "/qpl_data" . "/qpl_" . $a_obj_id . "/export_zip";
35
36 }
37 return ilUtil::getDataDir()."/qpl_data"."/qpl_".$a_obj_id."/export_".$a_export_type;
38 }
static getDataDir()
get data directory (outside webspace)

References ilUtil\getDataDir().

+ Here is the call graph for this function:

Field Documentation

◆ $ds

ilTestQuestionPoolExporter::$ds
private

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


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