public function questionnaireCheck(GetResponseEvent $event)
    {
        if (HttpKernel::MASTER_REQUEST != $event->getRequestType() ||
            ($event->getRequest()->request && 'html' !== $event->getRequest()->getRequestFormat()) ||
            in_array($this->request->get('_route'), array('qcm_public_question_end', 'qcm_public_homepage'))
        ) {
            return;
        }

        /** @var \DateTime $date */
        $now = new \DateTime();

        if ($this->questionInteract->isStarted()) {
            /** @var SessionConfigurationInterface $configuration */
            $configuration = $this->questionInteract->getUserConfiguration();

            if (!is_null($configuration->getTimeout())) {
                $date = clone $configuration->getStartAt();
                $date->add(new \DateInterval('PT' . $configuration->getTimeout() . 'S'));

                if ($date < $now) {
                    $this->questionInteract->endQuestionnaire($now);
                    $response = new RedirectResponse($this->router->generate(self::END_REDIRECT));
                    $event->setResponse($response);

                    return $response;
                }
            } else {
                $date = clone $this->questionInteract->getQuestionTimeout();
                $date->add(new \DateInterval('PT' . $configuration->getTimePerQuestion() . 'S'));

                if ($date < $now) {
                    if (false == $this->questionInteract->getNextQuestion()) {
                        $this->questionInteract->endQuestionnaire($now);
                        $response = new RedirectResponse($this->router->generate(self::END_REDIRECT));
                        $event->setResponse($response);

                        return $response;
                    }
                }
            }
        } else {
            if (!is_null($this->securityContext->getToken()) &&
                $this->securityContext->isGranted('IS_AUTHENTICATED_FULLY')
            ) {
                $this->questionInteract->getQuestionnaireStarted($this->securityContext->getToken()->getUser());
            }

            if ($this->questionInteract->isStarted()) {
                /** @var SessionConfigurationInterface $configuration */
                $configuration = $this->questionInteract->getUserConfiguration();
                $url = 'qcm_public_question_reply';

                if ($configuration->getQuestions()->count() - count($configuration->getAnswers()) == 0) {
                    $url = 'qcm_public_question_summary';
                }

                $response = new RedirectResponse($this->router->generate($url));
                $event->setResponse($response);

                return $response;
            }
        }
    }