getState() && DeliveryExecutionInterface::STATE_FINISHIED !== $event->getPreviousState() && common_session_SessionManager::getSession() instanceof TaoLtiSession ) { /** @var QueueDispatcherInterface $taskQueue */ $taskQueue = $this->getServiceLocator()->get(QueueDispatcherInterface::SERVICE_ID); $launchData = LtiService::singleton()->getLtiSession()->getLaunchData(); if ($launchData->hasVariable('lis_outcome_service_url')) { $params['deliveryResultIdentifier'] = $event->getDeliveryExecution()->getIdentifier(); $params['consumerKey'] = $launchData->getOauthKey(); $params['serviceUrl'] = $launchData->getVariable('lis_outcome_service_url'); $taskQueue->createTask(new SendLtiOutcomeTask(), $params, 'Submit LTI results'); } } } }