You are here

function quiz_get_quiz_from_menu in Quiz 6.4

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_get_quiz_from_menu()
  2. 7.6 quiz.module \quiz_get_quiz_from_menu()
  3. 7 quiz.module \quiz_get_quiz_from_menu()
  4. 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 3717
Quiz Module

Code

function quiz_get_quiz_from_menu() {
  if ($to_return = menu_get_object('quiz_type_access', 4)) {
    return $to_return;
  }
  $node = menu_get_object();
  return $node->type == 'quiz' ? $node : FALSE;
}