canvas-lms/lib/gradebook
Adrian Packel cd3815d643 Add bulk override grade update endpoint
closes EVAL-1330
flag=none

Test plan:
- Have a course with final grade override enabled and some students
  and grading periods
- Take note of the IDs of one or more students
- Make a PUT request to the API endpoint:
  - /api/v1/courses/<courseid>/update_final_grade_overrides
- With a JSON request body like the following (you can add additional
  records if you feel like it):
  {
    "grading_period_id": "1",
    "override_scores": [
      {"override_score":"60", "student_id":"7"},
      {"override_score":"61", "student_id":"125"}
    ]
  }
- (Replace the grading period and student IDs above with values
  applicable to you, or remove the grading_period_id parameter entirely
  apply the change to the course override score)
- Check that the request returns a Progress object (which should
  finish in short order) and that override grades in the gradebook are
  updated to the values you set
- Check that changing override scores in this way populates gradebook
  history

- Check that the following return unauthorized errors:
  - Accessing the endpoint for a course without final grade override
    enabled
  - Accessing the endpoint for a concluded course
  - Accessing the endpoint as a user who does hnot have permission to
    manage grades

- Smoke test setting override grades manually from Gradebook
  - Make sure it still works and populates gradebook history as before

Change-Id: I78d19d899485b40c6c812867a89b8352c215955f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253921
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-12-15 19:23:46 +00:00
..
final_grade_overrides.rb Add bulk override grade update endpoint 2020-12-15 19:23:46 +00:00