ILIAS  release_8 Revision v8.23
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

 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)
 

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="")
 
- 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 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 80 of file class.ilUserExporter.php.

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

◆ getXmlExportTailDependencies()

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

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

References ilCalendarCategories\lookupPrivateCategories().

37  : array // Missing array type.
38  {
39  if ($a_entity == "personal_data") {
40  $cal_ids = array();
41  foreach ($a_ids as $user_id) {
42  foreach (ilCalendarCategories::lookupPrivateCategories($user_id) as $ct) {
43  $cal_ids[] = $ct["cat_id"];
44  }
45  }
46 
47  return array(
48  array(
49  "component" => "Services/User",
50  "entity" => "usr_profile",
51  "ids" => $a_ids),
52  array(
53  "component" => "Services/User",
54  "entity" => "usr_multi",
55  "ids" => $a_ids),
56  array(
57  "component" => "Services/User",
58  "entity" => "usr_setting",
59  "ids" => $a_ids),
60  array(
61  "component" => "Services/Notes",
62  "entity" => "user_notes",
63  "ids" => $a_ids),
64  array(
65  "component" => "Services/Calendar",
66  "entity" => "calendar",
67  "ids" => $cal_ids)
68  );
69  }
70 
71  return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
72  }
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 74 of file class.ilUserExporter.php.

74  : string
75  {
76  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
77  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
78  }

◆ init()

ilUserExporter::init ( )

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

30  : void
31  {
32  $this->ds = new ilUserDataSet();
33  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
34  $this->ds->setDSPrefix("ds");
35  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $ds

ilUserDataSet ilUserExporter::$ds
private

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


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