You are here

function long_answer_config in Quiz 8.4

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

Implements hook_config().

File

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

Code

function long_answer_config() {
  $form['long_answer_default_max_score'] = array(
    '#type' => 'textfield',
    '#title' => t('Default max score'),
    '#description' => t('Choose the default maximum score for a long answer question.'),
    '#default_value' => \Drupal::config('long_answer.settings')
      ->get('long_answer_default_max_score'),
  );
  $form['#validate'][] = 'long_answer_config_validate';
  $form['#submit'][] = 'long_answer_config_submit';
  return $form;
}