You are here

public function QuizSession::isTakingQuiz in Quiz 6.x

Determine if the current user user has a result for this quiz or a temporary quiz in the session.

Parameters

Quiz $quiz: The quiz.

Overrides QuizSessionInterface::isTakingQuiz

File

src/Services/QuizSession.php, line 34

Class

QuizSession
Default implementation of the quiz session.

Namespace

Drupal\quiz\Services

Code

public function isTakingQuiz(Quiz $quiz = NULL) {
  return (bool) $this
    ->getResult($quiz);
}