When a provisional grade has been left, it should be deletable by the
provisional grader who left it. Invalid grades still be unacceptable,
but now "no provisional grade" is considered valid. Deleting a
provisional grade will not change the fact that the provisional
grader took up a moderation slot.
A provisional grade cannot be deleted nor changed after the
provisional grader has been been selected by the final grader in the
moderation page. After grades have posted, grades can be deleted
or changed.
fixes GRADE-1637
Test Plan
- Create a moderated assignment with just 1 number of graders.
- As the provisional grader, launch SpeedGrader and give a grade to a
student. Tab away.
- Delete the provisional grade; there should be no error messages.
- Enter a valid, non-empty grade.
- Replace the valid provisional grade with an invalid provisional grade
(e.g. "asdf"). There should be an error message, and the
provisional grade should have reverted to the last valid provisional
grade.
- Delete the provisional grade.
- As another provisional grader, launch SpeedGrader and attempt to
leave a provisional grade. There should be an error message stating
that the max number of graders has already been reached.
- Leave a provisional grade again, as the first provisional grader.
- As the final grader, open the moderation page and select the
provisional grader.
- As the provisional grader, attempt the delete the provisional
grade. It should have an error message.
- As the provisional grader, attempt to change the provisional grade.
It should have an error message.
- As the final grader, post the grades.
- As the provisional grader, attempt to delete the grade. It should be
okay.
- As the provisional grader, attempt to leave and change a grade. It
should be okay.
Change-Id: I169ac65a5d8785007b3c71aed87bbef968c86e9e
Reviewed-on: https://gerrit.instructure.com/168804
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>