code: public function getCurrentPosition()
      {
          $route = $this->getTestSession()->getRoute();
          $routeCount = $route->count();
          $routeItemPosition = $route->getPosition();
          $currentRouteItem = $route->getRouteItemAt($routeItemPosition);
  
          $finalPosition = 0;
  
          for ($i = 0; $i < $routeCount; $i++) {
              $routeItem = $route->getRouteItemAt($i);
  
              if ($routeItem !== $currentRouteItem) {
                  if (!$this->isAdaptive($routeItem->getAssessmentItemRef())) {
                      $finalPosition++;
                  } else {
                      $finalPosition += count($this->getShadowTest($routeItem));
                  }
              } else {
                  if ($this->isAdaptive($routeItem->getAssessmentItemRef())) {
                      $finalPosition += array_search(
                          $this->getCurrentCatItemId($routeItem),
                          $this->getShadowTest($routeItem)
                      );
                  }
  
                  break;
              }
          }
  
          return $finalPosition;
      }
docs: Get Real Current Position.
  
  This method returns the real position of the test taker within
  the item flow, by considering CAT sections.
  
  @return integer A zero-based index.