function quiz_type_access_load in Quiz 7.4
Same name and namespace in other branches
- 8.4 quiz.module \quiz_type_access_load()
- 6.6 quiz.module \quiz_type_access_load()
- 6.2 quiz.module \quiz_type_access_load()
- 6.3 quiz.module \quiz_type_access_load()
- 6.4 quiz.module \quiz_type_access_load()
- 6.5 quiz.module \quiz_type_access_load()
- 7 quiz.module \quiz_type_access_load()
Load a quiz node, cache it and validate that it is indeed of type quiz.
Parameters
$arg: The Node ID.
Return value
A quiz node object or FALSE if a load failed.
Related topics
1 call to quiz_type_access_load()
- 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 1726 - Quiz Module
Code
function quiz_type_access_load($arg) {
static $quiz_nodes = array();
if (isset($quiz_nodes[$arg])) {
return $quiz_nodes[$arg];
}
$to_return = ($node = node_load($arg)) && $node->type == 'quiz' ? $node : FALSE;
if ($to_return) {
$quiz_nodes[$arg] = $to_return;
}
return $to_return;
}