fixes CNVS-16961
don't create a SubmissionVersion when the Version fails to save. and if
we try to, don't let it be valid. add a data fixup to remove those that
had already happened (all of the instances of this found in production
came from cases where there was no corresponding Version the
SubmissionVersion should have been tied to).
Change-Id: I4e08acf41779ab88de85387b88db155955d3c50e
Reviewed-on: https://gerrit.instructure.com/44916
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@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>
fixes CNVS-8241
test plan:
- is possible, have a submission version with invalid yaml
- make sure the PopulateSubmissionVersions job runs successfully
- make sure the GradingHistory api endpoint returns all submission
versions
Change-Id: I00039df95cd3725d32c5478b27f10b9557cb9172
Reviewed-on: https://gerrit.instructure.com/24646
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
submission.assignment and assignment.context can't change, so there is
no need to reindex on update.
test plan: specs in spec/model/submission_version_spec.rb
Change-Id: If76bda91ba608d8848fcadca97fe4e1c63b67f1a
Reviewed-on: https://gerrit.instructure.com/20765
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-5733
test plan: specs. it's difficult to get a submission version into this
state now that we do more validation.
Change-Id: I5c482198ff95ce93e09a1b373e4e7061da96984d
Reviewed-on: https://gerrit.instructure.com/20452
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-2802
test-plan:
- create a course with multiple students and assignments
- create submissions for those students and assignments
- grade the submissions, including multiple gradings of some of them
- GET /api/v1/courses/X/gradebook_history/feed
- each grading should match the SubmissionVersion object described in
the API docs
- should include gradings for any assignment and student in the
course
- should include all gradings for any submission that's been graded
multiple times
- should paginate the returned gradings
- should order the most recent gradings first
- GET /api/v1/courses/X/gradebook_history/feed?assignment_id=Y
- should only return gradings for submissions on that assignment
- GET /api/v1/courses/X/gradebook_history/feed?user_id=Z
- should only return gradings for submissions by that user
- GET /api/v1/courses/X/gradebook_history/feed?ascending=1
- should order the oldest gradings first
- Repeat with combinations of the various parameters
Change-Id: I44aae11919116519f87a097f2d5cf1849acc4db3
Reviewed-on: https://gerrit.instructure.com/19680
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jacob Fugal <jacob@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>