You are here

public function ShortAnswerResponse::getResponse in Quiz 6.x

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

Get the user's response.

Return value

mixed The answer given by the user

Overrides QuizAnswerInterface::getResponse

File

question_types/quiz_short_answer/src/Plugin/quiz/QuizQuestion/ShortAnswerResponse.php, line 55

Class

ShortAnswerResponse
Extension of QuizResultAnswer.

Namespace

Drupal\quiz_short_answer\Plugin\quiz\QuizQuestion

Code

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