Skip to content

Commit

Permalink
Merge branch 'release-48.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jul 9, 2024
2 parents 547c43d + f651d88 commit 9ba8ee6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
15 changes: 4 additions & 11 deletions models/classes/export/AbstractQtiTestExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);
}
}
17 changes: 1 addition & 16 deletions models/classes/import/class.TestImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9ba8ee6

Please sign in to comment.