moodle-qtype_formulas icon indicating copy to clipboard operation
moodle-qtype_formulas copied to clipboard

handle commas as decimal separators, formatcheck as amd module

Open SnakyJake opened this issue 9 months ago • 4 comments

convert formatcheck.js to amd module handle different decimal separators like commas

SnakyJake avatar Mar 28 '25 06:03 SnakyJake

Hello Jakob and thanks for the contribution. There is one problem though: the 5.3 branch is no longer under active development. And for the 6.x branch (main), I have already started rewriting all legacy Javascript code, e.g. in #163 and #164, because the whole structure of it has changed.

PhilippImhof avatar Mar 28 '25 06:03 PhilippImhof

As a side note, it is still planned to integrate handling of comma as a decimal separator in future versions (maybe 6.1.x). But unfortunately, it's more complicated than just to replace every occurrence of a comma by a point, as there can be legitimate uses of a comma in the student input.

PhilippImhof avatar Mar 28 '25 06:03 PhilippImhof

Ok, nice to know. Than please ignore this pull request. We desperately need comma handling, so I implement it here so it works with our questions. I will not do any pull request if you plan impleneting it anyways. I think you better know where to implement it than me trying to guess where the best place might be. Thanks alot...

SnakyJake avatar Mar 28 '25 08:03 SnakyJake

Good to know that you mainly did it, because you needed it, so I do not make you lose your time. I want to make it very clear that I appreciate your contribution and I hope my answer did not come across hostile.

Also, one of the main objectives of my full rewrite was to make it easier for motivated people to contribute, thanks to more modern practices and better documentation in the code. Because when I started maintaining the plugin, I found it very hard to understand all the inner workings of the plugin and thought that it was not particularly "inviting"…

PhilippImhof avatar Mar 28 '25 09:03 PhilippImhof

I will now lose this PR, as localised number formatting will be implemented in PR #228

I invite you to have a look over there and submit your feedback or ideas.

PhilippImhof avatar Jun 09 '25 09:06 PhilippImhof