public function TrueFalseResponse::getResponse in Quiz 7
Same name and namespace in other branches
- 6.6 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
- 6.3 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseResponse::getResponse()
- 6.4 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
- 6.5 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseResponse::getResponse()
- 7.6 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
- 7.4 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
- 7.5 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getResponse()
Implementation of getResponse
Overrides QuizQuestionResponse::getResponse
See also
QuizQuestionResponse#getResponse()
1 call to TrueFalseResponse::getResponse()
- TrueFalseResponse::score in question_types/
truefalse/ truefalse.classes.inc - Implementation of score
File
- question_types/
truefalse/ truefalse.classes.inc, line 289 - Defines the classes necessary for a True/False quiz.
Class
- TrueFalseResponse
- Extension of QuizQuestionResponse
Code
public function getResponse() {
if (!isset($this->answer)) {
$correct_answer = $this
->getCorrectAnswer();
$this->answer = isset($correct_answer->answer) ? $correct_answer->answer : '';
}
return $this->answer;
}