function quiz_get_num_questions in Quiz 6.3
Same name and namespace in other branches
- 5.2 quiz.module \quiz_get_num_questions()
- 5 quiz.module \quiz_get_num_questions()
- 6.6 quiz.module \quiz_get_num_questions()
- 6.2 quiz.module \quiz_get_num_questions()
- 6.5 quiz.module \quiz_get_num_questions()
Gets the number questions of a given type for a quiz.
Parameters
$nid: Node ID of the quiz.
$type: Status constant.
Return value
Number of questions that meet the criteria.
File
- ./
quiz.module, line 1807 - Quiz Module
Code
function quiz_get_num_questions($nid, $vid, $type) {
return db_result(db_query("SELECT COUNT('parent_vid') FROM {quiz_node_relationship} WHERE parent_vid = %d AND parent_nid = %d AND question_status = %d", $vid, $nid, $type));
}