models/classes/runner/QtiRunnerService.php
public function storeVariables(
        QtiRunnerServiceContext $context,
        $itemUri,
        $metaVariables,
        $itemId = null
    ) {
        $sessionId = $context->getTestSession()->getSessionId();

        /** @var DeliveryServerService $deliveryServerService */
        $deliveryServerService = $this->getServiceManager()->get(DeliveryServerService::SERVICE_ID);
        $resultStore = $deliveryServerService->getResultStoreWrapper($sessionId);

        $testUri = $context->getTestDefinitionUri();

        if (!is_null($itemUri)) {
            $resultStore->storeItemVariables($testUri, $itemUri, $metaVariables, $this->getTransmissionId($context, $itemId));
        } else {
            $resultStore->storeTestVariables($testUri, $metaVariables, $sessionId);
        }

        return true;
    }
public function storeVariables(
        QtiRunnerServiceContext $context,
        $itemUri,
        $metaVariables,
        $itemId = null
    ) {
        $sessionId = $context->getTestSession()->getSessionId();

        /** @var DeliveryServerService $deliveryServerService */
        $deliveryServerService = $this->getServiceManager()->get(DeliveryServerService::SERVICE_ID);
        $resultStore = $deliveryServerService->getResultStoreWrapper($sessionId);

        $testUri = $context->getTestDefinitionUri();

        if (!is_null($itemUri)) {
            $resultStore->storeItemVariables($testUri, $itemUri, $metaVariables, $this->getTransmissionId($context, $itemId));
        } else {
            $resultStore->storeTestVariables($testUri, $metaVariables, $sessionId);
        }

        return true;
    }
public function storeVariables ( QtiRunnerServiceContext $ context , $ itemUri , $ metaVariables , $ itemId = null ) { $ sessionId = $ context -> getTestSession ( ) -> getSessionId ( ) ; /** @var DeliveryServerService $deliveryServerService */ $ deliveryServerService = $ this -> getServiceManager ( ) -> get ( DeliveryServerService :: SERVICE_ID ) ; $ resultStore = $ deliveryServerService -> getResultStoreWrapper ( $ sessionId ) ; $ testUri = $ context -> getTestDefinitionUri ( ) ; if ( ! is_null ( $ itemUri ) ) { $ resultStore -> storeItemVariables ( $ testUri , $ itemUri , $ metaVariables , $ this -> getTransmissionId ( $ context , $ itemId ) ) ; } else { $ resultStore -> storeTestVariables ( $ testUri , $ metaVariables , $ sessionId ) ; } return true ; }
Store a set of result variables to the result server

@param QtiRunnerServiceContext $context
@param string $itemUri This is the item uri
@param \taoResultServer_models_classes_Variable[] $metaVariables
@param null $itemId The assessment item ref id (optional)
@return bool
@throws \Exception
@throws \common_exception_NotImplemented If the given $itemId is not the current assessment item ref
Store a set of result variables to the result server