mirror of
https://github.com/moodle/moodle.git
synced 2025-02-19 15:45:59 +01:00
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:
parent
2ef7eeec9c
commit
dd192b2692
@ -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!";
|
||||
|
Loading…
x
Reference in New Issue
Block a user