Details

Type: Bug

Status: Closed

Priority: Minor

Resolution: Fixed

Affects Version/s: 3.7.2, 3.8, 3.9

Labels:
Description
It seems we have a regression caused by switching from text to float values in Numerical question Answers and Tolerance form fields during the improvements introduced by MDL53140.
When using the following values in the Answer and the Tolerance of a Numerical question in a quiz, and saving the question settings form values... the form fields with answers and tolerance that hold float numbers with more than 4 leading zeros to the right side of the floating point keep rounding the last digit, and with repetitive "save" actions dissolve the entire float number to zero.
For example:
(Answer with 5 leading zeros, and Tolerance with 4 leading zeros)
Answer  Tolerance 

0.00000123456789  0.0000123456789 
0.0000012345679  0.000012345679 
0.000001234568  0.00001234568 
0.00000123457  0.0000123457 
0.0000012346  0.000012346 
0.000001235  0.00001235 
0.00000124  0.0000124 
0.0000012  0.000012 
0.000001  0.00001 
0.00000  0.0000 
0  0 
When using Answer with 4 leading zeros, and Tolerance with 3 leading zeros, the values are kept between recurring saves.