You are here

public function TrueFalseResponse::getResponse in Quiz 6.x

Same name and namespace in other branches
  1. 8.6 question_types/quiz_truefalse/src/Plugin/quiz/QuizQuestion/TrueFalseResponse.php \Drupal\quiz_truefalse\Plugin\quiz\QuizQuestion\TrueFalseResponse::getResponse()
  2. 8.5 question_types/quiz_truefalse/src/Plugin/quiz/QuizQuestion/TrueFalseResponse.php \Drupal\quiz_truefalse\Plugin\quiz\QuizQuestion\TrueFalseResponse::getResponse()

Get the user's response.

Return value

mixed The answer given by the user

Overrides QuizAnswerInterface::getResponse

1 call to TrueFalseResponse::getResponse()
TrueFalseResponse::getFeedbackValues in question_types/quiz_truefalse/src/Plugin/quiz/QuizQuestion/TrueFalseResponse.php

File

question_types/quiz_truefalse/src/Plugin/quiz/QuizQuestion/TrueFalseResponse.php, line 33

Class

TrueFalseResponse
Extension of QuizQuestionResponse.

Namespace

Drupal\quiz_truefalse\Plugin\quiz\QuizQuestion

Code

public function getResponse() {
  return $this
    ->get('truefalse_answer')
    ->getString();
}