You are here

function course_block in Course 6

Implements hook_block().

File

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

Code

function course_block($op = 'list', $delta = 0) {
  switch ($op) {
    case 'list':
      $info = array(
        'outline' => array(
          'info' => t('Course: Outline'),
          'cache' => BLOCK_NO_CACHE,
        ),
        'navigation' => array(
          'info' => t('Course: Navigation'),
          'cache' => BLOCK_NO_CACHE,
        ),
      );
      return $info;
    case 'configure':
    case 'view':
    case 'save':
      module_load_include('inc', 'course', 'includes/course.block');
      $function = "_course_block_{$delta}_{$op}";
      if (function_exists($function)) {
        return $function();
      }
      break;
  }
}