From f98016b901849d094d32ce6946036c56b9a99035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Mon, 11 Nov 2024 15:51:21 +0100 Subject: [PATCH 1/2] fix: remove legacy metadata import --- models/classes/class.QtiTestService.php | 1 - 1 file changed, 1 deletion(-) diff --git a/models/classes/class.QtiTestService.php b/models/classes/class.QtiTestService.php index c5dc56eec..1a32b3099 100644 --- a/models/classes/class.QtiTestService.php +++ b/models/classes/class.QtiTestService.php @@ -810,7 +810,6 @@ protected function importTest( // 4. Import metadata for the resource (use same mechanics as item resources). // Metadata will be set as property values. - $this->getMetadataImporter()->inject($qtiTestResource->getIdentifier(), $testResource); //todo: fix taoSetup to be aware of containers. This is only workaround. if ( $this->getServiceManager()->getContainer()->has(MappedMetadataInjector::class) From a286c24ddcf7987cac3247e6a666270c645b8761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 12 Nov 2024 10:16:54 +0100 Subject: [PATCH 2/2] fix: avoid property duplicates on export --- models/classes/export/AbstractQtiTestExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/classes/export/AbstractQtiTestExporter.php b/models/classes/export/AbstractQtiTestExporter.php index e4fb74314..d2b53f484 100644 --- a/models/classes/export/AbstractQtiTestExporter.php +++ b/models/classes/export/AbstractQtiTestExporter.php @@ -178,7 +178,7 @@ public function export(array $options = []): Report $this->getMetadataExporter()->export($this->getItem(), $this->getManifest()); $this->genericLomOntologyExtractor()->extract( - array_merge([$this->getItem()], $this->getItems()), + [$this->getItem()], $this->getManifest() );