Numerical questions do not accept commas

Numerical questions do not accept commas

by Marc Couture -
Number of replies: 2

Tested under Moodle 3.8.6, plugin version 3.9.0 (Build - 2020062300). 

If a student uses a period, no problem, his answer is accepted and recorded.  In the example below, three students that used a comma as a delimiter see that they answered the questionnaire, but those answers are NOT visible from the teacher's perspective, only three other responses using periods are shown:

6 answers sent, but only 3 show up

I've tried changing the course language to see if this would change anything, no dice.

How can I fix this? 

Thanks!

Average of ratings: -
In reply to Marc Couture

Re: Numerical questions do not accept commas

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
You are correct, the Questionnaire numeric question type only accepts the dot/fullstop character as decimal separator. This matter of different decimal separators often comes up on the Quiz (and Lesson) Moodle forums and causes no end of problems. How I wish the dot/full stop character were adopted as an international standard! It's already the de facto separator used on most calculators and computer numeric keyboards.
The only solution I can see in your situation is to instruct your questionnaire respondents to use the dot/full stop in their answer. By the way, I can't remember when the decision was taken to introduce decimals in that numeric question type in questionnaire. I expect it's rarely used if at all. I'm curious to find out what you need it for, if you don't mind telling us.wink
Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Numerical questions do not accept commas

by Marc Couture -
Hi Joseph, I met with the teacher who reported the problem. He was adapting his questionnaire to a rating scale used by his department, he wanted to use a 1 to 10 scale based on a 1 to 100 scale, so decimals were required to give, say, a 8.7 (or 87%) rating in the context of a peer evaluation.