diff --git a/models/classes/export/AbstractQtiTestExporter.php b/models/classes/export/AbstractQtiTestExporter.php index fbac75b30..e4fb74314 100644 --- a/models/classes/export/AbstractQtiTestExporter.php +++ b/models/classes/export/AbstractQtiTestExporter.php @@ -177,12 +177,10 @@ public function export(array $options = []): Report // 3. Export test metadata to manifest $this->getMetadataExporter()->export($this->getItem(), $this->getManifest()); - if ($this->getFeatureFlagChecker()->isEnabled(MetadataLomService::FEATURE_FLAG)) { - $this->genericLomOntologyExtractor()->extract( - array_merge([$this->getItem()], $this->getItems()), - $this->getManifest() - ); - } + $this->genericLomOntologyExtractor()->extract( + array_merge([$this->getItem()], $this->getItems()), + $this->getManifest() + ); // 4. Persist manifest in archive. $this->getZip()->addFromString('imsmanifest.xml', $this->getManifest()->saveXML()); @@ -365,9 +363,4 @@ private function genericLomOntologyExtractor(): GenericLomOntologyExtractor { return $this->getServiceManager()->getContainer()->get(GenericLomOntologyExtractor::class); } - - private function getFeatureFlagChecker(): FeatureFlagChecker - { - return $this->getServiceManager()->getContainer()->get(FeatureFlagChecker::class); - } } diff --git a/models/classes/import/class.TestImport.php b/models/classes/import/class.TestImport.php index a24ca295d..f0152ae9a 100755 --- a/models/classes/import/class.TestImport.php +++ b/models/classes/import/class.TestImport.php @@ -63,7 +63,7 @@ public function getLabel() */ public function getForm() { - $form = new taoQtiTest_models_classes_import_TestImportForm([], $this->getFormOptions()); + $form = new taoQtiTest_models_classes_import_TestImportForm(); return $form->getForm(); } @@ -119,21 +119,6 @@ public function getTaskParameters(tao_helpers_form_Form $importForm) ) ]; } - - private function getFeatureFlagChecker(): FeatureFlagChecker - { - return $this->serviceLocator->getContainer()->get(FeatureFlagChecker::class); - } - - private function getFormOptions(): array - { - $options = []; - if (!$this->getFeatureFlagChecker()->isEnabled(MetadataLomService::FEATURE_FLAG)) { - $options[TestImportForm::DISABLED_FIELDS][] = TestImportForm::METADATA_FIELD; - $options[TestImportForm::DISABLED_FIELDS][] = TestImportForm::ITEM_CLASS_DESTINATION_FIELD; - } - return $options; - } private function getUploadService() { return $this->serviceLocator->get(UploadService::SERVICE_ID);