You are here

function short_answer_field_extra_fields in Quiz 8.4

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

Implements hook_field_extra_fields().

File

question_types/short_answer/short_answer.module, line 246
The main file for short_answer.

Code

function short_answer_field_extra_fields() {
  $extra = array();
  foreach (node_type_get_types() as $bundle_name => $bundle) {
    if ($bundle_name == 'short_answer') {
      $extra['node'][$bundle->type]['form']['answer'] = array(
        'label' => t('Answer'),
        'description' => t('Provide the answer and the method by which the answer will be evaluated.'),
        'weight' => -4,
      );
    }
  }
  return $extra;
}