spec: fix specs with a plugin that overrides HostUrl.file_host_with_shard

test plan:
 * specs should pass

Change-Id: I3abada3fd0d04d9e3298ee9a852d65421d22622b
Reviewed-on: https://gerrit.instructure.com/15271
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
update API docs for oauth client id generation

There's now a UI for this, no need to use the console.

Change-Id: Iffdb70d41c5b4cca94a6bb442107d3923911e16d
Reviewed-on: https://gerrit.instructure.com/15232
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
fix utf-8 encoding in date-js/core.js

Change-Id: I89fea8c83110fae8f0eff77909a0c8acf3507462
Reviewed-on: https://gerrit.instructure.com/15268
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
assets.yml does not provide a good __FILE__

if you try to start the rails console from
another directory on beta it explodes.  This
just allows the config file to require
the plugin_assets class based upon a relative
pathing from the rails root directory.

TEST PLAN:
  SERVER
  1) Start the server process
  2) you should be able to browse to
    the server and have appropriate
    styles for any plugins (like the
    analytics area)
  CONSOLE
  3) 'cd' to any subdirectory of the rails
root directory
  4) start the rails console
  5) the console should start without exploding

Change-Id: Ia14aa10d33ceeb830baf3ae640ef3c17f4c7d908
Reviewed-on: https://gerrit.instructure.com/15281
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
unused code

Change-Id: I9bd256333b1fa41b9ed11d9037f470075803b8fd
Reviewed-on: https://gerrit.instructure.com/15256
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Set up new styles for icon font, and refactor current icon classes

Change-Id: I3982c5ef913556323475d7d75fee329b7a9e5f86
Reviewed-on: https://gerrit.instructure.com/15195
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
handle more device types on mobile login page

fixes: #11476

restyle mobile login page to handle different
screen dimensions and resolution (retina/non-retina)
so that it works on new iPhone, android browsers, etc.

use mobile_login for iPad iOS app and android app too
the iOS and android apps are now going to pass a
query string param of mobile=1 when it loads the
webview for login. it will set a cookie to
remember that it prefers the mobile optimized
login screen so that if it goes through any
redirection (bad user/pass) it still looks right.
fixes: #11686

Change-Id: Iafdc7522189dc44be5c5bc4592c5cb194a188612
Reviewed-on: https://gerrit.instructure.com/15283
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chris@12spokes.com>
update dialog box button appearance to conform with styleguide

fixes #10236

test plan:

check each updated form to ensure it looks correct and works

Change-Id: I073c3bff5860bab0b892fecbf61a41a8e9c5ec76
Reviewed-on: https://gerrit.instructure.com/13904
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
don't make PagniatedCollection::Proxy a struct

This had the unintended behavior of also making it Enumerable, iterating
over the one struct field, which made it quack like a AssociationProxy
(except of course, not working correctly).

refs #11409

test plan: no visible changes, specs should still pass

Change-Id: Ia45feee6f4d504517d9256948fe61009c0f13a73
Reviewed-on: https://gerrit.instructure.com/15323
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
close db connections after unlocking orphaned jobs

to fix problems with connection sharing across fork boundaries

test plan:
 * set worker_max_job_count: 2 in config/delayed_jobs.yml
 * queue up a ton of jobs
 * start a delayed jobs pool
 * it should not die off

Change-Id: I248743a401a8f434270b64da43f1da85d67cd8f1
Reviewed-on: https://gerrit.instructure.com/15312
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
improve the mathquill equation editor for tinyMCE, fixes: #11663

now looks like: http://cl.ly/image/3Q2R0l0n3e15

cleaned up styling so it used real dialog buttons.

refactored code to lazy-load math quill css, js
and font only when first needed.

Change-Id: I7cf0894222d7fb7d6fc2ddb09935b2c849bbd4ac
Reviewed-on: https://gerrit.instructure.com/14562
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
upgrade instructure-redis-store gem

The new version contains a fix to treat TypeErrors during unmarshalling
as a cache miss, to help facilitate the 1.8 -> 1.9 transition.

refs #11768

Change-Id: If8ddf3636fb7b09f60e48c36767cfc576b09a91c
Reviewed-on: https://gerrit.instructure.com/15322
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
fix reports running for all_terms

test plan
 * run report through ui or 
     run report with api passing empty string for term
 * report should work

Change-Id: Ib3a325209bc003c91e86d402f154232c8d62de5b
Reviewed-on: https://gerrit.instructure.com/15258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
VDD: notifications; closes #10896

