models/classes/cat/CatService.php
public function persistCatSession($catSession, AssessmentTestSession $testSession, \tao_models_classes_service_StorageDirectory $compilationDirectory, RouteItem $routeItem = null)
    {
        if ($catSection = $this->getCatSection($testSession, $compilationDirectory, $routeItem)) {
            $catSectionId = $catSection->getSectionId();
            $this->catSession[$catSectionId] = $catSession;

            $sessionId = $testSession->getSessionId();
            $this->getServiceManager()->get(ExtendedStateService::SERVICE_ID)->setCatValue(
                $sessionId,
                $catSectionId,
                'cat-session',
                json_encode($this->catSession[$catSectionId])
            );
        }
    }
public function persistCatSession($catSession, AssessmentTestSession $testSession, \tao_models_classes_service_StorageDirectory $compilationDirectory, RouteItem $routeItem = null)
    {
        if ($catSection = $this->getCatSection($testSession, $compilationDirectory, $routeItem)) {
            $catSectionId = $catSection->getSectionId();
            $this->catSession[$catSectionId] = $catSession;

            $sessionId = $testSession->getSessionId();
            $this->getServiceManager()->get(ExtendedStateService::SERVICE_ID)->setCatValue(
                $sessionId,
                $catSectionId,
                'cat-session',
                json_encode($this->catSession[$catSectionId])
            );
        }
    }
Persist the CAT Session Data.

Persist the current CAT Session Data in storage.

@param string $catSession JSON encoded CAT Session data.
@param AssessmentTestSession $testSession
@param \tao_models_classes_service_StorageDirectory $compilationDirectory
@param RouteItem|null $routeItem