drop the unencrypted token column on access_tokens

closes #8943

now that all access tokens have the crypted_token field filled in, we
can drop the unencrypted column.

test plan: both before and after running the migration, you should be
able to use existing access tokens to make api calls, and create new
access tokens.

Change-Id: I83cfb2342ad2302bb7b43aabc528341d1d265920
Reviewed-on: https://gerrit.instructure.com/15601
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Icon replacement for all wizard boxes

To test:

Open wizard boxes for courses, ePortfolios, calendar and assignments

Change-Id: Icee84b57fdb18189c5c10d1ed0e7c89f9959f2cf
Reviewed-on: https://gerrit.instructure.com/15346
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
vdd on dashboard right side closes #12003

test plan:
1. create assignments with multiple due dates that
   show up in todo, coming up, and recent feedback
   for the teacher and students
2. log in as the teacher and students (one in a
   section with the assignment override) and
   note the right side-bar displays the correct
   due date for students, and "Multiple Due Dates"
   for the teacher. 

Change-Id: Ibdd99e9a53a1945e201b41f4c2fd5a461582525b
Reviewed-on: https://gerrit.instructure.com/15494
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Replaces non-retina png sprite with icon font for new dashboard

(Could be cleaner if I could use @export to reuse the existing icon classes in this style sheet -- is this possible?)

Change-Id: I8ba232365f3830dfc57c78c45463d89843937269
Reviewed-on: https://gerrit.instructure.com/15408
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
update enrollments api for new course roles engine

test plan:

* check the api to make sure that role_name for
 enrollments can be set on create

closes #11742

Change-Id: Id5c49a86be20fc4cc66fc5dd19614c3cf24fad1e
Reviewed-on: https://gerrit.instructure.com/15657
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Icon replacement for announcements and discussions

Change-Id: I26e4caf385195beed213b872797eaaf01a3ddc4e
Reviewed-on: https://gerrit.instructure.com/15317
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Icon font replacement for Modules section

To test:

Go into a course, click on Modules and review functionality

Change-Id: Ib1f61c694a7e14b9cc4b5691d1d436028e7f015d
Reviewed-on: https://gerrit.instructure.com/15505
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
kill old new group profile page

Change-Id: I0d0f7a624a7ab6676823dd2c01fe634263cef844
Reviewed-on: https://gerrit.instructure.com/15337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
quizzes: notify user if disconnected during quiz

closes #11784

Test plan:
  * Start taking a quiz
  * Do something to interrupt your AJAX requests
  * See the ominous warning message

Change-Id: I3faf6a2e624d2838a605061fb83e6b990cafda36
Reviewed-on: https://gerrit.instructure.com/15623
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Reviewed-by: Amber Taniuchi <amber@instructure.com>
improves speed of student competency report (account_reports)

refactor the student_assignment_outcome_map report in GradeReports
to directly query the database via a SQL query. this should significantly
speed up the entire report.

test plan:
  * given the same large set of data (e.g. beta vs production),
    the Student Competency report should be much faster.
  * some students may be missing from the new report, if
    they have no pseudonym associated with the account.
    The new way (removing students without pseudonyms)
    is the Right Way.
  * Also note that we added an sis_user_id column to the
    new version of the report. This is to aid schools who
    need to line up the report with their internal records
    (Thanks Rob Orton)

fixes #11138

Change-Id: I3db33971a8d81565e718d886a0e2a428dba2272e
Reviewed-on: https://gerrit.instructure.com/15472
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
don't use mobile cookie to sniff who to show mobile login to

cookies didn't work because of oAuth flow
this just sniffs user agent

This (partially) reverts commit 19262519741d46bc548edb9fde25cee4514ab7a9.

Change-Id: I135ee789ba2da59656ddb94670420852d1aa14a5
Reviewed-on: https://gerrit.instructure.com/15674
Reviewed-by: Mark Suman <marks@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
speed up views/quizzes/_display_question.html.erb rendering

Fixes #11973

Previously, QuizzesHelper.answer_type returned an OpenObject, which when
used in quizzes/_display_question.html.erb and subsequent partials,
caused a slowdown.

Test Plan:
  - Check out master and start a server.
  - If you don't have a quiz, create one.
  - Try to edit the quiz by using the "Edit this Quiz" button.
  - Watch the render times for display_question.html.erb and record the
    render times.
    - script/server | grep 'display_question.html.erb' is useful.
  - Repeat by refreshing the page a few times so you get a good sample
    size ( 5 or 6 times is good enough )
  - Check out this commit
  - Watch the render times again like you did previously for master
  - Render times on this commit should be faster than master.
  - You should be able to edit the quiz as usual.

Change-Id: I2ab080c80ab233e7b5fe6773f9f2c033e4dfcbad
Reviewed-on: https://gerrit.instructure.com/15663
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Amber Taniuchi <amber@instructure.com>
Icon replacement for Quizzes

To test:

Create, edit and delete a quiz. Add and remove questions.

In a couple of cases, I used retina-ready bitmap images instead of the icon font.

Change-Id: I12d26a5b76455c0d31da669a525168c31d26c4f8
Reviewed-on: https://gerrit.instructure.com/15609
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
add assignment overrides to ical calendar feeds

This adds assignment override information to the iCal calendar
feed. Student calendar feeds should only contain the latest
override that applies to them. Teachers should see the original
assignment and all the overrides with the override title in
parentheses, similar to how it is displayed in the calendar2
interface.

fixes #11787, #11788, #11789

test plan:
 - create an assignment with an assignment override for a
 course section that has a student
 - subscribe to the student's calendar feed and see the
 assignment event has the section's override date
 - subscribe to the teacher's calendar feed and see both the
 original assignment event and the override events
 - check for regressions on non-overridden assignments

Change-Id: I3cf7eacc40bbc87f693aec463a84670ca9e30063
Reviewed-on: https://gerrit.instructure.com/15641
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Marc LeGendre <marc@instructure.com>
add cross-shard capability to student competency report

relies on "improves speed of student competency report"

If a user with the ability to make API calls on several domains
(such as a site admin) tries to access the student competency report
via an API call, but does so on a domain that is not the default
domain for the account, then the "improves speed of student
competency report" patch will fail.

test plan:
  * Test that the student competency report will work for API calls
    not on the default account domain.

    e.g. curl -H 'Authorization: Bearer <token>' \
    https://canvas.instructure.com/api/v1/accounts/<account_id>/reports/student_assignment_outcome_map_csv

    (this attempts to access this report on the "canvas" domain)

refs #11138

Change-Id: Ie7773b0cc403c0d1e372e44095faa87c07156c85
Reviewed-on: https://gerrit.instructure.com/15692
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
add presenters folder

Added a presenters folder so that complex view logic that doesn't fit
within the scope of a helper can have its own place in the project tree.

Change-Id: Ibd4caa969b94b33b10f0a5afd1f2dd7163bc8bf7
Reviewed-on: https://gerrit.instructure.com/15347
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>