The following changes have been made:
 - Assignment Created
  - students see the due date that applies to them
  - admins see "Multiple Dates"
 - Assignment Due Date Changed
  - students see the due date that applies to them;
    they receive no notification if their date doesn't change
  - admins receive a separate notification for each due
    date that changes, that they have access to;
    the message indicates which section or group applies
    (section-limited TAs will not get messages about due dates
    in sections they can't see)
 - Assignment Submitted Late
  - the message text does not change, but the student's overridden
    due date is checked
 - Group Assignment Submitted Late
  - same as previous

There were some bugs fixed along the way:
 - no longer send duplicate Assignment Submitted and
   Assignment Resubmitted notifications when an assignment
   is resubmitted
 - Group Assignment Submitted Late actually goes out
   (there was a typo in the whenever clause)

Test plan:
 - Create a course with two sections and a teacher
 - Enroll a student in each section
 - Enroll a section-limited TA in each section
 - Make sure everybody involved is signed up for "Due Date"
   notifications, ASAP
 - Using the API, Create an assignment with a default due date
   (in the past) and an overridden due date for section 2
   (in the future).  the assignment and override must be
   created in the same request (use the "Create an assignment"
   API and supply assignment[assignment_overrides]; it may
   be easier to use a JSON request body)
 - Verify that everybody got an "Assignment Created"
   message (use /users/X/messages)
   - the teacher should see "Multiple Dates",
     as should the TA in section 2 (because the default date
     is still visible to him)
   - the student and the TA in section 1 should see
     the default due date
   - the student in section 2 should see the overridden
     due date
 - "Due Date Changed" messages will not go out for assignments
   that were created less than 3 hours ago (by design, and not
   new with this changeset), so for the remaining items, you
   either need to wait 3 hours, or falsify created_at for the
   assignment you just made...
 - Change the default due date for the assignment, leaving it
   in the past
  - Everybody except the student in section 2 should get a
    notification with the new date
 - Change the overridden due date for section 2, leaving it
   in the future
  - everybody except the teacher and TA in section 1 should get
    a notification about the new date
  - the teacher and section-2 TA's notifications should indicate
    that they apply to section 2 (the student's should not)
 - submit the assignment as each student
  - the teacher should get one notification about each submission:
    the one about the student in section 1 should say it's late;
    the one about the student in section 2 should not
 - submit again
  - the teacher should get one notification about each submission:
    the one about the student in section 1 should say it's late;
    the one about the student in section 2 should not, and should
     be identified as a resubmission
     (there is no late-re-submission notification)

Change-Id: I26e57807ea0c83b69e2b532ec8822f6570ba1701
Reviewed-on: https://gerrit.instructure.com/14662
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
fix cross-shard merges that copy retired sms communication channels

test plan:
 * add an sms channel to a user
 * retire that channel
 * merge that user with a user in a different shard

Change-Id: Ibd24978c7456505b813961044b635b99b6beec6b
Reviewed-on: https://gerrit.instructure.com/15318
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
override the page view shard earlier

The create method is too late to assign a shard.

refs #11772

test plan: with cassandra page views enabled, the
PageView.process_cache_queue job should not fail with ReadOnly errors.

Change-Id: I39c2510be3a871bacb11f8fe5aa73def6af51e02
Reviewed-on: https://gerrit.instructure.com/15329
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
qti quiz import should create a question  bank for quiz

fixes a problem where quiz questions imported from a qti
file would always be added to the "Imported Questions"
bank, rather than a quiz specific bank.

test plan:

* import the qti quiz file from redmine
* go to quizzes -> question banks
* confirm that the questions were added to a question bank
 with the same title as the imported quiz

closes #11689

Change-Id: Id97ceef6f3db6c835ec8897ed94e6516e5b5b7c1
Reviewed-on: https://gerrit.instructure.com/15266
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
match LTI launch urls ignoring extraneous get query parameters

changed the context_external_tool url matching so that extra
parameters in the launch url will be ignored

however, if the tool url has parameters, then those have to match

test plan:

* Add an external tool to a course (e.g. http://example.com)
* Add a external tool item to a module, including query params
 in the url (e.g. http://example.com?parameter=value)
* Confirm that it still uses the right tool

closes #8903

Change-Id: I2f57d600dd64d479a80b188b9ab0100a389ec519
Reviewed-on: https://gerrit.instructure.com/15160
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
let (AssetUserAccess|PageView).for_users take ids

and take AssetUserAccess.for_users back out since it's redundant

test-plan:
 - all works as before
 - you can now do PageView.for_users([a_user_id]) without error
 - and AssetUserAccess.for_user(a_user_id)

Change-Id: Ic9abc5bc3a0d376ab4386a780e1fc74446efeab4
Reviewed-on: https://gerrit.instructure.com/15295
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
replace all .button(s) with .btn

in order to not have to support buttons with .ui-button AND
.button AND .btn classes this simplifies and and makes our
codebase more consistent by deprecating the .button class
with .btn

Change-Id: I4802d785a47b36aa477f302e6ac8c87715db8a62
Reviewed-on: https://gerrit.instructure.com/15194
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>