Copy of Announcement to Sender, notify announcement replies

Creates a new notification preference for announcements created by
you. Now you can see what you've sent, and how it looks in specific
communication channels. This new notification preference will also
send notifications when someone responds to the announcement.

Fixes CNVS-13745
Fixes CNVS-2135

Test Plan:

- Set "Announcement Created By You" preference
- Create an Announcement
- Check /users/[:user_id]/messages for "Announcement Created By You"
- As another user comment on the announcement
- Check /users/[:user_id]/messages for "Announcement Reply"

Change-Id: Ibb16f0dc3ba34d98f749c40d1df1eb12430aecca
Reviewed-on: https://gerrit.instructure.com/40636
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
don't hide the form submit buttons along with "Delete My Account"

test plan:
 - an admin user should see the "Delete My Account" link
   in /profile/settings, after clicking Edit
 - a non-admin user with a SIS ID should not see that link,
   but should still see the "Cancel" and "Update Settings"
   buttons

fixes CNVS-15429

Change-Id: I338e3027c9caefa6978738c73dd2c6aa2b75775e
Reviewed-on: https://gerrit.instructure.com/40921
Product-Review: Cosme Salazar <cosme@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
s/Login/Log In on mobile login page

fixes: CNVS-15370

When a user is logging in to Canvas, 
the Login button used to say Login. However, on 
the next screen when Canvas is requesting access 
to their account, the button says Log In. 

The second button is accurate in the context of 
how we are using the term Log In.

Change-Id: I3ad2d6cc86822f438e39b0d6e6089f2557224ec4
Reviewed-on: https://gerrit.instructure.com/40794
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
rails4: upgrade redis-store and friends

fixes CNVS-15414

This applies to rails3 as well, we just use the appropriate version of
redis-rails for each.

test plan: redis should work as before, for both cache and data.

Change-Id: Ic34729190936a133b908e31ff186934fa435c1b6
Reviewed-on: https://gerrit.instructure.com/40898
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
remove scribd

closes CNVS-13380
closes CNVS-8057
closes CNVS-5156

Test plan:
  * scribd should no longer exist
  * document previews should work in canvadocs

Change-Id: I5ac60c3e986f030c3aea88e32d2992ec7b1c7a08
Reviewed-on: https://gerrit.instructure.com/37895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
CQS: gerrit integration

This is for Hannah to hook gerrit up with the test script for the client
app. Also, it scopes the selenium test in /spec/selenium/client_apps for
consistency.

  - canvas build task no longer installs production-only npm packages

Closes CNVS-15443

Change-Id: I0623b594782c55490e12dffdd379bf2baf5fb3a3
Reviewed-on: https://gerrit.instructure.com/40940
Reviewed-by: Hannah Bottalla <hannah@instructure.com>
Product-Review: Hannah Bottalla <hannah@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Hannah Bottalla <hannah@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
CQS: fix outdated specs

Closes CNVS-15444

TEST PLAN
---- ----

N/A

Change-Id: If82eabd396dd325cf2b2b876f9928fd6e5351b4f
Reviewed-on: https://gerrit.instructure.com/40939
Reviewed-by: Hannah Bottalla <hannah@instructure.com>
Product-Review: Hannah Bottalla <hannah@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Hannah Bottalla <hannah@instructure.com>
don't use testcluster.yml in canvas-lms

also enable quiz statistics feature flag in open source

Change-Id: I89d43d2e114a51330c7eca7e930291fa5bf5c759
Reviewed-on: https://gerrit.instructure.com/40907
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
add spec to ensure you can change user sis id's with admins_can_change_password=false

refs CNVS-5605

Change-Id: If241724af99c86064a5fc11da44bd58abb171493
Reviewed-on: https://gerrit.instructure.com/40902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
touch all graders at once when saving a submission

fixes CNVS-15408

Change-Id: I5b3a9efeb6c38f849a34259442922dd279434ea5
Reviewed-on: https://gerrit.instructure.com/40887
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
add API docs for courses#update

Thanks to eriko for this patch. Adds API docs for courses#update
method, similar to courses#create, but with update-specific
arguments.

Test Plan:
- Check API docs to see that #update method for Courses API has
  arguments.

Fixes SIS-522
Fixes CNVS-8107

Change-Id: Ife403df1a06e6fee522e9a87ec0214210cef9062
Reviewed-on: https://gerrit.instructure.com/40313
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
continue adding tests for the new files page

fixes #CNVS-15253
Test Plan

Make sure test aren't breaking

Change-Id: Ia2d418b921fda8bb0a24f96e8c34e760f94684e0
Reviewed-on: https://gerrit.instructure.com/40747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
QA-Review: Sterling Cobb <sterling@instructure.com>
allow local file store to redirect

closes CNVS-15397

when canvas is configured to use the local file store, it will always
redirect after the upload happens. allow for this, while still making S3
uploads not auto-redirect (to avoid CORS errors)

