Skip to content

Commit

Permalink
Merge branch 'release-48.18.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 10, 2025
2 parents 82f46b7 + 796bc1c commit 21a603c
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions models/classes/runner/QtiRunnerServiceContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
use oat\taoQtiTest\models\ExtendedStateService;
use oat\taoQtiTest\models\SectionPauseService;
use oat\taoQtiTest\models\event\SelectAdaptiveNextItemEvent;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use qtism\data\AssessmentTest;
use qtism\data\AssessmentItemRef;
use qtism\data\ExtendedAssessmentItemRef;
Expand Down Expand Up @@ -1167,29 +1165,18 @@ private function getTestTakerFromSessionOrRds()
}

/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ServiceNotFoundException
*/
private function getSectionPauseService(): SectionPauseService
{
return $this->getPsrContainer()->get(SectionPauseService::SERVICE_ID);
return $this->getServiceManager()->get(SectionPauseService::SERVICE_ID);
}

/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ServiceNotFoundException
*/
private function getCatService(): CatService
{
return $this->getPsrContainer()->get(CatService::SERVICE_ID);
}

private function getPsrContainer(): ContainerInterface
{
if (!$this->container instanceof ContainerInterface) {
$this->container = $this->getServiceManager()->getContainer();
}

return $this->container;
return $this->getServiceManager()->get(CatService::SERVICE_ID);
}
}

0 comments on commit 21a603c

Please sign in to comment.