You are here

function course_set_context in Course 6

Same name and namespace in other branches
  1. 8.3 course.module \course_set_context()
  2. 8.2 course.module \course_set_context()
  3. 7.2 course.module \course_set_context()
  4. 7 course.module \course_set_context()
  5. 3.x course.module \course_set_context()

Sets a course context.

@todo support Context.

4 calls to course_set_context()
course_ajaj_fulfullment_check in ./course.module
Fulfillment check callback.
course_context in ./course.module
Course context handler callback.
course_get_context in ./course.module
Gets the course context.
course_init in ./course.module
Implements hook_init().

File

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

Code

function course_set_context($node = NULL, $clear = FALSE) {
  static $stored_course_node;
  if ($clear) {
    $stored_course_node = NULL;
  }
  if (!empty($node)) {
    $stored_course_node = $node;
  }
  return !empty($stored_course_node) ? $stored_course_node : NULL;
}