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(
'class.ilDataCollectionCache.php');
6 require_once(
'./Modules/MediaPool/classes/class.ilObjMediaPool.php');
29 $this->ds->setDSPrefix(
'ds');
42 'namespace' =>
'http://www.ilias.de/Modules/DataCollection/dcl/4_5',
43 'xsd_file" => "ilias_dcl_4_5.xsd',
44 'uses_dataset' =>
true,
54 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
56 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id,
'',
true,
true);
72 foreach ($a_ids as $id) {
74 foreach ($m_ids as $m) {
79 $dependencies = array(
81 'component' =>
'Modules/File',
86 'component' =>
'Services/MediaObjects',
93 $page_object_ids = array();
94 foreach ($a_ids as $dcl_obj_id) {
95 $sql =
"SELECT stloc2.value AS ext_id, f.`datatype_id` FROM il_dcl_stloc2_value AS stloc2 " 96 .
"INNER JOIN il_dcl_record_field AS rf ON (rf.`id` = stloc2.`record_field_id`) " 97 .
"INNER JOIN il_dcl_field AS f ON (rf.`field_id` = f.`id`) " .
"INNER JOIN il_dcl_table AS t ON (t.`id` = f.`table_id`) " 98 .
"WHERE t.`obj_id` = " . $this->db->quote($dcl_obj_id,
'integer') .
" " .
"AND f.datatype_id IN (" 99 . implode(
',', array_keys($dependencies)) .
") AND stloc2.`value` IS NOT NULL";
100 $set = $this->db->query($sql);
101 while ($rec = $this->db->fetchObject($set)) {
102 $dependencies[$rec->datatype_id][
'ids'][] = (int)$rec->ext_id;
120 $page_object_ids = array();
121 foreach ($a_ids as $dcl_obj_id) {
123 $sql =
"SELECT il_dcl_view.id AS page_obj_id FROM il_dcl_view " .
"INNER JOIN il_dcl_table ON (il_dcl_table.id = il_dcl_view.table_id) " 124 .
"WHERE il_dcl_table.obj_id = " . $this->db->quote($dcl_obj_id,
'integer') .
" " 125 .
"AND il_dcl_view.type=0 AND il_dcl_view.formtype=0";
126 $set = $this->db->query($sql);
127 while ($rec = $this->db->fetchObject($set)) {
128 $page_object_ids[] =
"dclf:" . $rec->page_obj_id;
131 if (count($page_object_ids)) {
134 'component' =>
'Services/COPage',
136 '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.
Class ilDataCollectionExporter.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
getValidSchemaVersions($a_entity)