function course_node_is_course in Course 7.2
Same name and namespace in other branches
- 8.3 course.module \course_node_is_course()
- 8.2 course.module \course_node_is_course()
- 6 course.module \course_node_is_course()
- 7 course.module \course_node_is_course()
- 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_ajax_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().
File
- ./
course.module, line 1690 - 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);
}