You are here

function course_settings_menu_access in Course 6

Menu access callback to determine if the course settings should tab should display on the course node.

This differs from course_settings_access() as it only returns a boolean.

1 string reference to 'course_settings_menu_access'
course_menu in ./course.module
Implements hook_menu().

File

./course.module, line 675
course.module Core functionality for Courses.

Code

function course_settings_menu_access($node) {
  global $user;
  static $courses = array();
  if (!isset($courses[$node->nid])) {

    // Allow modules to restrict menu access to the course setting tab.
    $hooks = module_invoke_all('course_has_settings', $node, $user);
    $courses[$node->nid] = !in_array(FALSE, $hooks) && course_settings_access($node);
  }
  return $courses[$node->nid];
}