Ensure all overrides are gone for the student
Ensure all overrides are gone for the student

We're seeing a recurring issue where the AssignmentOverrides are failing
to be created because it says the student already has a pre-existing
override. There was code in course_pace.rb to remove the student from the
current override but that seems like it's missing an edge case somewhere.

I've never been able to recreate this issue and support was unable to as
well. When writing a test I can get it to pass rails validations to create
the duplicate assignment overrides but it gets blocked at the database
level by a unique index check so I'm unsure how we could get into this
state.

This fix takes a more heavy handed approach and removes all
AssignmentOverrideStudent objects for the given assignment and student
before proceeding to create any new ones. Hopefully this fixes it but
without being able to accurately recreate it we'll have to monitor if
the change worked.

fixes LS-3209
flag=course_pacing

test plan:
- Create a course with course pacing enabled
- Add two students to the course
- Add an assignment to a module
- Publish the course pace plan
- Note the AssignmentOverride id
- Change the duration of the assignment in the course pace
- Republish the course pace plan
- Verify that there is a new AssignmentOverride with the new date and that
both students have been added to it

Change-Id: I0a1d923e62bc4007e68c6d2df35f2501d8c806dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293566
Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>
Product-Review: Eric Saupe <e7287cf05ae62bc45889f17a9d34b8fae8d5afd1@instructure.com>
Reviewed-by: Ed Schiebel <0ca8a83847a5889cf05cb219c0ab09f6b646243b@instructure.com>
QA-Review: Ed Schiebel <0ca8a83847a5889cf05cb219c0ab09f6b646243b@instructure.com>

sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms