You are here

function quizfileupload_report_validate in Quiz File Upload 7.4

Validate the result report for short answer

1 string reference to 'quizfileupload_report_validate'
QuizfileuploadResponse::getReportFormValidate in ./quizfileupload.classes.inc
Implements getReportFormValidate().

File

./quizfileupload.module, line 87
The main file for quizfileupload.

Code

function quizfileupload_report_validate($values, $form_key) {

  // Check to make sure that entered score is not higher than max allowed score.
  if (!_quiz_is_int($values['score'], 0, (int) $values['max_score'])) {
    form_set_error($form_key . '][score', t('The score needs to be a number between 0 and @max', array(
      '@max' => (int) $values['max_score'],
    )));
  }
}