old conversations: fix removing media comment

fixes CNVS-11322

test plan:
  * open old conversations
  * compose a message
  * add a media comment
  * click on the close icon next to your media comment
  * verify that the media comment is removed

Change-Id: I33ac6fe7cc4bf85b12ba7b0100a15fcc9eacb119
Reviewed-on: https://gerrit.instructure.com/30440
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
add sis_import_id to users api

refs CNVS-10408

test plan
 - import users through SIS
 - create users manually
 - GET /api/v1/accounts/:account_id/users
   should have sis_import_id if you have
   permissions to see it
 - check that sis_import_id is in api docs

Change-Id: Id2f096548651183688d92a6f7e40c1eb2aa30b2b
Reviewed-on: https://gerrit.instructure.com/29945
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
add sis_import_id to sections api

refs CNVS-10408

test plan
 - import sections through SIS
 - create sections manually
 - GET /api/v1/accounts/:account_id/sections
   should have sis_import_id if you have
   permissions to see it
 - check that sis_import_id is in api docs

Change-Id: I0004bc35064708c6189bcb658e8f6bad7308845e
Reviewed-on: https://gerrit.instructure.com/29944
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
add sis_import_id to groups api

refs CNVS-10408

test plan
 - import groups through SIS
 - create groups manually
 - GET /api/v1/accounts/:account_id/groups
   should have sis_import_id if you have
   permissions to see it
 - check that sis_import_id is in api docs

Change-Id: Ibbd63c076835440b760952343d150ce986a386fd
Reviewed-on: https://gerrit.instructure.com/29943
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
add sis_import_id to group memberships api

refs CNVS-10408

test plan
 - import group memberships through SIS
 - create group memberships manually
 - GET /api/v1/groups/:group_id/memberships
   should have sis_import_id if you have
   permissions to see it
 - check that sis_import_id is in api docs

Change-Id: I43e3a8e806cf626c99863b467c792c0bb5c529c3
Reviewed-on: https://gerrit.instructure.com/29942
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
add sis_import_id to enrollments api

refs CNVS-10408

test plan
 - import enrollments through SIS
 - create enrollments manually
 - GET /api/v1/courses/:course_id/enrollments
   should have sis_import_id if you have
   permissions to see it
 - check that sis_import_id is in api docs

Change-Id: I2b8e91013858ddef76d07257e9dc38d46466af91
Reviewed-on: https://gerrit.instructure.com/29941
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Updated fr translation
Updated fr translation
avoid dynamic finders on an assocition with an include

the dynamic finder on the association causes scoping to be called
before delegating the dynamic finder to the class, which works
until the preloader tries to load the owning class, and BOOM,
tries to preload itself

fixes at least one spec for rails 3

Change-Id: Ia22b31a013cb6ac984eb77ca29406372538ea57f
Reviewed-on: https://gerrit.instructure.com/30393
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
prevent scribd resubmit loop

fixes CNVS-11369

test plan
 - have a scribd doc that has been deleted
 - call Attachment.process_scribd_conversion_statuses
 - it should finish and not get stuck in a loop

Change-Id: I9a0e4199e1ee4fc41da7453d973b8db8e14450d0
Reviewed-on: https://gerrit.instructure.com/30450
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
converts users/admin_merge js_block into js_bundle

test plan:
* regression test users admin merge

Change-Id: I781115b754b5f13bbab440673b5eab2f62928465
Reviewed-on: https://gerrit.instructure.com/29098
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
integrate the active_model-better_errors gem

refs CNVS-6040

This gem will help us output json error responses in the API using error
codes, since by itself ActiveRecord::Errors just deals in human-readable
i18n'd strings, and doesn't store detailed machine-readable information
on the error.

BetterErrors is mostly compatible, there's a few differences that mean I
had to change some unrelated code:

* errors[field_name] always returns an array, even if there's only one
  error on the field. This is an improvement IMO.
* errors is indexed by symbol, not by string
* iterating over the errors object now yields
  |attr, error_object| rather than |attr, string_message|

This includes a backport of the gem to rails 2.3.
On rails 3, we just use the vanilla gem.

The error codes aren't yet documented in the API docs, support for doing
that will come in a subsequent commit.

test plan: specs, plus you can hit the one api endpoint i've converted
so far -- account authorization configs. try to create an invalid
config, such as adding both cas and ldap configs to the same account,
and verify the error response formatting

Change-Id: Iaadd843ca9ff3f52c64e0256d82b64595c5559fb
Reviewed-on: https://gerrit.instructure.com/26178
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fix header reading for group weights dialog

fixes CNVS-11101

test plan
=========
- navigate to the group weights dialog in screenreader gradebook or gb2
- verify that the column labels are read properly by the screenreader

Change-Id: Ia0f55e430f406818023f561071cc42ddf2a8cad5
Reviewed-on: https://gerrit.instructure.com/30207
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
returns shard aware participant ids from discussion view api

fixes CNVS-10549

test plan
- create a discussion topic
- reply to the topic with a user on another shard
- view the discussion as the original topic creator
- ensure that the reply shows the correct author

Change-Id: I5115f6fd3a21f6c8b986e7a9e0c95b5fe4be1587
Reviewed-on: https://gerrit.instructure.com/30080
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
prevent scribd resubmit loop

fixes CNVS-11369

test plan
 - have a scribd doc that has been deleted
 - call Attachment.process_scribd_conversion_statuses
 - it should finish and not get stuck in a loop

Change-Id: I9a0e4199e1ee4fc41da7453d973b8db8e14450d0
Reviewed-on: https://gerrit.instructure.com/30450
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
outcome results api can side load alignments

fixes CNVS-11056

test plan
- fetch outcome results using the api as usual
- ensure that alignments are not included in the response
- fetch outcome results with "outcomes" include[]'d
- ensure that the included outcomes have a list of alignment id's
- fetch the outcome results with "outcomes" and
 "outcomes.alignments" include[]'d
- ensure that the alignments referenced in the included outcomes
 are also included
- ensure that the included alignment names and html_urls are valid

Change-Id: I0abf38e0f2125899df606bdbc16ac66b495cb726
Reviewed-on: https://gerrit.instructure.com/30353
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
spec: fix encrypted_cookie_store resetting for selenium

Change-Id: I116364f2817ffad64ce6e9b6abe00337d32e58ef
Reviewed-on: https://gerrit.instructure.com/30465
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
fix schema cache clearing during migration in rails 3

Change-Id: I2f4727d4d2afeb32d31930daff3b1515e2b219a8
Reviewed-on: https://gerrit.instructure.com/30350
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
don't disconnect the database during tests

Change-Id: I7e182abf124324c7f449adcd1ceb3efbf7c78d8c
Reviewed-on: https://gerrit.instructure.com/30378
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix rails2_compatibility_spec for rails 3

still runs :after hooks even though it's pending

Change-Id: Ibb0909084a5f6cc279049d216485db779006b210
Reviewed-on: https://gerrit.instructure.com/30394
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>