You are here

function quiz_result_is_question_answered in Quiz 7.5

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

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

Return value

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

1 call to quiz_result_is_question_answered()
quiz_access_question in ./quiz.module
Menu check to see if user has access to take this question.

File

./quiz.module, line 3860
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);
}