You are here

public function TrueFalseResponse::getUserAnswer in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::getUserAnswer()

Implementation of getCorrectAnswer

1 call to TrueFalseResponse::getUserAnswer()
TrueFalseResponse::__construct in question_types/truefalse/truefalse.classes.inc
Constructor

File

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

Class

TrueFalseResponse
Extension of QuizQuestionResponse

Code

public function getUserAnswer() {
  return db_query('SELECT answer, score FROM {quiz_truefalse_user_answers} WHERE question_vid = :qvid AND result_id = :rid', array(
    ':qvid' => $this->question->vid,
    ':rid' => $this->result_id,
  ))
    ->fetch();
}