ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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)
 
 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 Attributes

ilUserExportConfig $export_config
 
- Protected Attributes inherited from ilXmlExporter
ilExport $exp
 

Private Attributes

ilUserDataSet $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="")
 

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)

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

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

◆ getXmlExportTailDependencies()

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

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

References $user_id, and ilCalendarCategories\lookupPrivateCategories().

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

◆ getXmlRepresentation()

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

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

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

Field Documentation

◆ $ds

ilUserDataSet ilUserExporter::$ds
private

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

◆ $export_config

ilUserExportConfig ilUserExporter::$export_config
protected

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


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