ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

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

References array.

106  {
107  return array (
108  "4.3.0" => array(
109  "namespace" => "http://www.ilias.de/Services/User/usr/4_3",
110  "xsd_file" => "ilias_usr_4_3.xsd",
111  "uses_dataset" => true,
112  "min" => "4.3.0",
113  "max" => "4.4.99"),
114  "5.1.0" => array(
115  "namespace" => "http://www.ilias.de/Services/User/usr/5_1",
116  "xsd_file" => "ilias_usr_5_1.xsd",
117  "uses_dataset" => true,
118  "min" => "5.1.0",
119  "max" => "5.1.99"),
120  "5.2.0" => array(
121  "namespace" => "http://www.ilias.de/Services/User/usr/5_2",
122  "xsd_file" => "ilias_usr_5_2.xsd",
123  "uses_dataset" => true,
124  "min" => "5.2.0",
125  "max" => "")
126  );
127  }
Create styles array
The data for the language used.

◆ 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"

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

References array, and ilCalendarCategories\lookupPrivateCategories().

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

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

93  {
94  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
95  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
96  }

◆ init()

ilUserExporter::init ( )

Initialisation.

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: