public function ShortAnswerQuestion::validateNode in Quiz 8.4
Implementation of validateNode
Overrides QuizQuestion::validateNode
See also
QuizQuestion#validateNode($form_state)
File
- question_types/
short_answer/ lib/ Drupal/ short_answer/ ShortAnswerQuestion.php, line 63 - The main classes for the short answer question type.
Class
- ShortAnswerQuestion
- Extension of QuizQuestion.
Namespace
Drupal\short_answerCode
public function validateNode(array &$form_state) {
if ($form_state['values']['correct_answer_evaluation'] != self::ANSWER_MANUAL && empty($form_state['values']['correct_answer'])) {
form_set_error('correct_answer', $form_state, t('An answer must be specified for any evaluation type other than manual scoring.'));
}
}