-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.0.3
-
MySQL version 5.1.45
-
MySQL
-
MOODLE_20_STABLE
Found that the following four columns are incorrectly identified as having inconsistent default values in the XMLDB editor:
lesson_grades.grade
scorm.maxgrade
workshop_elements_old.stddev
mdl_workshop_assessments_old.grade
These also happen to be the only columns of type "double" in mysql. And, they are the only columns defined in the XMLDB XML as type "float" with no DECIMALS attribute set. (Try: find -name "install.xml" | xargs -i grep -H 'TYPE="float"' {})
Things appear to go wrong in get_columns in lib/dml/mysqli_native_moodle_database.php at this line:
} else if (preg_match('/(decimal|double|float)((\d+),(\d+))/i', $rawcolumn->type, $matches)) {
which assumes that the double will include size information. In these cases, at least, it does not, and so the column info does not get the attributes populated.
I don't know if this has cause problems in areas other than the XMLDB editor default values check.