diff --git a/components/ILIAS/DataCollection/LuceneObjectDefinition.xml b/components/ILIAS/DataCollection/LuceneObjectDefinition.xml
index d99eea4283eb..aa1c7678191c 100755
--- a/components/ILIAS/DataCollection/LuceneObjectDefinition.xml
+++ b/components/ILIAS/DataCollection/LuceneObjectDefinition.xml
@@ -4,6 +4,7 @@
+
SELECT 1 as offline FROM il_dcl_data
diff --git a/components/ILIAS/DataCollection/classes/class.ilDataCollectionDataSet.php b/components/ILIAS/DataCollection/classes/class.ilDataCollectionDataSet.php
index e502851dff5c..b705323c7f65 100755
--- a/components/ILIAS/DataCollection/classes/class.ilDataCollectionDataSet.php
+++ b/components/ILIAS/DataCollection/classes/class.ilDataCollectionDataSet.php
@@ -141,6 +141,12 @@ public function importRecord(
$new_obj->update(); //clone mode, so no table will be created
$this->import_dc_object = $new_obj;
$a_mapping->addMapping('components/ILIAS/DataCollection', 'dcl', $a_rec['id'], (string) $new_obj->getId());
+ $a_mapping->addMapping(
+ 'components/ILIAS/MetaData',
+ 'md',
+ $a_rec['id'] . ':0:dcl',
+ $new_obj->getId() . ':0:dcl'
+ );
break;
case 'il_dcl_table':
$table = new ilDclTable();
diff --git a/components/ILIAS/DataCollection/classes/class.ilDataCollectionExporter.php b/components/ILIAS/DataCollection/classes/class.ilDataCollectionExporter.php
index c56491aea867..284441a46ddf 100755
--- a/components/ILIAS/DataCollection/classes/class.ilDataCollectionExporter.php
+++ b/components/ILIAS/DataCollection/classes/class.ilDataCollectionExporter.php
@@ -127,6 +127,7 @@ public function getXmlExportHeadDependencies(string $a_entity, string $a_target_
*/
public function getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids): array
{
+ $deps = [];
$page_object_ids = [];
foreach ($a_ids as $dcl_obj_id) {
// If a DCL table has a detail view, we need to export the associated page objects!
@@ -141,15 +142,25 @@ public function getXmlExportTailDependencies(string $a_entity, string $a_target_
}
}
if (count($page_object_ids)) {
- return [
- [
- 'component' => 'components/ILIAS/COPage',
- 'entity' => 'pg',
- 'ids' => $page_object_ids,
- ],
+ $deps[] = [
+ 'component' => 'components/ILIAS/COPage',
+ 'entity' => 'pg',
+ 'ids' => $page_object_ids
];
}
- return [];
+ $md_ids = [];
+ foreach ($a_ids as $id) {
+ $md_ids[] = $id . ':0:dcl';
+ }
+ if ($md_ids !== []) {
+ $deps[] = [
+ 'component' => 'components/ILIAS/MetaData',
+ 'entity' => 'md',
+ 'ids' => $md_ids,
+ ];
+ }
+
+ return $deps;
}
}
diff --git a/components/ILIAS/DataCollection/classes/class.ilObjDataCollection.php b/components/ILIAS/DataCollection/classes/class.ilObjDataCollection.php
index b88baa72c62c..b0c26d326aeb 100755
--- a/components/ILIAS/DataCollection/classes/class.ilObjDataCollection.php
+++ b/components/ILIAS/DataCollection/classes/class.ilObjDataCollection.php
@@ -65,6 +65,8 @@ protected function doCreate(bool $clone_mode = false): void
$main_table->doCreate();
}
+ $this->createMetaData();
+
$this->db->insert(
"il_dcl_data",
[
@@ -84,12 +86,16 @@ protected function doDelete(): void
$table->doDelete(false, true);
}
+ $this->deleteMetaData();
+
$query = "DELETE FROM il_dcl_data WHERE id = " . $this->db->quote($this->getId(), "integer");
$this->db->manipulate($query);
}
protected function doUpdate(): void
{
+ $this->updateMetaData();
+
$this->db->update(
"il_dcl_data",
[
@@ -260,6 +266,8 @@ protected function doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_c
}
$new_obj->cloneStructure($this->getRefId());
+
+ $this->cloneMetaData($new_obj);
}
/**
diff --git a/components/ILIAS/DataCollection/classes/class.ilObjDataCollectionGUI.php b/components/ILIAS/DataCollection/classes/class.ilObjDataCollectionGUI.php
index 0c2ffac18f06..0767939b55c1 100755
--- a/components/ILIAS/DataCollection/classes/class.ilObjDataCollectionGUI.php
+++ b/components/ILIAS/DataCollection/classes/class.ilObjDataCollectionGUI.php
@@ -28,7 +28,9 @@
* @ilCtrl_Calls ilObjDataCollectionGUI: ilRatingGUI
* @ilCtrl_Calls ilObjDataCollectionGUI: ilPropertyFormGUI
* @ilCtrl_Calls ilObjDataCollectionGUI: ilDclPropertyFormGUI
+ * @ilCtrl_Calls ilObjDataCollectionGUI: ilObjectMetaDataGUI
* @ilCtrl_Calls ilObjDataCollectionGUI: ilObjectContentStyleSettingsGUI
+
*/
class ilObjDataCollectionGUI extends ilObject2GUI
{
@@ -39,6 +41,7 @@ class ilObjDataCollectionGUI extends ilObject2GUI
public const TAB_EDIT_DCL = 'settings';
public const TAB_LIST_TABLES = 'dcl_tables';
+ public const TAB_META_DATA = 'meta_data';
public const TAB_EXPORT = 'export';
public const TAB_LIST_PERMISSIONS = 'perm_settings';
public const TAB_INFO = 'info_short';
@@ -240,6 +243,14 @@ public function executeCommand(): void
$this->ctrl->forwardCommand($form);
break;
+ case strtolower(ilObjectMetaDataGUI::class):
+ $this->checkPermission('write');
+ $this->prepareOutput();
+ $this->tabs->activateTab(self::TAB_META_DATA);
+ $gui = new ilObjectMetaDataGUI($this->object);
+ $this->ctrl->forwardCommand($gui);
+ break;
+
case strtolower(ilObjectContentStyleSettingsGUI::class):
$this->prepareOutput();
$this->setEditTabs();
@@ -420,6 +431,11 @@ protected function setTabs(): void
$this->addTab(self::TAB_EDIT_DCL, $this->ctrl->getLinkTarget($this, "editObject"));
// list tables
$this->addTab(self::TAB_LIST_TABLES, $this->ctrl->getLinkTargetByClass(ilDclTableListGUI::class, "listTables"));
+ // metadata
+ $mdgui = new ilObjectMetaDataGUI($this->object);
+ if ($mdtab = $mdgui->getTab()) {
+ $this->tabs_gui->addTab(self::TAB_META_DATA, $this->lng->txt('meta_data'), $mdtab);
+ }
// export
$this->addTab(self::TAB_EXPORT, $this->ctrl->getLinkTargetByClass(ilDclExportGUI::class, ""));
}
diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectMetaDataGUI.php b/components/ILIAS/ILIASObject/classes/class.ilObjectMetaDataGUI.php
index 7bb57dae7ae3..411f8543ef05 100755
--- a/components/ILIAS/ILIASObject/classes/class.ilObjectMetaDataGUI.php
+++ b/components/ILIAS/ILIASObject/classes/class.ilObjectMetaDataGUI.php
@@ -298,6 +298,7 @@ protected function isLOMAvailable(): bool
"crs",
'grp',
"file",
+ 'dcl',
"glo",
"svy",
"spl",