public function LongAnswerResponse::isCorrect in Quiz 6.5
Same name and namespace in other branches
- 6.6 question_types/long_answer/long_answer.classes.inc \LongAnswerResponse::isCorrect()
- 6.3 question_types/long_answer/long_answer.classes.inc \LongAnswerResponse::isCorrect()
Check to see if the answer is marked as correct.
This default version returns TRUE iff the score is equal to the maximum possible score.
Overrides AbstractQuizQuestionResponse::isCorrect
File
- question_types/
long_answer/ long_answer.classes.inc, line 206 - Long answer classes.
Class
Code
public function isCorrect() {
$possible = _quiz_question_get_instance($this->question)
->getMaximumScore();
$actual = $this->score;
return $actual / $possible * 100 > 50;
}