ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilUserExporter Class Reference

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, bookmarks, calendar entries) More...

+ Inheritance diagram for ilUserExporter:
+ Collaboration diagram for ilUserExporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 init ()
 
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories. More...
 
 getRelativeExportDirectory ()
 Get relative export directory. More...
 
 getAbsoluteExportDirectory ()
 Get absolute export directory. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version. More...
 

Private Attributes

 $ds
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Detailed Description

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, bookmarks, calendar entries)

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

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

Member Function Documentation

◆ getValidSchemaVersions()

ilUserExporter::getValidSchemaVersions (   $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.

Returns

Reimplemented from ilXmlExporter.

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

103 {
104 return array(
105 "4.3.0" => array(
106 "namespace" => "http://www.ilias.de/Services/User/usr/4_3",
107 "xsd_file" => "ilias_usr_4_3.xsd",
108 "uses_dataset" => true,
109 "min" => "4.3.0",
110 "max" => "4.4.99"),
111 "5.1.0" => array(
112 "namespace" => "http://www.ilias.de/Services/User/usr/5_1",
113 "xsd_file" => "ilias_usr_5_1.xsd",
114 "uses_dataset" => true,
115 "min" => "5.1.0",
116 "max" => "5.1.99"),
117 "5.2.0" => array(
118 "namespace" => "http://www.ilias.de/Services/User/usr/5_2",
119 "xsd_file" => "ilias_usr_5_2.xsd",
120 "uses_dataset" => true,
121 "min" => "5.2.0",
122 "max" => "5.2.99"),
123 "5.3.0" => array(
124 "namespace" => "http://www.ilias.de/Services/User/usr/5_3",
125 "xsd_file" => "ilias_usr_5_3.xsd",
126 "uses_dataset" => true,
127 "min" => "5.3.0",
128 "max" => "")
129 );
130 }

◆ getXmlExportTailDependencies()

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

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

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

40 {
41 if ($a_entity == "personal_data") {
42 include_once("./Services/Calendar/classes/class.ilCalendarCategories.php");
43 $cal_ids = array();
44 foreach ($a_ids as $user_id) {
45 foreach (ilCalendarCategories::lookupPrivateCategories($user_id) as $ct) {
46 $cal_ids[] = $ct["cat_id"];
47 }
48 }
49
50 return array(
51 array(
52 "component" => "Services/User",
53 "entity" => "usr_profile",
54 "ids" => $a_ids),
55 array(
56 "component" => "Services/User",
57 "entity" => "usr_multi",
58 "ids" => $a_ids),
59 array(
60 "component" => "Services/User",
61 "entity" => "usr_setting",
62 "ids" => $a_ids),
63 array(
64 "component" => "Services/Bookmarks",
65 "entity" => "bookmarks",
66 "ids" => $a_ids),
67 array(
68 "component" => "Services/Notes",
69 "entity" => "user_notes",
70 "ids" => $a_ids),
71 array(
72 "component" => "Services/Calendar",
73 "entity" => "calendar",
74 "ids" => $cal_ids)
75 );
76 }
77
78 return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
79 }
static lookupPrivateCategories($a_user_id)
Lookup private categories of user.

References ilCalendarCategories\lookupPrivateCategories().

+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

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

90 {
91 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
92 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
93 }

◆ init()

ilUserExporter::init ( )

Initialisation.

Reimplemented from ilXmlExporter.

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

24 {
25 include_once("./Services/User/classes/class.ilUserDataSet.php");
26 $this->ds = new ilUserDataSet();
27 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
28 $this->ds->setDSPrefix("ds");
29 }
Exercise data set class.

Field Documentation

◆ $ds

ilUserExporter::$ds
private

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


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