models/classes/runner/OfflineQtiRunnerService.php
public function getItems(RunnerServiceContext $serviceContext)
    {
        $this->getRunnerService()->assertQtiRunnerServiceContext($serviceContext);

        $runnerService = $this->getRunnerService();
        $testMap = $runnerService->getTestMap($serviceContext);
        $items = [];

        foreach ($this->getItemIdentifiersFromTestMap($testMap) as $itemIdentifier) {
            $itemRef = $runnerService->getItemHref($serviceContext, $itemIdentifier);

            /** @var QtiRunnerServiceContext $serviceContext */
            $items[$itemIdentifier] = [
                'baseUrl' => $runnerService->getItemPublicUrl($serviceContext, $itemRef),
                'itemData' => $this->getItemData($serviceContext, $itemRef),
                'itemState' => $runnerService->getItemState($serviceContext, $itemIdentifier),
                'itemIdentifier' => $itemIdentifier,
                'portableElements' => $runnerService->getItemPortableElements($serviceContext, $itemRef),
            ];
        }

        return $items;
    }
public function getItems(RunnerServiceContext $serviceContext)
    {
        $this->getRunnerService()->assertQtiRunnerServiceContext($serviceContext);

        $runnerService = $this->getRunnerService();
        $testMap = $runnerService->getTestMap($serviceContext);
        $items = [];

        foreach ($this->getItemIdentifiersFromTestMap($testMap) as $itemIdentifier) {
            $itemRef = $runnerService->getItemHref($serviceContext, $itemIdentifier);

            /** @var QtiRunnerServiceContext $serviceContext */
            $items[$itemIdentifier] = [
                'baseUrl' => $runnerService->getItemPublicUrl($serviceContext, $itemRef),
                'itemData' => $this->getItemData($serviceContext, $itemRef),
                'itemState' => $runnerService->getItemState($serviceContext, $itemIdentifier),
                'itemIdentifier' => $itemIdentifier,
                'portableElements' => $runnerService->getItemPortableElements($serviceContext, $itemRef),
            ];
        }

        return $items;
    }
Returns an array of items, containing also confident data, like branching and response processing rules

@param RunnerServiceContext $serviceContext
@return array
@throws \common_Exception
@throws \common_exception_Error
@throws \common_exception_InconsistentData
@throws \common_exception_InvalidArgumentType