If you apply a non-valid grade to submissions, that invalid grade is saved to the database and will remain in the text box.
Steps to reproduce:
- in an assignment using a points grading scale, go to the submission list interface
- enter non-numeric characters into the "Apply this grade..." field (as if you were searching for a student, but using the wrong field)
- hit the "Apply" button
- notice the validation message indicating that the value is invalid
- notice the invalid value remains in the text field
- notice the invalid value is persisted even if you log out, clear cache, or log in as another maintainer
The order of operations here needs to be altered: validate the value before saving it.