You are here

function quiz_take_access in Quiz 7.4

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_take_access()
  2. 6.4 quiz.module \quiz_take_access()
  3. 7.6 quiz.module \quiz_take_access()
  4. 7 quiz.module \quiz_take_access()
  5. 7.5 quiz.module \quiz_take_access()

Does the current user have access to take the quiz?

Parameters

$node: The quiz node

2 calls to quiz_take_access()
quiz_take_pane_content_type_render in plugins/content_types/quiztake_pane.inc
Run-time rendering of the body of the block (content type) See ctools_plugin_examples for more advanced info
quiz_views_handler_field_node_link_take::render_link in includes/views/handlers/quiz_views_handler_field_node_link_take.inc
Renders the link.
1 string reference to 'quiz_take_access'
quiz_menu in ./quiz.module
Implements hook_menu().

File

./quiz.module, line 1161
Quiz Module

Code

function quiz_take_access($node) {
  if ($node->type != 'quiz') {
    return FALSE;
  }
  return node_access('view', $node) && user_access('access quiz') && quiz_availability($node) === TRUE;
}