fixes CNVS-33651
Test plan:
* Create a course
* Enroll 3 students
* Create 2 assignments with different due dates
* In rails console:
* Submission.pluck(:assignment_id, :cached_due_date) should return
an array of 6 tuples of (assignment id, its due date)
* Create an override for one student on one assignment
* In rails console:
* Submission.where(
assignment_id: <assignment picked above>,
user_id: <user picked above>
).cached_due_date should equal the override date
* Smoke test grading and viewing students in different places to make
sure the new dummy submissions aren't breaking anything
Change-Id: Idc2721fd3f05214555db780b452ddf53e67ff404
Reviewed-on: https://gerrit.instructure.com/109027
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-9349
test plan:
- no visible changes to submission version api
- the data fixup does not fail when version rows exist for non-existant
submissions
Change-Id: I579808d94b1b32b1e87faaab1efb53f51ea82d7c
Reviewed-on: https://gerrit.instructure.com/26103
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
back-populate submission_versions from existing versions for
submissions, and insert new index rows when new versions for submissions
are created.
refs CNVS-2802
test-plan:
migration:
- have at least two submission with at least one submission with
multiple versions in your database before introduction of this
code
- run the migration
- for every existing submission version record, there should now be
a submission_versions record
- the submission_versions records should have the correct metadata
for the submission version
trigger:
- create a new submission
- should create a new submission_versions record
- modify the submission in a way that triggers a new version
- should create a new submission_versions record
Change-Id: I9c4c39fa60926b037142abf3f01572c9deaa0643
Reviewed-on: https://gerrit.instructure.com/19605
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>