test plan:
  - enable new files
  - configure local uploads
    - verify you can successfully upload a file
  - configure S3 uploads (with CORS configured to accept 'content-type'
    headers)
    - verify you can successfully upload a file

Change-Id: Idcbeb1b5f37e88d64e130bb0496eaf3bc231f426
Reviewed-on: https://gerrit.instructure.com/40848
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
QA-Review: Jason Madsen <jmadsen@instructure.com>
turnitin: don't crash if we don't get a status back

fixes CNVS-15440

test plan:
- submitting to turnitin still works

Change-Id: I6fafbc784908a883bf1511112b88c57b8f4c9d5d
Reviewed-on: https://gerrit.instructure.com/40935
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
handle multipart incoming email with no html part

fixes CNVS-15232

test plan
- reply to a conversation message notification email with a
 multipart message that doesn't have an html part
- ensure that the reply shows up in canvas
- ensure that no error report is generated from the incoming
 message processor

Change-Id: If7b4913fe28815312360e58e50f47bf44ff2ead2
Reviewed-on: https://gerrit.instructure.com/40971
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
don't disable preventDefault() for kylmenu links

refs: CNVS-14966

Test Plan:
  - Using screenreader/keyboard-only navigation
  - Go to the modules page (/courses/##/modules)
  - open the cog menu on module
  - hit space on the "delete" option
  - the page should not reload

this test plan is just one of many things that were
broken by not being able to .preventDefault()
on kyleMenu options.

@acannon, was there some reason that we needed to
force not being able to .preventDefault()?
see: https://developer.mozilla.org/en-US/docs/Web/API/Event.initEvent

Change-Id: Ibca3ed9fe8fc199e25c75313159d10d0563165a1
Reviewed-on: https://gerrit.instructure.com/40952
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fix Submission.bulk_load_versioned_attachments

fixes CNVS-15394

This would blow up if the submission had nonexistant attachment_ids

Test plan:
  * make a submission for an assignment
  * in the console, find your submission and set attachment_ids to
    123456789 (or something)
  * Use the "List submissions for multiple assignments" API for the
    course.  It should work.

Change-Id: Iefcf71b194ece8ffbceebe3176622ede20b909fa
Reviewed-on: https://gerrit.instructure.com/40841
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
return to an onclick handler for logout

fixes CNVS-15295

In rails2, the `:method => :delete` parameter added an onclick handler
that built up and submitted a form. In rails3, this transparently
changed to using UJS and even hooks, which has been causing problems
with people clicking the link (a) when a js error prevents UJS from
getting setup or (b) before the UJS has a chance to get set up via AMD.

It's important that logout works even in the face of these errors, so
I'm bringing back the onclick handler, but with a form always present
for simplicity.

test plan: The logout link in the top right should still function as
usual. Especially test in IE10 and IE11, where problems with it have
been most prevelant.

(note that there are existing selenium tests for the logout link)

Change-Id: I612884ef261628dace4a24407fce7b84bbd6dd4e
Reviewed-on: https://gerrit.instructure.com/40833
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
GET /logout confirmation screen

refs CNVS-15295

Normally users will logout through the link in the upper right, which
does a DELETE request and bypasses this screen. If somebody DOES do a
GET to /logout for any reason though, we'll now display a logout
confirmation screen, rather than an error.

Also fix protect_from_forgery for saml_logout and destroy. Rather than
error when the token is bad, though, redirect to the confirmation
screen. The goal here is to try really hard to let people log out, so
they're never stuck in a situation where they got an error and now can't
see how to log out (that's a security risk).

test plan:
* The logout link in the upper right should still log you out,
without a confirmation screen.
* SAML logout should still work correctly, with both GET and POST
  requests.
* If you manually visit /logout in your browser, you'll:
  * See a confirmation screen, if logged in.
    * Confirming should log you out as expected.
  * Get redirected to /login, if not logged in.
* Login in one tab. Open a second tab, log out and back in. Back on the
  first tab, hit logout in the top right.
  * With this change, you'll see the logout confirmation screen.
  * Without this change, you would get an error.

Change-Id: I13740f35cc27caeea22470e1cedf838ad4ce771d
Reviewed-on: https://gerrit.instructure.com/40834
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Don't add unnecessary information on other users' profile pages

fixes CNVS-15446

test plan:
 - Turn on user profiles and avatars for an account.
 - Enroll a teacher and student in a course in that account.
 - As the student, go to the course's people page and find the
   teacher.
 - Click on the teacher to go to the teacher's profile page.
 - Check the page source as described by the jira issue.
 - Go to the student's own profile page.
 - The student should still be able to edit their own avatar.
 - The gravatar pane of the avatar edit dialog should be
   properly initialized with the student's default email
   address.

Change-Id: Iae4fa9d74161192eedda14316029ae8631570cfc
Reviewed-on: https://gerrit.instructure.com/40988
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>