*/ class AttemptService extends \oat\taoDelivery\model\AttemptService { /** * @inheritdoc */ public function getAttempts($deliveryId, User $user) { $currentSession = \common_session_SessionManager::getSession(); if ($currentSession instanceof TaoLtiSession) { $executionService = $this->getServiceManager()->get(LtiDeliveryExecutionService::SERVICE_ID); $delivery = new \core_kernel_classes_Resource($deliveryId); $executions = $executionService->getLinkedDeliveryExecutions($delivery, $currentSession->getLtiLinkResource(), $user->getIdentifier()); return $this->filterStates($executions); } else { return parent::getAttempts($deliveryId, $user); } } }