function course_set_context in Course 7
Same name and namespace in other branches
- 8.3 course.module \course_set_context()
- 8.2 course.module \course_set_context()
- 6 course.module \course_set_context()
- 7.2 course.module \course_set_context()
- 3.x course.module \course_set_context()
Sets a course context.
4 calls to course_set_context()
- course_ajaj_fulfullment_check in ./
course.module - Fulfillment check callback.
- course_context in ./
course.module - Course content handler callback.
- course_get_context in ./
course.module - Gets the course context.
- course_init in ./
course.module - Implements hook_init().
File
- ./
course.module, line 2533 - course.module Core functionality for Courses.
Code
function course_set_context($node = NULL, $clear = FALSE) {
$stored_course_node =& drupal_static(__FUNCTION__);
if ($clear) {
$stored_course_node = NULL;
}
if (!empty($node)) {
$stored_course_node = $node;
}
return !empty($stored_course_node) ? $stored_course_node : NULL;
}