Skip to content

Commit

Permalink
Merge pull request #2545 from oat-sa/backport/AUT-3992-backport-to-20…
Browse files Browse the repository at this point in the history
…24-12

Backport/aut 3992 backport to 2024 12
  • Loading branch information
Karol-Stelmaczonek authored Dec 10, 2024
2 parents 3d2fb16 + 85bc7e0 commit 665f486
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion models/classes/class.QtiTestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1545,8 +1545,19 @@ private function getMappedProperties(
if ($importMetadata === true) {
$metaMetadataValues = $this->getMetaMetadataExtractor()->extract($domManifest);
$reportCtx->metaMetadata = $metaMetadataValues;
return $this->getMetaMetadataImporter()

$mappedMetadataValues = $this->getMetaMetadataImporter()
->mapMetaMetadataToProperties($metaMetadataValues, $targetItemClass, $testClass);

if (empty($mappedMetadataValues)) {
$metadataValues = $this->getMetadataImporter()->extract($domManifest);
$mappedMetadataValues = $this->getMetaMetadataImporter()->mapMetadataToProperties(
$metadataValues,
$targetItemClass,
$testClass
);
}
return $mappedMetadataValues;
}

return [];
Expand Down

0 comments on commit 665f486

Please sign in to comment.