*/ namespace oat\taoQtiTest\models\runner\navigation; use oat\taoQtiTest\models\runner\RunnerServiceContext; /** * Class QtiRunnerJumpItem * @package oat\taoQtiTest\models\runner\navigation */ class QtiRunnerNavigationJumpItem implements RunnerNavigation { /** * Do the move * @param RunnerServiceContext $context * @param mixed $ref * @return boolean * @throws \common_Exception */ public function move(RunnerServiceContext $context, $ref) { QtiRunnerNavigation::checkTimedSectionExit( $context, $context->getItemPositionInRoute($ref) ); $catItemId = ''; $pos = $context->getItemPositionInRoute(intval($ref), $catItemId); if ($context->isAdaptive()) { // Consider potential changes in the selected items. $context->selectAdaptiveNextItem(); } $context->getTestSession()->jumpTo($pos); if ($catItemId !== '') { $context->persistCurrentCatItemId($catItemId); } return true; } }