You are here

function course_course_credit_map_options in Course 7

Same name and namespace in other branches
  1. 8.3 course.module \course_course_credit_map_options()
  2. 8.2 course.module \course_course_credit_map_options()
  3. 7.2 course.module \course_course_credit_map_options()
  4. 3.x course.module \course_course_credit_map_options()

Implements hook_course_credit_map_options().

File

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

Code

function course_course_credit_map_options() {
  $ret = array();
  $instances = field_info_instances('course_enrollment', 'course_enrollment');
  foreach ($instances as $field_name => $instance_info) {
    $field_info = field_info_field($field_name);
    if ($options = list_allowed_values($field_info)) {
      $ret['course_enrollment']['mappers'][$field_name]['title'] = $instance_info['label'];
      $ret['course_enrollment']['mappers'][$field_name]['options'] = $options;
    }
  }
  return $ret;
}