You are here

function opigno_og_prereq_fetch_required_courses in Opigno 7

1 call to opigno_og_prereq_fetch_required_courses()
opigno_og_prereq_og_role_grant in modules/og_prereq/opigno_og_prereq.module
Implements hook_og_role_grant().

File

modules/og_prereq/opigno_og_prereq.module, line 83
Module hook implementations.

Code

function opigno_og_prereq_fetch_required_courses($node) {
  $nodes = array();
  if (!empty($node->course_required_course_ref)) {
    foreach ($node->course_required_course_ref as $lang => $items) {
      foreach ($items as $item) {
        $nodes[$item['target_id']] = node_load($item['target_id']);
      }
    }
  }
  return $nodes;
}