fetch gb2 enrollments in chunks of api_max_per_page

refs CNVS-3927

Hopefully the api_max_per_page size is going to be increased soon, this
will prevent us from being artificially limited at 100.

Test plan:
  * set your api_max_per_page setting to > 100
  * ensure that the pages fetched by gb2 match your api_max_per_page
    setting

Change-Id: Ia0468f182b83acb911f9d328b97e9f8cbd696364
Reviewed-on: https://gerrit.instructure.com/17893
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
add api end point for fetching an account's sub accounts

closes CNVS-2351

Test plan:
  * try hitting /api/v1/accounts/N/sub_accounts
    * it should return the children of accounts
  * hit /api/v1/accounts/N/sub_accounts?recursive=true
    * it should return all descendants of the account
  * don't forget to check pagination

Change-Id: I49ae54840c0bf39f1c52304a8317733eba021ae4
Reviewed-on: https://gerrit.instructure.com/17776
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
add french language translation

Test Plan:
  - French language should be an option, and updated

fixes CNVS-4029

Change-Id: I0f4d966c5b8985dec461e0af9650fb2e7fb6cc96
Reviewed-on: https://gerrit.instructure.com/17907
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Enrollment#sis_user_id convenience method

Change-Id: Ib37e4ce1d494b5489490c9d582793447188ebf16
Reviewed-on: https://gerrit.instructure.com/17528
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Enrollment#sis_user_id without sis_source_id

refs CNVS-3610, CNVS-3653

test-plan:
 * enroll a user in a course without a sis_source_id
 * load the enrollment in a script/console
 * ask for enrollment.sis_user_id
 * it doesn't blow up

Change-Id: I8e526805181ad5351465af6eea362ca5478f9706
Reviewed-on: https://gerrit.instructure.com/17790
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
add french language translation

Test Plan:
  - French language should be an option, and updated

fixes CNVS-4029

Change-Id: I0f4d966c5b8985dec461e0af9650fb2e7fb6cc96
Reviewed-on: https://gerrit.instructure.com/17907
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
add custom help links to en.yml for translation.

fixes CNVS-4051

test plan
- run rake canvas:compile_assets
- open a canvas page with ?optimized_js=1 appended to the
    URL;
- in a browser console, run
    `I18n.translations.en.support.help_menu`;
- verify that translations exist in that namespace.

Change-Id: I4bb878b7be2255564162e6e7f97b155bbdc51fba
Reviewed-on: https://gerrit.instructure.com/17919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Dave Jungst <dave@instructure.com>
document message.rb to help w/ future clean-up.

Change-Id: Iebc80221e7ea05b84f08ae52a24e60b13c6146f9
Reviewed-on: https://gerrit.instructure.com/17683
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Tested-by: Eric Berry <ericb@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
don't return from a proc

This worked in 1.8 but breaks in 1.9

test plan: create a delayed job that'll fail -- for instance
> User.find(X).send_later(:name)
> User.find(X).destroy!

Then run jobs, and the job should get inserted into failed_jobs
correctly.

Change-Id: Ie3a1f28cfaa7f1b1032b1c26dcee3330c30c0a5e
Reviewed-on: https://gerrit.instructure.com/17906
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
don't return from a proc

This worked in 1.8 but breaks in 1.9

test plan: create a delayed job that'll fail -- for instance
> User.find(X).send_later(:name)
> User.find(X).destroy!

Then run jobs, and the job should get inserted into failed_jobs
correctly.

Change-Id: Ie3a1f28cfaa7f1b1032b1c26dcee3330c30c0a5e
Reviewed-on: https://gerrit.instructure.com/17906
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
accessibility: fix keyboard shortcut dialogs for screen readers

Tested to work in these browsers + screen reader combinations:
  Firefox + JAWS (Windows 7)
  Internet Explorer 9 + JAWS (Windows 7)
  Chrome + VoiceOver (OSX)
  Safari + VoiceOVer (OSX)

Tested and found not to work in these browsers + screen reader
combinations:

  Chrome + JAWS (Windows 7)
  Firefox + VoiceOver (OSX)

Visit the course assignments page and hit the comma key to bring up a
list of keyboard shorcuts. You should be able to navigate the list and
be read the list of keyboard shortcuts in the screen reader. You should
also be able to open and close the dialogue.

