api: jump to specific page of course users

this allows you to pass a user_id to the course users api endpoint and get back
the specific page within the pagination results that contains that user.

test plan:
- hit the course users api endpoint for course with many students in it, and
  note the results.
- now hit the endpoint again and pass a user_id of one of the users not
  containing in that first page.
- you should get back a different set of results that contains the user you
  passed in.

Change-Id: I6df4364b5f9e32c30eb3265b541908ddb950762e
Reviewed-on: https://gerrit.instructure.com/13252
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
speed up canvas:compile_assets

also added parameter to for generating documentation

Change-Id: I9ad1186b3168671d306985c5cc7ad4b0784a231b
Reviewed-on: https://gerrit.instructure.com/13347
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
update ruby-saml-mod gem

Change-Id: I30ad2d7b332c8f57147f05689b385c40a5f343c0
Reviewed-on: https://gerrit.instructure.com/13423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
some ruby 1.9.3 fixes

 * fix some invalid syntax that's snuck in recently
 * fix an issue with initializing tempfiles in Canvas::HTTP
 * fix some "can't modify frozen object" errors in specs
 * upgrade mocha to 0.12.3

Change-Id: I6b6f25bcfff2466774e2941d35fafb7af7c50569
Reviewed-on: https://gerrit.instructure.com/13344
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
analytics event tracking

Change-Id: Ic5be459102e2cd532dc57e9b94c06d4bddb8272c
Reviewed-on: https://gerrit.instructure.com/13294
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
spec: add coverage to assignments student spec

also refactored files and moved specs to new
files to create better organization

Change-Id: I8212a91ea640ee7485b8554f10a357d9bf7fe92d
tested:
  * should not see an assignment in
    unpublished course
  * create a student creatable group
  * due dates enforced
  * locked until date enforced
  * assignment groups
  * group assignments
  * validate not graded assignment
  * validate external tool assignment
  * validate discussion assignment
Reviewed-on: https://gerrit.instructure.com/12890
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
thumbnails migration fix: skip bad images

Test plan:
  * change the filename of one of your avatar attachments to something
    made up
  * run the migration; make sure nothing fails

Change-Id: I767658a2c533d84ce40daac3a7d44602ebe4f37d
Reviewed-on: https://gerrit.instructure.com/13430
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
optionally return permissions in load_all_contexts, closes #9957

now that we also cache group permissions (in addition to course ones),
start grabbing the permissions in load_all_contexts. although we cache all
of them, only return ones that are requested (to keep js ENV etc. small)

slight refactor of conversations around permission stuff, and added the
ability to specify an :if check for a permission (i.e. the permission is
only on for a user if the policy says so *and* the :if method returns
true)

test plan:
n/a, see specs (new one, plus existing ones that exercise
load_all_contexts in its various capacities)

Change-Id: I82f4f71edf221c6c859a15156224d8e5b719edc5
Reviewed-on: https://gerrit.instructure.com/12983
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
spec: fix intermittent failure with topics searching

Change-Id: Ide5da1ff1018218cdfa8877d5c63fb7c75c6e3c0
Reviewed-on: https://gerrit.instructure.com/13434
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
api: fix bugs in group invite and membership api

fixes #10268

group invite wasn't searching in the correct account when trying to match user
emails passed in to users.  group membership creation was broken for
non-community account level groups to to a missing permission.

test plan:
- create an account level group
- invite someone who belongs to that account to the group with the api
- they should be added (it should not create a temporary user)
- now add someone else directly with the api be creating a membership for them
- it should work

Change-Id: I7bb7a22b83e13ed6e9575aa059e3e3463e0541f9
Reviewed-on: https://gerrit.instructure.com/13337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
improve find_ids_in_ranges to work with scopes refs #6892

test plan:
 * run specs

Change-Id: I8274ba73f13b0f2c5c947bcbf675e8a85ce15fdf
Reviewed-on: https://gerrit.instructure.com/13340
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
disable cross-shard stream items

Change-Id: Ib33b3553596fce44471b1ca90777ed244de02011
Reviewed-on: https://gerrit.instructure.com/13429
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
api: allow setting file to be hidden

fixes #10386

test plan:
- try setting a file to be hidden in the api
- it should succeed

Change-Id: I9f389d394a2a1deba4580711c69ce90a6dd2d969
Reviewed-on: https://gerrit.instructure.com/13455
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
add provisioning report and fix security issue

closes #10201

test plan
* run report
* report should contain all active accounts, users, course ...

Change-Id: I591300670fb5fea0ca01b74c5fe90f0610997d24
Reviewed-on: https://gerrit.instructure.com/13260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
honor ldap forgot password links on mobile login page.

fixes #8644

when using the canvas mobile login screen, use an account's forgot
password url if it exists. otherwise use the standard canvas form.

test plan:
  * add an account_authorization_config with a change_password_url
    (e.g. LDAP);
  * visit the mobile login page (can be accessed by changing your
    user string to iPhone Safari);
  * click the "I don't know my password" button and verify that
    it links to your forgot_password_url.

Change-Id: Ifa1bb8d83b02d12acdc6db6d521b2fd919a04bc6
Reviewed-on: https://gerrit.instructure.com/13259
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
fix external tools' course_navigation in api

Test plan:
  - make an external tool with course navigation
  - retrieve the external tool with the api and make sure the
    course_navigation section is present

Change-Id: Icb0bc77c97f0ce8b967866449ef9964189b068fd
Reviewed-on: https://gerrit.instructure.com/13415
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
spec: jobs intermittent failure

Change-Id: Id46be26970ce1d2974e44039bdd0c9bfbd92523e
Reviewed-on: https://gerrit.instructure.com/13457
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
add Russian to Canvas

Change-Id: I5ff29320619f6e9af7fd057eea5899b48c2c966c
Reviewed-on: https://gerrit.instructure.com/13468
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
fix locales.yml file

Change-Id: Ic205728f62b7d979f706769f368676af5d61d844
Reviewed-on: https://gerrit.instructure.com/13484
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
fixes intermittent spec failures

Change-Id: Ieed9eebbc7bf0b705d8d9bd1a054611014c4521b
Reviewed-on: https://gerrit.instructure.com/13481
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>