ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilUserExporter 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 ilUserExporter:
+ Collaboration diagram for ilUserExporter:

Public Member Functions

 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
- 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)
 

Private Attributes

ilUserDataSet $data_set
 
ilUserExportConfig $export_config
 

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
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 user data Note: this is currently NOT used for the classic user export/import It is mainly used for export personsl user data from the personal desktop (settings, profile, calendar entries)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file class.ilUserExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilUserExporter::getValidSchemaVersions ( string  $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. Example: return array ( "4.1.0" => array( "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1", "xsd_file" => "ilias_md_4_1.xsd", "min" => "4.1.0", "max" => "") );

Reimplemented from ilXmlExporter.

Definition at line 83 of file class.ilUserExporter.php.

83 : array // Missing array type.
84 {
85 return [
86 "4.3.0" => [
87 "namespace" => "https://www.ilias.de/Services/User/usr/4_3",
88 "xsd_file" => "ilias_usr_4_3.xsd",
89 "uses_dataset" => true,
90 "min" => "4.3.0",
91 "max" => "4.4.99"],
92 "5.1.0" => [
93 "namespace" => "https://www.ilias.de/Services/User/usr/5_1",
94 "xsd_file" => "ilias_usr_5_1.xsd",
95 "uses_dataset" => true,
96 "min" => "5.1.0",
97 "max" => "5.1.99"],
98 "5.2.0" => [
99 "namespace" => "https://www.ilias.de/Services/User/usr/5_2",
100 "xsd_file" => "ilias_usr_5_2.xsd",
101 "uses_dataset" => true,
102 "min" => "5.2.0",
103 "max" => "5.2.99"],
104 "5.3.0" => [
105 "namespace" => "https://www.ilias.de/Services/User/usr/5_3",
106 "xsd_file" => "ilias_usr_5_3.xsd",
107 "uses_dataset" => true,
108 "min" => "5.3.0",
109 "max" => ""]
110 ];
111 }

◆ getXmlExportTailDependencies()

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

Get tail dependencies.

Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

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

40 : array // Missing array type.
41 {
42 if ($a_entity === 'usr' && $this->export_config->getExportType() === 'personal_data') {
43 $cal_ids = [];
44 foreach ($a_ids as $user_id) {
46 $cal_ids[] = $ct["cat_id"];
47 }
48 }
49
50 return [
51 [
52 "component" => "components/ILIAS/User",
53 "entity" => "usr_profile",
54 "ids" => $a_ids],
55 [
56 "component" => "components/ILIAS/User",
57 "entity" => "usr_multi",
58 "ids" => $a_ids],
59 [
60 "component" => "components/ILIAS/User",
61 "entity" => "usr_setting",
62 "ids" => $a_ids],
63 [
64 "component" => "components/ILIAS/Notes",
65 "entity" => "user_notes",
66 "ids" => $a_ids],
67 [
68 "component" => "components/ILIAS/Calendar",
69 "entity" => "calendar",
70 "ids" => $cal_ids]
71 ];
72 }
73
74 return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
75 }
static lookupPrivateCategories(int $a_user_id)
Lookup private categories of user.

References $user_id, and ilCalendarCategories\lookupPrivateCategories().

+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Reimplemented from ilXmlExporter.

Definition at line 77 of file class.ilUserExporter.php.

77 : string
78 {
79 $this->data_set->initByExporter($this);
80 return $this->data_set->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
81 }

Field Documentation

◆ $data_set

ilUserDataSet ilUserExporter::$data_set
private

Definition at line 28 of file class.ilUserExporter.php.

◆ $export_config

ilUserExportConfig ilUserExporter::$export_config
private

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


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