enable Audit log search

refs: CNVS-14114
refs: CNVS-13987

Test Plan:

Reference: g/37503

Message in admin tools should be gone and drop down should be visible.
The funcionality should behave as it was before it was disabled.

Hit an Audit log api call and it should work as it was before we
disabled it.

Change-Id: I13eac39aece25dff28b403eb733060e8b3a7f338
Reviewed-on: https://gerrit.instructure.com/37541
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fix audit records as they are queried

refs: CNVS-13987

Adds a parameter to event stream that allows us to add in a method to fix the
data before the event stream pulls the records.  Once the fixup is complete we
should remove these changes.

Requres g/37541.

Test Plan:

  - Corrupt some Audit log data for authentications, grade changes, and course
    changes.
  - Do not run the data fixup.
  - Use the UI or API endpoints to query the corrupted records.
  - Should fix the corrupted indexes for the corrupted records.
  - Should return corrupted event type records in results just as if the data
    fixup has ran on the records.
  - Should behave normally on records that are not corrupted or have never been
    corrupted.

Reference g/37605 for setting up corrupted event data.

Change-Id: Id0e1278c7d377ef836866e2e146e2b52887fdc68
Reviewed-on: https://gerrit.instructure.com/39089
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
Updated es translation

Change-Id: I4c36479173795aa62a2bdd73ae6b9b6f47347c37
point subtitle form to amara.org not universalsubtitles.org

universalsubtitles.org returns a 503 error now

fixes: CNVS-14832

test plan:

try to make subtitles for a video,
make sure the page it takes you to exists.

Change-Id: I162247580f6a30f530725725c657dfc45ee4e3b7
Reviewed-on: https://gerrit.instructure.com/39396
Reviewed-by: Paul Hinze <paulh@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
transaction on the policy shard, not notification shard

notification is unsharded, so it would always be on the default shard

Change-Id: I7c821ff9e8a6827708e680432ba24972a3c329ce
Reviewed-on: https://gerrit.instructure.com/39450
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix i18n scoping regression in layout files, fixes CNVS-14892

also simplify when/how we set the i18n scope... just hook into
Template#render, rather than the various renderers

test plan:
1. run canvas with RAILS_LOAD_ALL_LOCALES=true
2. change your language from english
3. go to any page in canvas
4. confirm the top nav and footer are translated
5. confirm that i18n is working elsewhere (see g/39399 for some good stuff
   to check)
6. note: if you're regression testing i18n everywhere, you'll also need to
   compile assets and run canvas with USE_OPTIMIZED_JS=true to get
   translations working in javascript land. that's technically not needed
   to verify this commit, but it'll eliminate any false positives

Change-Id: I08bc63f3bfc85e88369468f046a06b36811303b9
Reviewed-on: https://gerrit.instructure.com/39499
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>

Conflicts:
	config/initializers/i18n.rb
fix moodle 1.9 file importing

test plan:
* import a moodle 1.9 package with files in the
"course files" directory
* all the files should all be imported

closes #CNVS-14872

Change-Id: I90df086eac2873e05d1a9a26fb30f71464dd9814
Reviewed-on: https://gerrit.instructure.com/39511
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
fix importing module items with missing content

fixes an issue that arose with rails 3, where
module items that were not set with content (and thus
shouldn't have been saved) were being autosaved and
breaking the entire modules page

test plan:
* import the package(s) referenced in the ticket
* the modules page should still be functional

fixes #CNVS-14777

Change-Id: I82fe287a4db9492489461e971911a0f7c15fbcb0
Reviewed-on: https://gerrit.instructure.com/39404
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>
allow saml_logout for SAMLRequest parameter

fixes: CNVS-14869

Adds a method for checking if the request is a SAMLRequest or
SAMLResponse type and will logout a user if its either when saml_logout
is called.

Test Plan:

Ensure that the request to /saml_logout does not get
a 400 when a SAMLRequest parameter or SAMLResponse parameter is supplied
for a SAML configured account.

Change-Id: I6859859cd6518e429e58164aa6076a6a1fdecd51
Reviewed-on: https://gerrit.instructure.com/39474
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fix infinite parent folder loop

test plan:
* try to update the name for a root folder of a course
* should give an error, instead of catastrophically
 freezing your server

fixes #CNVS-14868

Change-Id: If0a1c305f3103f3bb7e17ff6ceead7db2e2173de
Reviewed-on: https://gerrit.instructure.com/39512
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
bump switchman

Change-Id: I874986eb46f017b287465cdacb41657ffb8fe4c1
Reviewed-on: https://gerrit.instructure.com/39532
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>

Conflicts:
	Gemfile.d/other_stuff.rb
Make learning mastery gradebook more accessible

Fixes: CNVS-13520

Add label to "student learning master gradebook" "outcome group"
expand all and collapse all buttons, and
cause them to properly set the aria-expanded attribute on each
individual item. Also disable button when they are irrelevent.

Test Plan:
1) Create a course, add a student, and turn on the student learning
   mastery gradebook
2) Add at least two outcome groups, each with at least two outcomes
3) Assume the identity of the student, and visit the gradebook,
   learning mastery tab
4) With your screenreader, verify that the outcome group exapand and
   collapse all buttons are usable.
  * Validate that the Expand All button is reported as disabled for
    screen reader users if and only if all items are collapsed,
    regardless of whether they were expanded via the expand all button,
    or manually, one-at-a-time.
  * Verify the inverse of the previous for the Collapse All button.

Change-Id: I685dab01f93608c5a34204bf3403d3f6fd4aa793
Reviewed-on: https://gerrit.instructure.com/37927
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: David Josse <david@instructure.com>
fix rake db:initial_setup bug

always load models alphabetically, and remove unnecessary load paths.

Dir.glob doesn't guarantee an order (it uses readdir(3)), so on some
platforms quizzes/quiz_question/numerical_question.rb could load
before quizzes/quiz_question/base.rb.

when coupled with rails' automagical directory->module inference,
NumericalQuestion would try to subclass ::Base (not having found a Base in
in quizzy land), which it cannot do since it's a module. ::Base was auto-
created due to the existence of app/stylesheets/base.

test plan:
1. try to run `rake db:initial_setup` on ubuntu 14.04
2. it should succeed

Change-Id: I534c5a0755671a0f3aa6ee96236596dfa733aa86
Reviewed-on: https://gerrit.instructure.com/38797
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>

Conflicts:
	config/application.rb
don't attempt to set the i18n scope if the template has no virtual path

this ensures 404 pages don't result in 500 pages

test plan:
1. go to /assets/common_legacy_normal_contrast.js
2. you should see a 404 page instead of a 500 page

Change-Id: I710c05fdf97b6f5ff337706798cad415fedc4bc3
Reviewed-on: https://gerrit.instructure.com/39570
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>

Conflicts:
	config/initializers/i18n.rb
respect locale preferences on new user account confirmation

fixes CAT-399

Test Plan
  1. Fire up canvas with full i18n support configured
     (i.e. $ RAILS_LOAD_ALL_LOCALES=true rails server)
  2. Submit a POST request to the canvas api to create a new user
     (i.e. '/accounts/:id/users') with request headers [:user][:locale]
     set to a supported canvas locale (i.e. 'zh')
  3. Navigate to the new user account confirmation page from the email
     link and ensure the page is rendered with localized content

Change-Id: I85f21864b03086af922d41a726a0547155248eb8
Reviewed-on: https://gerrit.instructure.com/39204
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Tested-by: Dave Donahue <ddonahue@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
treesame commit of origin/stable/2014-08-16

Treesame-Commit-Id: e642db2a715501ac9349e2ab618b833f8d615429