You are here

public function QuizQuestionFeedbackForm::submitForm in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 src/Form/QuizQuestionFeedbackForm.php \Drupal\quiz\Form\QuizQuestionFeedbackForm::submitForm()
  2. 6.x src/Form/QuizQuestionFeedbackForm.php \Drupal\quiz\Form\QuizQuestionFeedbackForm::submitForm()

Submit handler to go to the next question from the question feedback.

Overrides FormInterface::submitForm

File

src/Form/QuizQuestionFeedbackForm.php, line 87

Class

QuizQuestionFeedbackForm

Namespace

Drupal\quiz\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $quiz = $form_state
    ->getBuildInfo()['args'][0];
  $form_state
    ->setRedirect('quiz.question.take', [
    'quiz' => $quiz
      ->id(),
    'question_number' => $_SESSION['quiz'][$quiz
      ->id()]['current'],
  ]);
}