2 require_once(
"./Services/Export/classes/class.ilExport.php");
3 require_once(
'./Services/Export/classes/class.ilXmlExporter.php');
4 require_once(
'class.ilDataCollectionDataSet.php');
5 require_once(
'./Modules/DataCollection/classes/Helpers/class.ilDclCache.php');
6 require_once(
'./Modules/MediaPool/classes/class.ilObjMediaPool.php');
30 $this->ds->setDSPrefix(
'ds');
43 'namespace' =>
'http://www.ilias.de/Modules/DataCollection/dcl/4_5',
44 'xsd_file" => "ilias_dcl_4_5.xsd',
45 'uses_dataset' =>
true,
55 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
57 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id,
'',
true,
true);
72 $dependencies =
array(
74 'component' =>
'Modules/File',
79 'component' =>
'Services/MediaObjects',
86 foreach ($a_ids as $dcl_obj_id) {
87 $sql =
"SELECT stloc2.value AS ext_id, f." . $this->db->quoteIdentifier(
'datatype_id') .
" FROM il_dcl_stloc2_value AS stloc2 " 88 .
"INNER JOIN il_dcl_record_field AS rf ON (rf." . $this->db->quoteIdentifier(
'id') .
" = stloc2." . $this->db->quoteIdentifier(
'record_field_id') .
") " 89 .
"INNER JOIN il_dcl_field AS f ON (rf." . $this->db->quoteIdentifier(
'field_id') .
" = f." . $this->db->quoteIdentifier(
'id') .
") " .
"INNER JOIN il_dcl_table AS t ON (t." . $this->db->quoteIdentifier(
'id') .
" = f." . $this->db->quoteIdentifier(
'table_id') .
") " 90 .
"WHERE t." . $this->db->quoteIdentifier(
'obj_id') .
" = " . $this->db->quote($dcl_obj_id,
'integer') .
" " .
"AND f.datatype_id IN (" 91 . implode(
',', array_keys($dependencies)) .
") AND stloc2." . $this->db->quoteIdentifier(
'value') .
" IS NOT NULL";
92 $set = $this->db->query($sql);
93 while ($rec = $this->db->fetchObject($set)) {
94 $dependencies[$rec->datatype_id][
'ids'][] = (int)$rec->ext_id;
119 $page_object_ids =
array();
120 foreach ($a_ids as $dcl_obj_id) {
122 $sql =
"SELECT page_id FROM page_object " 123 .
"WHERE parent_type = " . $this->db->quote(
'dclf',
'text') .
" AND parent_id = " . $this->db->quote($dcl_obj_id,
'integer');
124 $set = $this->db->query($sql);
125 while ($rec = $this->db->fetchObject($set)) {
126 $page_object_ids[] =
"dclf:" . $rec->page_id;
129 if (count($page_object_ids)) {
132 'component' =>
'Services/COPage',
134 'ids' => $page_object_ids,
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getXmlExportHeadDependencies($a_entity, $a_target_release, $a_ids)
MOB/File fieldtypes objects are head dependencies They must be exported and imported first...
DataCollection dataset class.
getAbsoluteExportDirectory()
Get absolute export directory.
Create styles array
The data for the language used.
Class ilDataCollectionExporter.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
getValidSchemaVersions($a_entity)