You are here

function opigno_quiz_app_rules_event_info in Opigno Quiz App 7

Implements hook_rules_event_info().

File

./opigno_quiz_app.rules.inc, line 12
Rules hook definitions. Many of these should be moved back to the Quiz Rules module once it's ported.

Code

function opigno_quiz_app_rules_event_info() {
  return array(
    'opigno_quiz_app_rules_quiz_passed' => array(
      'label' => t('User has passed a quiz'),
      'group' => 'Quiz',
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('Quiz Taker'),
        ),
        'admin' => array(
          'type' => 'user',
          'label' => t('Quiz Administrator'),
        ),
        'node' => array(
          'type' => 'node',
          'label' => t('Quiz'),
        ),
      ),
    ),
    'opigno_quiz_app_rules_quiz_failed' => array(
      'label' => t('User has failed a quiz'),
      'group' => 'Quiz',
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('Quiz Taker'),
        ),
        'admin' => array(
          'type' => 'user',
          'label' => t('Quiz Administrator'),
        ),
        'node' => array(
          'type' => 'node',
          'label' => t('Quiz'),
        ),
      ),
    ),
    'opigno_quiz_app_rules_quiz_taken' => array(
      'label' => t('User has taken a quiz'),
      'group' => 'Quiz',
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('Quiz Taker'),
        ),
        'admin' => array(
          'type' => 'user',
          'label' => t('Quiz Administrator'),
        ),
        'node' => array(
          'type' => 'node',
          'label' => t('Quiz'),
        ),
      ),
    ),
  );
}