Created attachment 155426 [details] Second comparison is actually incorrect and the fourth one is actually correct SUMMARY In the "Compare numbers" activity, GCompris marks as "wrong answers" answers that are actually correct. This apparently only happens when the two compared numbers are integers with different numbers of digits. The attached screenshot shows examples: the second comparison is actually incorrect (but the correction affirms it is correct) and the fourth one is actually correct (but the correction affirms it is incorrect). STEPS TO REPRODUCE 1. Launch the "Compare numbers" activity. 2. "Find" a comparison between two integers with different numbers of digits. 3. Answer, clicking on "<" or ">". 4. Correct, clicking on "OK". OBSERVED RESULT Wrong correction. Maybe GCompris compares the first different digits, from left to right, what is only correct if both numbers have the same number of digits. EXPECTED RESULT Correct correction. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Trisquel GNU/Linux 10 (based on Ubuntu 20.04) ADDITIONAL INFORMATION Running bin/gcompris-qt.sh installed from https://download.kde.org/stable/gcompris/qt/linux/gcompris-qt-3.0-Linux64.sh
I can reproduce, thank you for the report, I'll make a fix
Git commit d7c01f742e1ad318b55ce8c0abe8c495bdcc9b0f by Johnny Jazeix. Committed on 19/01/2023 at 17:11. Pushed by jjazeix into branch 'KDE/3.0'. comparator, fix comparison computation. Previous code was done using strings and 2 was bigger than 11 because of string comparison... M +11 -2 src/activities/comparator/comparator.js https://invent.kde.org/education/gcompris/commit/d7c01f742e1ad318b55ce8c0abe8c495bdcc9b0f
Git commit e0b8cbfe9faa6b0d09bac5874df7849eea131f03 by Johnny Jazeix. Committed on 19/01/2023 at 17:12. Pushed by jjazeix into branch 'master'. comparator, fix comparison computation. Previous code was done using strings and 2 was bigger than 11 because of string comparison... M +11 -2 src/activities/comparator/comparator.js https://invent.kde.org/education/gcompris/commit/e0b8cbfe9faa6b0d09bac5874df7849eea131f03
Your reactivity is always impressive. Thank you for the fix. I guess there could be a new activity to compare strings, as in "Would this word be before or after that other word in a dictionary?" (although that would require taking into account the locale!). ;-)
(In reply to lcerf from comment #4) > Your reactivity is always impressive. Thank you for the fix. I guess there > could be a new activity to compare strings, as in "Would this word be before > or after that other word in a dictionary?" (although that would require > taking into account the locale!). ;-) We have activities to order letters, words in a sentence, numbers but not words themselves! It would "just" be creating new datasets. The translators take care about the locale, as it is when we translate the strings that we ask the strings to be in the correct order.