Skip to content

Commit

Permalink
Merge branch 'release-48.13.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 4, 2024
2 parents caf87a2 + 3ec7eae commit e8dcffb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/classes/class.QtiTestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ protected function importTest(
// 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)) {
if (
$this->getServiceManager()->getContainer()->has(MappedMetadataInjector::class)
&& $importMetadata
) {
$this->getServiceManager()->getContainer()->get(MappedMetadataInjector::class)->inject(
$mappedProperties['testProperties'] ?? [],
$metadataValues[$qtiTestResourceIdentifier] ?? [],
Expand Down

0 comments on commit e8dcffb

Please sign in to comment.