ILIAS  release_8 Revision v8.23
exQuestionPoolExporter Class Reference
+ Inheritance diagram for exQuestionPoolExporter:
+ Collaboration diagram for exQuestionPoolExporter:

Public Member Functions

 getValidSchemaVersions (string $a_entity)
 
 init ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 
- Protected Attributes inherited from ilXmlExporter
string $dir_relative = ""
 
string $dir_absolute = ""
 
ilExport $exp
 

Detailed Description

Definition at line 5 of file class.exQuestionPoolExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

exQuestionPoolExporter::getValidSchemaVersions ( string  $a_entity)

Definition at line 7 of file class.exQuestionPoolExporter.php.

7  : array
8  {
9  /* export schema versions code */
10  return [];
11  }

◆ getXmlExportTailDependencies()

exQuestionPoolExporter::getXmlExportTailDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)
Parameters
string$a_entity
string$a_target_release
array$a_ids
Returns
array

when components use the assessment question service, they can declare questions as a tail depency for their own export. the export service will address the assessment question service to get all required question exported.

simply determine the questionIds for the given entityIds and return them in the shown depeny array structure.

Definition at line 41 of file class.exQuestionPoolExporter.php.

41  : array
42  {
52  if ($a_entity == 'qpl') {
53  $deps = array();
54 
55  $questionIds = array(); // initialise with question ids that need to be exported
56 
57  if (count($questionIds)) {
58  $deps[] = array(
59  'component' => 'Services/AssessmentQuestion',
60  'entity' => 'qst',
61  'ids' => $questionIds
62  );
63  }
64 
65  return $deps;
66  }
67 
68  return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
69  }

◆ getXmlRepresentation()

exQuestionPoolExporter::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
string  $a_id 
)
Parameters
string$a_entity
string$a_schema_version
string$a_id

although e.g. the question pool does declare assessment questions as a tail depency, it still is able to also provide the former qtixml, that contains all questions as a single qti file.

Definition at line 23 of file class.exQuestionPoolExporter.php.

23  : string
24  {
25  /* question pool export code */
26 
32  return '';
33  }

◆ init()

exQuestionPoolExporter::init ( )

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

13  : void
14  {
15  /* question pool init code */
16  }

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