'Compares student submitted numerical answers against the correct
answers and tolerances.
`numtolerance_inputs` is a dictionary {answer_name : answer_value}
Performs numerical validation by means of calling
`compare_with_tolerance()` on all of `numtolerance_inputs`
Performs a call to `compare_with_tolerance` even on values for
decoy_inputs. This is used to validate their numericality and
raise an error if the student entered a non numerical expression.
Returns True if and only if all student inputs are correct.'

def _check_student_inputs(self, numtolerance_inputs):

    _ = self.capa_system.i18n.ugettext
    inputs_correct = True
    for (answer_name, answer_value) in numtolerance_inputs.iteritems():
        params = self.correct_inputs.get(answer_name, {'answer': 0})
        correct_ans = params['answer']
        tolerance = params.get('tolerance', default_tolerance)
        try:
            correct_ans = complex(correct_ans)
        except ValueError:
            log.debug("Content    error--answer    '%s'    is    not    a    valid    complex    number", correct_ans)
            raise StudentInputError(_('The    Staff    answer    could    not    be    interpreted    as    a    number.'))
        try:
            partial_correct = compare_with_tolerance(evaluator({}, {}, answer_value), correct_ans, tolerance)
        except:
            (__, __, trace) = sys.exc_info()
            msg = _("Could    not    interpret    '{given_answer}'    as    a    number.").format(given_answer=cgi.escape(answer_value))
            msg += '    ({0})'.format(trace)
            raise StudentInputError(msg)
        if ((answer_name in self.correct_inputs) and (not partial_correct)):
            inputs_correct = False
    return inputs_correct
