didn't realize that helper method would return the raw relation as
an optimization, which if the relation doesn't have an order by on
it would be bad.
also fix the enrollments_api_spec to actually test bookmarks
and non-bookmarks, and simplify some of the logic in
EnrollmentsApiController#index both to clean up the code, and to
allow the specs to easily test both cases
Change-Id: Ifbaf588f787de7b54f3a26c6412cca81e2f34c4a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270186
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Change-Id: I70825be7ec7e24458afe0c63dc48c5a76158f520
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CORE-665
test plan:
* enable qualified names on two database servers
* enroll a user from shard A on db A into a course in shard B
* create a calendar event and an assignment in the course
* view the calendar as the user, from both shard A and shard B
* both the assignment and the event should show up
* ensure downloading the calendar feed works too
Change-Id: I8e614721d6c4be1a284e384e5587a8629eff5558
Reviewed-on: https://gerrit.instructure.com/133923
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
some of the specificity was due to Rails 2 style sharding
Change-Id: Ia6f3af886e6b9051a06b5eaaa52cdd14ca93ac42
Reviewed-on: https://gerrit.instructure.com/133884
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
either with Relation#all or Association#scope
refs #CNVS-26056
Change-Id: Ie370a3c47c575007ce3b0ba75a122d854e6f8fbc
Reviewed-on: https://gerrit.instructure.com/69497
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
in rails 4, apparently relations no longer retain
their proxy_association.owner when they're merged
into another non-association relation
better to use Relation#shard explicitly
refs #CNVS-21596
Change-Id: Iad34bbf626c17a3f0b1fc57ac685506199cc5f3d
Reviewed-on: https://gerrit.instructure.com/58151
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes: CNVS-11645
Test Plan:
Test the groups api endpoint at
api/v1/users/self/groups?context_type=Account
Make sure its not broken.
Change-Id: I2a17672f0e81530aa8623c5ed16b9cb0bb6b3ce5
Reviewed-on: https://gerrit.instructure.com/31417
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>