You are here

function course_load in Course 7.2

Same name and namespace in other branches
  1. 6 course.module \course_load()
  2. 7 course.module \course_load()

Menu loader: check if node is a Course.

File

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

Code

function course_load($nid = NULL, $vid = NULL, $reset = FALSE) {
  $nids = isset($nid) ? array(
    $nid,
  ) : array();
  $conditions = isset($vid) ? array(
    'vid' => $vid,
  ) : array();
  $node = node_load_multiple($nids, $conditions, $reset);
  return $node ? course_node_is_course(reset($node)) ? reset($node) : FALSE : FALSE;
}