public function QuizSession::removeQuiz in Quiz 6.x
Remove quiz from session
Parameters
Quiz $quiz: The quiz.
Overrides QuizSessionInterface::removeQuiz
File
- src/
Services/ QuizSession.php, line 51
Class
- QuizSession
- Default implementation of the quiz session.
Namespace
Drupal\quiz\ServicesCode
public function removeQuiz(Quiz $quiz) {
$current_quizzes = $this
->getCurrentQuizzes();
unset($current_quizzes[$quiz
->id()]);
$this
->setCurrentQuizzes($current_quizzes);
}