function QuizQuestionFeedbackForm::submitEnd in Quiz 8.5
Same name and namespace in other branches
- 8.6 src/Form/QuizQuestionFeedbackForm.php \Drupal\quiz\Form\QuizQuestionFeedbackForm::submitEnd()
- 6.x src/Form/QuizQuestionFeedbackForm.php \Drupal\quiz\Form\QuizQuestionFeedbackForm::submitEnd()
Submit handler to go to the quiz results from the last question's feedback.
File
- src/
Form/ QuizQuestionFeedbackForm.php, line 95
Class
Namespace
Drupal\quiz\FormCode
function submitEnd($form, &$form_state) {
$result_id = $_SESSION['quiz']['temp']['result_id'];
$quiz = $form_state
->getBuildInfo()['args'][0];
$form_state
->setRedirect('entity.quiz_result.canonical', [
'quiz' => $quiz
->id(),
'quiz_result' => $result_id,
]);
}