From 4165bd36fcebc9f60e60f9b191d1b000df1cfebf Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Sun, 8 May 2005 21:06:14 +0000 Subject: [PATCH] fixed problem with update of tolerance reported by Miles, see http://moodle.org/mod/forum/discuss.php?d=23288#110469 --- mod/quiz/db/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/db/mysql.php b/mod/quiz/db/mysql.php index 7dd0c21f92c..a04e3601fad 100644 --- a/mod/quiz/db/mysql.php +++ b/mod/quiz/db/mysql.php @@ -500,7 +500,7 @@ function quiz_upgrade($oldversion) { /// Use tolerance instead of min and max in numerical question type table_column('quiz_numerical', '', 'tolerance', 'varchar', '255', '', '0.0', 'not null', 'question'); - execute_sql("UPDATE {$CFG->prefix}quiz_numerical SET tolerance = (min+max)/2"); + execute_sql("UPDATE {$CFG->prefix}quiz_numerical SET tolerance = (max-min)/2"); modify_database('', 'ALTER TABLE `prefix_quiz_numerical` DROP `min`'); // Replaced by tolerance modify_database('', 'ALTER TABLE `prefix_quiz_numerical` DROP `max`'); // Replaced by tolerance