You are here

protected function QuizSession::getCurrentQuizzes in Quiz 6.x

Gets the current quizzes the user is taking

Return value

array The quizzes

8 calls to QuizSession::getCurrentQuizzes()
QuizSession::getCurrentQuestion in src/Services/QuizSession.php
Get the user's current question index for a quiz in the session.
QuizSession::getResult in src/Services/QuizSession.php
Get the current user's result for a Quiz in the session
QuizSession::getTemporaryResult in src/Services/QuizSession.php
Get the current user's temporary result ID (for feedback/review).
QuizSession::removeQuiz in src/Services/QuizSession.php
Remove quiz from session
QuizSession::setCurrentQuestion in src/Services/QuizSession.php
Set the user's current question.

... See full list

File

src/Services/QuizSession.php, line 129

Class

QuizSession
Default implementation of the quiz session.

Namespace

Drupal\quiz\Services

Code

protected function getCurrentQuizzes() {
  $key = $this
    ->getSessionKey();
  return $this->session
    ->get($key, []);
}