function quiz_get_quiz_from_menu in Quiz 7
Same name and namespace in other branches
- 8.4 quiz.module \quiz_get_quiz_from_menu()
- 6.4 quiz.module \quiz_get_quiz_from_menu()
- 7.6 quiz.module \quiz_get_quiz_from_menu()
- 7.4 quiz.module \quiz_get_quiz_from_menu()
Retrieves the quiz node from the menu router.
Return value
Quiz node, if found, or FALSE if quiz node can't be retrieved from the menu router.
1 call to quiz_get_quiz_from_menu()
- quiz_access_to_score in ./
quiz.module - Helper function to determine if a user has access to score a quiz.
File
- ./
quiz.module, line 3798 - Quiz Module
Code
function quiz_get_quiz_from_menu() {
if ($to_return = menu_get_object('quiz_type_access', 4)) {
return $to_return;
}
//TODO: FIX it. This seems to return NULL in feedback page.
$node = menu_get_object();
return is_object($node) && $node->type == 'quiz' ? $node : FALSE;
}