You are here

public function TrueFalseResponse::getResponse in Quiz 6.6

Same name and namespace in other branches
  1. 6.3 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseResponse::getResponse()
  2. 6.4 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
  3. 6.5 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseResponse::getResponse()
  4. 7.6 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
  5. 7 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
  6. 7.4 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
  7. 7.5 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
1 call to TrueFalseResponse::getResponse()
TrueFalseResponse::score in question_types/truefalse/truefalse.classes.inc

File

question_types/truefalse/truefalse.classes.inc, line 184
Defines the classes necessary for a True/False quiz.

Class

TrueFalseResponse

Code

public function getResponse() {
  if (!isset($this->answer)) {
    $correct_answer = $this
      ->getCorrectAnswer();
    $this->answer = $correct_answer->answer;
  }
  return $this->answer;
}