function AbstractQuizQuestionResponse::isCorrect in Quiz 6.6
Same name and namespace in other branches
- 6.3 question_types/quiz_question/quiz_question.core.inc \AbstractQuizQuestionResponse::isCorrect()
- 6.5 question_types/quiz_question/quiz_question.core.inc \AbstractQuizQuestionResponse::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.
3 calls to AbstractQuizQuestionResponse::isCorrect()
- AbstractQuizQuestionResponse::getReport in question_types/
quiz_question/ quiz_question.core.inc - AbstractQuizQuestionResponse::toBareObject in question_types/
quiz_question/ quiz_question.core.inc - MatchingResponse::__construct in question_types/
matching/ matching.classes.inc
4 methods override AbstractQuizQuestionResponse::isCorrect()
- LongAnswerResponse::isCorrect in question_types/
long_answer/ long_answer.classes.inc - Check to see if the answer is marked as correct.
- QuizDirectionsResponse::isCorrect in question_types/
quiz_directions/ quiz_directions.classes.inc - Check to see if the answer is marked as correct.
- ScaleResponse::isCorrect in question_types/
scale/ scale.classes.inc - Implementation of isCorrect
- ShortAnswerResponse::isCorrect in question_types/
short_answer/ short_answer.classes.inc - Check to see if the answer is marked as correct.
File
- question_types/
quiz_question/ quiz_question.core.inc, line 241 - Classes used in the Quiz Question module.
Class
- AbstractQuizQuestionResponse
- A base implementation of QuizQuestionResponse.
Code
function isCorrect() {
$possible = _quiz_question_get_instance($this->question)
->getMaximumScore();
$actual = $this
->getScore();
return $possible == $actual;
}