You are here

function course_rules_action_info in Course 7

Same name and namespace in other branches
  1. 8.3 includes/course.rules.inc \course_rules_action_info()
  2. 8.2 includes/course.rules.inc \course_rules_action_info()
  3. 7.2 includes/course.rules.inc \course_rules_action_info()

Implements hook_rules_action_info().

File

includes/course.rules.inc, line 38

Code

function course_rules_action_info() {
  $defaults = array(
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Node'),
      ),
      'user' => array(
        'type' => 'user',
        'label' => t('User'),
      ),
    ),
    'group' => t('Course'),
  );
  $actions['course_enroll'] = $defaults + array(
    'label' => t('Enroll a user in a course'),
    'base' => 'course_rules_action_course_enroll',
  );
  $actions['course_unenroll'] = $defaults + array(
    'label' => t('Unenroll a user from a course'),
    'base' => 'course_rules_action_course_unenroll',
  );
  return $actions;
}