Numerical import was still looking at min/max arrays. I changed it so numerical will now subtract the tolerance from the answer to get the min and add the tolerance to the answer to get the max

This commit is contained in:
michaelpenne 2005-06-29 23:02:12 +00:00
parent 2ef7eeec9c
commit dd192b2692

View File

@ -182,7 +182,10 @@ function lesson_save_question_options($question) {
$answer->jumpto = LESSON_NEXTPAGE;
$answer->timecreated = $timenow;
$answer->grade = $question->fraction[$key] * 100;
$answer->answer = $question->min[$key].":".$question->max[$key];
$min = $question->answer[$key] - $question->tolerance[$key];
$max = $question->answer[$key] + $question->tolerance[$key];
$answer->answer = $min.":".$max;
// $answer->answer = $question->min[$key].":".$question->max[$key]; original line for min/max
$answer->response = $question->feedback[$key];
if (!$answer->id = insert_record("lesson_answers", $answer)) {
$result->error = "Could not insert numerical quiz answer!";