You are here

function long_answer_field_extra_fields in Quiz 8.4

Same name and namespace in other branches
  1. 7.6 question_types/long_answer/long_answer.module \long_answer_field_extra_fields()
  2. 7.4 question_types/long_answer/long_answer.module \long_answer_field_extra_fields()
  3. 7.5 question_types/long_answer/long_answer.module \long_answer_field_extra_fields()

Implements hook_field_extra_fields().

File

question_types/long_answer/long_answer.module, line 314
This module defines a long answer question type for quizzes.

Code

function long_answer_field_extra_fields() {
  $extra = array();
  foreach (node_type_get_types() as $bundle_name => $bundle) {
    if ($bundle_name == 'long_answer') {
      $extra['node'][$bundle->type]['form']['rubric'] = array(
        'label' => t('Rubric'),
        'description' => t('Specify the criteria for grading the response.'),
        'weight' => -4,
      );
    }
  }
  return $extra;
}