fixed problem with update of tolerance reported by Miles, see http://moodle.org/mod/forum/discuss.php?d=23288#110469

This commit is contained in:
gustav_delius
2005-05-08 21:06:14 +00:00
parent 05cc849441
commit 4165bd36fc
+1 -1
View File
@@ -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