Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error when negative d.p. or sig.figs required for number entry precision #466

Closed
christianp opened this issue Dec 15, 2016 · 2 comments

Comments

@christianp
Copy link
Member

If the question author tries to set the required precision for a number entry part to a negative number of decimal places or sig figs, throw an error.

@abhanshgiri21
Copy link

hey, can i contribute to this project?
if yes, how and what do i need to do?

@christianp
Copy link
Member Author

Hi,
Thanks for offering. I think you just need to duplicate the test at https://github.com/numbas/Numbas/blob/master/runtime/scripts/parts/numberentry.js#L132 and throw an error when precisionType=="dp" && precision<0.
See our page on contributing to Numbas for information on how to set up a development environment.

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

No branches or pull requests

2 participants