You are here

function course_node_is_course in Course 7

Same name and namespace in other branches
  1. 8.3 course.module \course_node_is_course()
  2. 8.2 course.module \course_node_is_course()
  3. 6 course.module \course_node_is_course()
  4. 7.2 course.module \course_node_is_course()
  5. 3.x modules/course_node/course_node.module \course_node_is_course()

Check if node is a Course.

Parameters

stdClass $node: A node object or string that indicates the node type to check.

Return value

bool

25 calls to course_node_is_course()
course_ajaj_fulfullment_check in ./course.module
Fulfillment check callback.
course_certificate_access_certificate in modules/course_certificate/course_certificate.module
Implements hook_access_certificate().
course_context in ./course.module
Course content handler callback.
course_enroll in ./course.module
Enrolls a user in a course.
course_field_attach_form in ./course.module
Implements hook_form_alter().

... See full list

File

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

Code

function course_node_is_course($node) {
  if (is_object($node)) {
    if (!isset($node->type)) {
      return FALSE;
    }
    else {
      $node = $node->type;
    }
  }
  return variable_get("course_use_{$node}", 0);
}