Moodle

Use locale settings for decimal separators

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Use locale settings for thousands and decimal separators

edit: thousand separator support was removed because it often collided with list separator

Issue Links

Activity

Hide
Nicolas Martignoni added a comment -

Is the   entity allowed for string thousandsep? (It's used in french language).

Show
Nicolas Martignoni added a comment - Is the   entity allowed for string thousandsep? (It's used in french language).
Hide
Nicolas Connault added a comment -

As far as I know, PHP's number_format() function will be used, so only the locale settings will be applied. For french, I believe it is dot (.) for thousands and comma (,) for decimals. I don't think we'll implement customised separators.

Show
Nicolas Connault added a comment - As far as I know, PHP's number_format() function will be used, so only the locale settings will be applied. For french, I believe it is dot (.) for thousands and comma (,) for decimals. I don't think we'll implement customised separators.
Hide
Yu Zhang added a comment -

Hi,

Yes it uses number_format(), but this is actually not locale based. This is tied to the language pack, so every language pack can have it's own decimal point and thousand separator. So if 2 courses have 2 different languages, the grades in the gradebook will look different (if the decimal point or thousand separators are different)

I think   might have some issues, because when user submit I think you can end up getting   (printed) and & (when manually entered) so might be tricky to process.

Yu

Show
Yu Zhang added a comment - Hi, Yes it uses number_format(), but this is actually not locale based. This is tied to the language pack, so every language pack can have it's own decimal point and thousand separator. So if 2 courses have 2 different languages, the grades in the gradebook will look different (if the decimal point or thousand separators are different) I think   might have some issues, because when user submit I think you can end up getting   (printed) and & (when manually entered) so might be tricky to process. Yu
Hide
Nicolas Martignoni added a comment -

Thanks for the clarification Yu.

OT: hello Nicolas, Hope you're well installed now in Rennes

Show
Nicolas Martignoni added a comment - Thanks for the clarification Yu. OT: hello Nicolas, Hope you're well installed now in Rennes
Hide
Yu Zhang added a comment -

added 2 more strings in config.

Show
Yu Zhang added a comment - added 2 more strings in config.
Hide
Petr Škoda (skodak) added a comment -

thousand separators are not supported

Show
Petr Škoda (skodak) added a comment - thousand separators are not supported
Hide
Paul Nijbakker added a comment -

This setting does not seem to affect the decimal separators in calculated quiz questions or numerical cloze questions. Is there any way to achieve that these quiz question types recognise a comma as decimal separator?

Show
Paul Nijbakker added a comment - This setting does not seem to affect the decimal separators in calculated quiz questions or numerical cloze questions. Is there any way to achieve that these quiz question types recognise a comma as decimal separator?

People

Dates

  • Created:
    Updated:
    Resolved: