While transferring questions from one institution to another, our lecturer noticed that in our Moodle the calculated question type automatically removes zeroes from the end when saving wildcard variables. This is problematic as In certain fields zeroes are meaningful. One might think this is just how the question type works, but I have tested this on two other Moodle installations separate from our institution in which the zeroes are not removed when saving. Our installation of Moodle is pretty much plain vanilla, which is making the issue quite complex and my guesses for the reasons behind this vary from Moodle installation types to server language issues that might define the decimal separator type (comma and period).
Our installation:
- Moodle v3.8
- PHP 7.2
- PostgreSQL 10.6
Steps to reproduce:
- Get to the page 'Edit the wildcards datasets' with the calculated question type
- Add a number with zeroes (e.g. 3.800) to 'Item to add -> Wild card {X}
- Update the dataset parameters
- Check the answers tolerance parameters if the zeroes have been removed (3.8) or remained (3.800)