function course_content_node_view in Course 7
Same name and namespace in other branches
- 7.2 modules/course_content/course_content.module \course_content_node_view()
Implements hook_node_view().
File
- modules/
course_content/ course_content.module, line 29
Code
function course_content_node_view($node, $view_mode, $langcode) {
if (node_is_page($node) && variable_get("course_content_use_{$node->type}", 0)) {
global $user;
if ($courseObject = course_get_course_object('course_content', $node->type, $node->nid, $user)) {
$courseObject
->getFulfillment()
->setComplete()
->save();
}
}
}