function matching_quiz_question_config in Quiz 8.5
Same name and namespace in other branches
- 8.6 question_types/quiz_matching/quiz_matching.module \matching_quiz_question_config()
- 7.6 question_types/matching/matching.module \matching_quiz_question_config()
- 7.5 question_types/matching/matching.module \matching_quiz_question_config()
Implements hook_quiz_question_config().
File
- question_types/
quiz_matching/ quiz_matching.module, line 31 - Matching question type for the Quiz module.
Code
function matching_quiz_question_config() {
$form['quiz_matching_form_size'] = array(
'#type' => 'number',
'#min' => 2,
'#max' => 50,
'#title' => t('Match Question Size'),
'#description' => t('Number of questions allowed to wrap under a matching type question.'),
'#default_value' => \Drupal::config('quiz.settings')
->get('matching_form_size', 5),
);
$form['quiz_matching_shuffle_options'] = array(
'#type' => 'checkbox',
'#title' => t('Shuffle Matching Questions'),
'#default_value' => \Drupal::config('quiz.settings')
->get('matching_shuffle_options', TRUE),
'#description' => t('If checked matching questions will be shuffled'),
);
$form['#validate'][] = 'matching_config_validate';
return $form;
}