You are here

function short_answer_config in Quiz 8.4

Same name and namespace in other branches
  1. 6.4 question_types/short_answer/short_answer.module \short_answer_config()
  2. 7 question_types/short_answer/short_answer.module \short_answer_config()
  3. 7.4 question_types/short_answer/short_answer.module \short_answer_config()

Implements hook_config().

File

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

Code

function short_answer_config() {
  $form['short_answer_default_max_score'] = array(
    '#type' => 'textfield',
    '#title' => t('Default max score'),
    '#description' => t('Choose the default maximum score for a short answer question.'),
    '#default_value' => \Drupal::config('short_answer.settings')
      ->get('short_answer_default_max_score'),
  );
  $form['#validate'][] = 'short_answer_config_validate';
  $form['#submit'][] = 'short_answer_config_submit';
  return $form;
}