overhangio / openedx-scorm-xblock

SCORM XBlock for Open edX
GNU Affero General Public License v3.0
37 stars 48 forks source link

fix: Problem with weight displaying related to localization is fixed #22

Closed mishachernyshov closed 1 year ago

mishachernyshov commented 2 years ago

There is a problem with scorm weight displaying in settings from studio. To reproduce it we need to open xblock settings menu, change the weight value from default to new arbitrary one and save changes. After opening this menu again the displayed weight value is empty. The reason is localization. For the tested locale the float weight value is represented with ',' instead of '.', but it is incorrect value for input tag's value attribute, so nothing is displayed. To fix it, unlocalize filter is applied to scorm_xblock.weight value.

regisb commented 2 years ago

Thanks for this PR! Can you please tell me which locale you are using?

mishachernyshov commented 2 years ago

Thanks for this PR! Can you please tell me which locale you are using?

The locale I'm using is uk (Ukrainian).

regisb commented 1 year ago

Right, I was able to reproduce this issue. For the record, the issue occurs on Chrome/Chromium only, and not on Firefox.

Thanks for this PR!

mishachernyshov commented 1 year ago

You are welcome!