function hook_can_take_course in Course 6
Allow modules to determine if this course should be restricted.
If any module implementing this hook returns FALSE or an array containing 'success' => FALSE, the course will be restricted.
Parameters
object $node: The course node.
object $user: The user who may or may not take the course.
Return value
boolean|array Either FALSE, or an array containing:
- success: Boolean. Indicates whether or not the user has permission to take this course.
- message: String. If success is FALSE, a message to display to the user.
See also
1 function implements hook_can_take_course()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- course_can_take_course in ./
course.module - Implements hook_can_take_course().
1 invocation of hook_can_take_course()
- course_take_course_access in ./
course.module - Determine if taking this course should be restricted.
File
- ./
course.api.php, line 206 - Hooks provided by Course module.
Code
function hook_can_take_course($node, $user) {
// @see course_can_take_course() and hook_can_take_course() for examples of
// how to use this hook.
}