You are here

function course_get_types in Course 6

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

Get a list of course types.

Return value

array

2 calls to course_get_types()
course_signup_install in modules/course_signup/course_signup.install
Implements hook_install().
views_handler_filter_course::query in views/handlers/views_handler_filter_course.inc

File

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

Code

function course_get_types() {
  $types = array();
  foreach (node_get_types() as $type => $info) {
    if (variable_get("course_use_{$type}", 0)) {
      $types[] = $type;
    }
  }
  return $types;
}