Bug #8177
Invalid values for success percentage
100%
Description
For an exercise, one can enter a percentage to define the threshold for succeeding.
It's possible to enter impossible values...
You can enter negative values. Here one could argue that it is possible to have a negative result, if you use negative scoring and don't cap your answers to zero if the value goes beneath.
You can also give values over 100. I can't possibly imagine a scenario where it's possible to achieve a 105% score.
While I don't think people will intentionally enter this, I can see accidental values being entered (500 instead of 50)
Associated revisions
History
Updated by Yannick Warnier about 6 years ago
- Category set to Exercises
- Status changed from New to Needs testing
- Assignee set to Angel Quiroz
- % Done changed from 0 to 80
Updated by Jurgen Gaeremyn about 6 years ago
Seems to work now.
I admit, I have a bad mind (the devil is in the details)... but when you enter 66.67 as pass rate... it cuts down to 66. :)
Updated by Julio Montoya about 6 years ago
Jurgen Gaeremyn wrote:
Seems to work now.
I admit, I have a bad mind (the devil is in the details)... but when you enter 66.67 as pass rate... it cuts down to 66. :)
The current database field "c_quiz.pass_percentage" is an integer.
Updated by Yannick Warnier about 6 years ago
Jurgen, do you have a user case that really makes 66.67 a necessary percentage, or is it generally ok to use integers?
Updated by Jurgen Gaeremyn about 6 years ago
No use case, just in the habit of trying out annoying values. :)
As far as I case, this is fixed enough.
Updated by Yannick Warnier about 6 years ago
- Status changed from Needs testing to Bug resolved
- Assignee changed from Angel Quiroz to Julio Montoya
- % Done changed from 80 to 100
Great, thank you!
Add number validators see #8177