Synchronizing grades doesn't work well when Tomcat language's decimal separator is a comma

Description

We have experienced this issue testing the platforms H5P and Wooclap via LTI integration.

When grades are synchronized with Gradebook the grade is only correctly written in Gradebook if Tomcat's locale has the point as decimal separator. If Tomcat's locale has the comma as decimal separator (i.e. in spanish, french...) the grades are multiplied by 10 (because  points are ignored and 1.0 is changed by 10)

I have applied a fix copied from Gradebook's code and it works. It's just adding this code in SakaiBLTIUtil.java in getRoundedGrade() method:

This works in my test server with spanish and US english locales.

Before doing a PR I would like to know if this solution is acceptable.

Activity

Show:

Charles R Severance April 20, 2022 at 10:29 PM

This has already been back-merged to 21.x and 22.x so I am closing it

Sam Ottenhoff November 18, 2021 at 3:21 PM

The solution seems fine to me. Any thoughts ?

Fixed

Details

Priority

Affects versions

Fix versions

21 Status

Merged

Components

Assignee

Reporter

Created February 9, 2021 at 6:06 AM
Updated October 18, 2024 at 8:11 AM
Resolved June 1, 2021 at 9:14 AM