You are here

function hook_course_access_alter in Course 7.2

Same name and namespace in other branches
  1. 8.3 course.api.php \hook_course_access_alter()
  2. 8.2 course.api.php \hook_course_access_alter()
  3. 7 course.api.php \hook_course_access_alter()
  4. 3.x course.api.php \hook_course_access_alter()

Implements hook_course_access_alter().

1 function implements hook_course_access_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

course_uc_course_access_alter in modules/course_uc/course_uc.module
Implements hook_course_access_alter().
1 invocation of hook_course_access_alter()
course_access_course in ./course.module
Check whether or not a user can self-enroll in a course.

File

./course.api.php, line 215
Hooks provided by Course module.

Code

function hook_course_access_alter(&$hooks, $op, $node, $account) {
  if ($op == 'enroll') {
    $hooks['wait_a_minute'] = array(
      'message' => t('You cannot take this course.'),
      'weight' => 5,
      'success' => FALSE,
    );
  }
}