models/classes/runner/map/QtiRunnerMap.php
protected function getOffsetPosition(RunnerServiceContext $context, RouteItem $currentRouteItem)
     {
        $session = $context->getTestSession();
        $route = $session->getRoute();
        $routeCount = $route->count();

        $finalPosition = 0;

        for ($i = 0; $i < $routeCount; $i++) {
            $routeItem = $route->getRouteItemAt($i);

            if ($routeItem !== $currentRouteItem) {
                if (!$context->isAdaptive($routeItem->getAssessmentItemRef())) {
                    $finalPosition++;
                } else {
                    $finalPosition += count($context->getShadowTest($routeItem));
                }
            } else {
                break;
            }
        }

        return $finalPosition;
    }
protected function getOffsetPosition(RunnerServiceContext $context, RouteItem $currentRouteItem)
     {
        $session = $context->getTestSession();
        $route = $session->getRoute();
        $routeCount = $route->count();

        $finalPosition = 0;

        for ($i = 0; $i < $routeCount; $i++) {
            $routeItem = $route->getRouteItemAt($i);

            if ($routeItem !== $currentRouteItem) {
                if (!$context->isAdaptive($routeItem->getAssessmentItemRef())) {
                    $finalPosition++;
                } else {
                    $finalPosition += count($context->getShadowTest($routeItem));
                }
            } else {
                break;
            }
        }

        return $finalPosition;
    }
Get the relative position of the given RouteItem within the test.
The position takes into account adaptive sections (and count items instead of placeholders).

@param RunnerServiceContext $context
@param RouteItem $routeItem
@return int the offset position