function quiz_question_has_been_answered in Quiz 7.5
Same name and namespace in other branches
- 8.4 question_types/quiz_question/quiz_question.module \quiz_question_has_been_answered()
- 6.4 question_types/quiz_question/quiz_question.module \quiz_question_has_been_answered()
- 7.6 question_types/quiz_question/quiz_question.module \quiz_question_has_been_answered()
- 7 question_types/quiz_question/quiz_question.module \quiz_question_has_been_answered()
- 7.4 question_types/quiz_question/quiz_question.module \quiz_question_has_been_answered()
Check if a question has already been answered by anyone.
This is to see if a new revision of a question should be made when saving.
Return value
bool TRUE if a user has submitted an answer for this question.
2 calls to quiz_question_has_been_answered()
- quiz_node_prepare in ./
quiz.module - Implements hook_node_prepare().
- quiz_node_presave in ./
quiz.module - Implements hook_node_presave().
File
- question_types/
quiz_question/ quiz_question.module, line 349 - Quiz Question module.
Code
function quiz_question_has_been_answered($node) {
$question_instance = _quiz_question_get_instance($node);
return $question_instance
->hasBeenAnswered();
}