You are here

function quiz_result_is_question_answered in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 quiz.module \quiz_result_is_question_answered()

Check if the question has already been answered in the requested attempt.

Return value

boolean TRUE if the question has been answered in the attempt.

2 calls to quiz_result_is_question_answered()
quiz_access_question in ./quiz.module
Menu check to see if user has access to take this question.
quiz_question_answering_form in question_types/quiz_question/quiz_question.module
Get the form to show to the quiz taker.

File

./quiz.module, line 3910
quiz.module Main file for the Quiz module.

Code

function quiz_result_is_question_answered($quiz_result, $question) {
  $qra = quiz_result_answer_load($quiz_result->result_id, $question->nid, $question->vid);
  return !empty($qra->answer_timestamp);
}