Commit Graph

6 Commits

Author SHA1 Message Date
Neil Gupta 1e052eae19 Update DueDateCacher to use EffectiveDueDates
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>
2017-05-11 20:54:44 +00:00
Landon Wilkins 242581edd3 da licença part 48
add consistent license headers to all source files

Change-Id: Ib581cddb21430cf4971aeb14980727c2935e31e4
Reviewed-on: https://gerrit.instructure.com/110154
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 18:59:33 +00:00
Cody Cutrer e8ae046632 rspec 3-ify spec/migrations
refs CNVS-16239

Change-Id: I1abcd23d390b7a4a4b1215c4ac6cf46cd5886735
Reviewed-on: https://gerrit.instructure.com/42662
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
2014-10-13 22:41:07 +00:00
Simon Williams d337334979 make data fixup resilient to missing submission rows
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>
2013-11-11 23:31:36 +00:00
Cody Cutrer 4c6294bdef extend versions index to include number, and uniqueify it
also improve find_each_with_temp_table to support sqlite
and non-transactional

Change-Id: Ie5b9dfe3fc619fd2fcc4350612dceed1e385c5cf
Reviewed-on: https://gerrit.instructure.com/20919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-06-18 21:06:27 +00:00
Jacob Fugal 6465b20ec0 populate submission versions
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>
2013-04-20 13:20:47 +00:00