Affects Version/s: 3.4.4, 3.5.1, 3.6.4, 3.7
Fix Version/s: None
Component/s: Database SQL/XMLDB
Affected Branches:MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
When we use tool "Site administration / Development / XMLDB editor / Check Defaults" , it returns false warnings with some integer values.
- Table: question. Field: defaultmark, Expected '1' Actual '1.0000000'
- Table: question_answers. Field: fraction, Expected '0' Actual '0.0000000'
- Table: question_attempts. Field: maxfraction, Expected '1' Actual '1.0000000'
- Table: grade_items. Field: grademax, Expected '100' Actual '100.00000'
This problem is not present in an old version of Moodle (3.1.5)
After searching in source, I found a difference in file
$WWWROOT/admin/tool/xmldb/actions/check_defaults/check_defaults.class.php (line 97)
In Moodle 3.5 , the test is :
In Moodle 3.1 it was:
I suppose that the problem comes from the test
" != " tests only the value , " !== " tests the value and type
I try to change " !== " to " != " in my Moodle 3.5 and get no warnings
Thanks a lot