You are here

public function LongAnswerResponse::score in OG Quiz 7

Implementation of score

Overrides QuizQuestionResponse::score

See also

QuizQuestionResponse#score()

File

includes/og_long_answer.php, line 322
Long answer classes.

Class

LongAnswerResponse
Extension of QuizQuestionResponse

Code

public function score() {
  return (int) db_query('SELECT score FROM {quiz_long_answer_user_answers}
      WHERE result_id = :result_id AND question_vid = :question_vid', array(
    ':result_id' => $this->rid,
    ':question_vid' => $this->question->vid,
  ))
    ->fetchField();
}