You are here

function multichoice_config in Quiz 7.4

Same name and namespace in other branches
  1. 8.4 question_types/multichoice/multichoice.module \multichoice_config()
  2. 6.4 question_types/multichoice/multichoice.module \multichoice_config()
  3. 7 question_types/multichoice/multichoice.module \multichoice_config()

Implements hook_config().

File

question_types/multichoice/multichoice.module, line 54
The main file for multichoice.

Code

function multichoice_config() {
  $form['multichoice_def_num_of_alts'] = array(
    '#type' => 'textfield',
    '#title' => t('Default number of alternatives'),
    '#default_value' => variable_get('multichoice_def_num_of_alts', 2),
  );
  $form['multichoice_def_scoring'] = array(
    '#type' => 'radios',
    '#title' => t('Default scoring method'),
    '#description' => t('Choose the default scoring method for questions with multiple correct answers.'),
    '#options' => array(
      0 => t('Give minus one point for incorrect answers'),
      1 => t("Give one point for each incorrect option that haven't been chosen"),
    ),
    '#default_value' => variable_get('multichoice_def_scoring', 0),
  );
  $form['#validate'][] = 'multichoice_config_validate';
  return $form;
}