function course_context in Course 7
Same name and namespace in other branches
- 8.3 course.module \course_context()
- 8.2 course.module \course_context()
- 6 course.module \course_context()
- 7.2 course.module \course_context()
- 3.x course.module \course_context()
Course content handler callback.
1 call to course_context()
- course_init in ./
course.module - Implements hook_init().
1 string reference to 'course_context'
- course_course_handlers in ./
course.module - Implements hook_course_handlers().
File
- ./
course.module, line 2178 - course.module Core functionality for Courses.
Code
function course_context() {
if (arg(0) == 'node') {
// If we are on the course node, set the context immediately.
$node = node_load(arg(1));
if (course_node_is_course($node)) {
course_set_context($node);
}
}
}