Skip to content

Conversation

@zeileis
Copy link

@zeileis zeileis commented Oct 10, 2023

I'm using webexercises for my interactive math exercises. As the exercises is in German many students use a decimal comma rather than a decimal point. So to allow for this as being correct I have adapted the webex.js code to replace , with . prior to checking the tolerance:

my_answer = my_answer.replace(/,/g, '.');

As this is only done if there is a tolerance, I felt that the replacement could be done without further conditions (e.g., adding a class). This is also the behavior of most learning management systems like Moodle etc.

If there is no tolerance, then the answer is likely an integer anyway, so I have not tried to address that case. Not sure whether that might be relevant for some use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant