You are here

public function ClozeResponse::score in Cloze 7

Same name and namespace in other branches
  1. 6 cloze.classes.inc \ClozeResponse::score()

Implementation of score()

See also

QuizQuestionResponse#score()

File

./cloze.classes.inc, line 335
The main classes for the cloze question type. These inherit or implement code found in quiz_question.classes.inc.

Class

ClozeResponse
Extension of QuizQuestionResponse

Code

public function score() {
  $shortAnswer = new ClozeQuestion($this->question);
  $score = $shortAnswer
    ->evaluateAnswer($this->answer);
  return $score;
}