You are here

function course_access_object in Course 7

Same name and namespace in other branches
  1. 6 course.module \course_access_object()
  2. 7.2 course.module \course_access_object()

Menu access for course object router.

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

File

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

Code

function course_access_object($node, $courseObject) {
  global $user;
  $course = course_get_course($node, $user);
  $courseObject
    ->setCourse($course);
  $course
    ->setActive($courseObject
    ->getId());
  return $courseObject
    ->access('take');
}