When you close the dialogue, you should be taken back to the last
element that had focus.

fixes CNVS-2865

Change-Id: Ieb8b97109a667b9731a35ee1302394eb6d67c21c
Reviewed-on: https://gerrit.instructure.com/17784
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Refactored Message#parse! and added additional specs

fixes CNVS-3924

test steps:
- Review the message.rb model changes
- Perform the spec tests on message_spec.rb

Change-Id: Ia095c4d09db0314c0ae1f48523fe8d5f642f8935
Reviewed-on: https://gerrit.instructure.com/17895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
fixes grade export report to students only

fixes CNVS-4083

test plan
- run report
- only students should be included

Change-Id: Ibf6feae1e2a0aee5f969b6322400fe598d539eae
Reviewed-on: https://gerrit.instructure.com/17957
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
add resource link id to assignments api

FIXES #CNVS-3625

grabbed the opaque_identifier for the tag
because that's what was being used in 
'ApplicationController#content_tag_redirect'.

TEST PLAN:

1) use the API to access an assignment
that has an external_tool_tag

2) you should get "external_tool_tag_attributes"
as an attribute in the assignment json. It should
have a field called "resource_link_id" in it
with a long id value.


Change-Id: I983dc12c97cc65eaea97638364e3a68f0f279a9f
Reviewed-on: https://gerrit.instructure.com/17867
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fix media preview thumbnails on file links

fixes CNVS-3973

test plan:
 * upload a video file to the files section of a course
 * give it time for kaltura to process it
 * edit a wiki page and use the wiki sidebar to insert that
   video
 * view the page.  a preview thumbnail should appear
   near the file link.   clicking it should play the video.

Change-Id: I515614ba01eed4db40a42b327a43767c9cfea2b8
Reviewed-on: https://gerrit.instructure.com/17971
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
skip kaltura assets with no url

Test Plan:
 * load a kaltura video with empty urls
 * if there are no valid ones it should say still converting
 * if there is just one missing, the player should use a valid one

Change-Id: If586ac446cdbf9c6e8b138d017dcd0fc6d81e20d
Reviewed-on: https://gerrit.instructure.com/17973
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
stub Shard.relative_id_for

Change-Id: I00bec27dc2b9606f81d972fdb2942e0feff8aa8b
Reviewed-on: https://gerrit.instructure.com/17969
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
support html emails.

fixes CNVS-65, CNVS-3921

test plan:
  * copy app/messages/new_discussion_entry.email.erb to
    /app/messages/new_discussion_entry.email.html.erb;
  * create a new discussion in a class with at least two
    users (who have their discussion entry notifications
    set to "immediately");
  * as user 1, post a reply to the discussion;
  * verify that user 2 receives a multipart email with
    an html part and a plaintext part.

Change-Id: I30e3e15fa53817767c770491ab8c19286281e0aa
Reviewed-on: https://gerrit.instructure.com/17964
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Sign log out requests
Updates to version 0.1.20 of the ruby-saml-mod gem which will cause us
to start signing SAML log out requests.

Fixes CNVS-1765

Test Plan:
 - set up a SAML identity provider like SimpleSAMLPHP or OpenAM
 - configure the provider to expect log out requests to be signed
 - logging out from Canvas should still work

Change-Id: I1cefb02140a692e496079bd2badc713fcfdf4164
Reviewed-on: https://gerrit.instructure.com/17780
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
add multiple reply-to support to outgoing mail.

fixes CNVS-2514

allow multiple reply-to addresses that will be rotated
across when sending mail. this commit, in conjunction with
CNVS-3781, allows canvas to receive mail from multiple
inboxes and distribute its incoming mail across them.

test plan:
  * configure config/outgoing_mail.yml with multiple
    reply_to_addresses as explained in
    config/outgoing_mail.yml.example;
  * trigger at least n notifications for a user in canvas,
    where n is the number of reply_to_addresses configured;
  * visit /user/:id/messages and verify that each message
    is sent from a different reply_to address.

Change-Id: I53c01c7c355dcbf7c16595070f41eee721814849
Reviewed-on: https://gerrit.instructure.com/17870
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>