function QuizQuestionResponse::isCorrect in OG Quiz 7
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 QuizQuestionResponse::isCorrect()
- QuizQuestionResponse::getReport in includes/
og_quiz_question.php - Get data suitable for reporting a user's score on the question. This expects an object with the following attributes:
- QuizQuestionResponse::getReportForm in includes/
og_quiz_question.php - Creates the report form for the admin pages, and for when a user gets feedback after answering questions.
- QuizQuestionResponse::toBareObject in includes/
og_quiz_question.php - Represent the response as a stdClass object.
File
- includes/
og_quiz_question.php, line 805 - Classes used in the Quiz Question module.
Class
- QuizQuestionResponse
- Each question type must store its own response data and be able to calculate a score for that data.
Code
function isCorrect() {
return $this
->getMaxScore() == $this
->getScore();
}