ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSessionExporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilSessionExporter:
+ Collaboration diagram for ilSessionExporter:

Public Member Functions

 init ()
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 
- 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)
 

Protected Member Functions

 getActiveAdvMDRecords (int $a_id)
 

Private Attributes

ilSessionDataSet $ds
 

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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Exporter class for sessions

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id

Definition at line 29 of file class.ilSessionExporter.php.

Member Function Documentation

◆ getActiveAdvMDRecords()

ilSessionExporter::getActiveAdvMDRecords ( int  $a_id)
protected

Definition at line 89 of file class.ilSessionExporter.php.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType().

Referenced by getXmlExportTailDependencies().

89  : array
90  {
91  $active = [];
92 
93  foreach (ilAdvancedMDRecord::_getActivatedRecordsByObjectType('sess') as $record_obj) {
94  foreach ($record_obj->getAssignedObjectTypes() as $obj_info) {
95  if ($obj_info['obj_type'] == 'sess' && $obj_info['optional'] == 0) {
96  $active[] = $record_obj->getRecordId();
97  }
98  // local activation
99  if (
100  $obj_info['obj_type'] == 'sess' &&
101  $obj_info['optional'] == 1 &&
102  $a_id == $record_obj->getParentObject()
103  ) {
104  $active[] = $record_obj->getRecordId();
105  }
106  }
107  }
108  return $active;
109  }
static _getActivatedRecordsByObjectType(string $a_obj_type, string $a_sub_type="", bool $a_only_optional=false)
Get activated records by object type.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValidSchemaVersions()

ilSessionExporter::getValidSchemaVersions ( string  $a_entity)

Definition at line 116 of file class.ilSessionExporter.php.

116  : array
117  {
118  return array(
119  "4.1.0" => array(
120  "namespace" => "http://www.ilias.de/Modules/Session/sess/4_1",
121  "xsd_file" => "ilias_sess_4_1.xsd",
122  "uses_dataset" => true,
123  "min" => "4.1.0",
124  "max" => "4.4.999"),
125  "5.0.0" => array(
126  "namespace" => "http://www.ilias.de/Modules/Session/sess/5_0",
127  "xsd_file" => "ilias_sess_5_0.xsd",
128  "uses_dataset" => true,
129  "min" => "5.0.0",
130  "max" => "5.0.999"),
131  "5.1.0" => array(
132  "namespace" => "http://www.ilias.de/Modules/Session/sess/5_1",
133  "xsd_file" => "ilias_sess_5_1.xsd",
134  "uses_dataset" => true,
135  "min" => "5.1.0",
136  "max" => "5.3.999"),
137  "5.4.0" => array(
138  "namespace" => "http://www.ilias.de/Modules/Session/sess/5_1",
139  "xsd_file" => "ilias_sess_5_1.xsd",
140  "uses_dataset" => true,
141  "min" => "5.4.0",
142  "max" => "5.4.999"),
143  "7.0" => array(
144  "namespace" => "http://www.ilias.de/Modules/Session/sess/7",
145  "xsd_file" => "ilias_sess_7.xsd",
146  "uses_dataset" => true,
147  "min" => "7.0",
148  "max" => ""),
149  );
150  }

◆ getXmlExportTailDependencies()

ilSessionExporter::getXmlExportTailDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Definition at line 40 of file class.ilSessionExporter.php.

References $id, and getActiveAdvMDRecords().

40  : array
41  {
42  $deps = [];
43 
44  $advmd_ids = [];
45  foreach ($a_ids as $id) {
46  $rec_ids = $this->getActiveAdvMDRecords($id);
47  if (sizeof($rec_ids)) {
48  foreach ($rec_ids as $rec_id) {
49  $advmd_ids[] = $id . ":" . $rec_id;
50  }
51  }
52  }
53  if (sizeof($advmd_ids)) {
54  $deps[] = array(
55  "component" => "Services/AdvancedMetaData",
56  "entity" => "advmd",
57  "ids" => $advmd_ids
58  );
59  }
60 
61  $md_ids = [];
62  foreach ($a_ids as $sess_id) {
63  $md_ids[] = $sess_id . ":0:sess";
64  }
65  if ($md_ids) {
66  $deps[] =
67  array(
68  "component" => "Services/MetaData",
69  "entity" => "md",
70  "ids" => $md_ids
71  );
72  }
73 
74  // service settings
75  $deps[] = array(
76  "component" => "Services/Object",
77  "entity" => "service_settings",
78  "ids" => $a_ids);
79 
80  // tile image
81  $deps[] = array(
82  "component" => "Services/Object",
83  "entity" => "tile",
84  "ids" => $a_ids);
85 
86  return $deps;
87  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getXmlRepresentation()

ilSessionExporter::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
string  $a_id 
)

Definition at line 111 of file class.ilSessionExporter.php.

111  : string
112  {
113  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
114  }

◆ init()

ilSessionExporter::init ( )

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

33  : void
34  {
35  $this->ds = new ilSessionDataSet();
36  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
37  $this->ds->setDSPrefix("ds");
38  }
Session data set class.

Field Documentation

◆ $ds

ilSessionDataSet ilSessionExporter::$ds
private

Definition at line 31 of file class.ilSessionExporter.php.


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