don't limit css bundle stylesheets to "screen"

include_stylesheets is a jammit method that
ends up calling stylesheet_link_tag which by default
says media="screen" this tells it to say media="all"

if you want part of your stylesheet to target a specific
media (i.e., print) put that in a block like:

@media print { /* do stuff */ }

Change-Id: I9513d1e01d437a3ba1bf61b9cd79781166a97d22
Reviewed-on: https://gerrit.instructure.com/15705
Reviewed-by: Chris Hart <chris@12spokes.com>
Tested-by: Jenkins <jenkins@instructure.com>
fix and improve the page view cassandra transition infra

Store the page view method on the individual object at creation, so we
get the right method still when saving.

fixes #CNVS-868

test plan: with the global Setting set to cache page views, but a
specific shard set to cassandra page views, make sure that page views
created on both that shard and another shard go to the right place.

Change-Id: Ib236c8cd4401a919978423f777c5e95ce4f1ee85
Reviewed-on: https://gerrit.instructure.com/15825
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Tested-by: Clare Hetherington <clare@instructure.com>
Misc remaining icon replacement

This commit contains the following tidy-up work:

- Replaced down-arrow background image in main dropdowns (Courses and Assignments dropdowns)

- Icon replacement for some pages views I missed

- Icon replacement for user profile contact methods (email, SMS)

- Replaced mail icon in student activity report view

- Replaced small calendar icon in courses right-hand menu

- Updated Rails helper to replace button images in Course > People right column

Change-Id: I90feb1160c61d60a72bb9c0fa8747bf9e134bc3a
Reviewed-on: https://gerrit.instructure.com/15730
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
search pseudonyms from all shards for User#mfa_settings fixes #CNVS-1339

test plan:
 * create users (with a login in an account) on two shards, then merge
   them together
 * enable MFA (optionally) on the account in the shard that the user
   did not end up on
 * log in as the user
 * on the profile settings page, the link should be there to
   configure MFA

Change-Id: I95468243647e3fb8f90d23b2c686c221fee8ee00
Reviewed-on: https://gerrit.instructure.com/15791
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
Icon replacement for assignments page

Change-Id: I5fac4de9738ca49e502603b39f8df71a12af5d90
Reviewed-on: https://gerrit.instructure.com/15357
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
don't restrict course admins to course/section dates

Test Plan:
 * Add a course to term with no start/end dates
 * Add a teacher to the course and set start/end and check the checkbox to restrict users
 * As the teacher (not an account admin) go to the course
 * The teacher should still have access
 * Students shouldn't have access

closes #cnvs-1189

Change-Id: I7c4d0d0d5075d0c52b5fc190f62b69fc8f0d5819
Reviewed-on: https://gerrit.instructure.com/15799
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
hard conclude a course when concluding

The conclusion of the people is that hard concluding
is the way to go for now

Test Plan:
 * Publish a course and have students in it
 * Conclude the course
 * All users, teachers and students, should be concluded and not have access

closes #cnvs-1215

Change-Id: I4e5d78e00e5985fcab53857f7ce4c5a25f8a9118
Reviewed-on: https://gerrit.instructure.com/15835
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fix character encoding issues in academic benchmark import

cropped versions of the description are used in some titles for outcomes, and
that cropping needed to be made utf-8 aware.

fixes #CNVS-1206

test plan:
- in ruby 1.8.7
- import a state like utah from academic benchmark
- it should import without errors
- specifically, an outcome group which has a description with a utf-8 character
  which crosses the 50-51 byte boundry in the string should import without an
  error.

Change-Id: I80fd2a38c8baec50aed2ff28deb76f2485b54241
Reviewed-on: https://gerrit.instructure.com/15830
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
fixes query parameter in user api

test plan
 * make an api call passing user[name]
 * results should only include user(s) with 'name'

Change-Id: I36679f40ce9104f20ea2031568ee0b8d15c623c6
Reviewed-on: https://gerrit.instructure.com/15843
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
dont hit scribd from the files_controller

refs #CNVS-1267

this reworks the thumbnail_url method
on the attachment model to just use
the cached scribd thumbnail if available
and to return nil if not (in the case
of a scribd document).

also did a bit of refactoring and removed
some trailing whitespace.

TEST PLAN:

create a scribd doc attachment to an assignment
submission.  It should not hit the Scribd API
at all during the course of the request.  If
the tester does not have a way to monitor network traffic
than this could still be confirmed by ensuring the
request response time isn't significantly longer
than uploading a NON-scribd attachment

Change-Id: I324a99ec94e2efdeb8d1ead80ee0cd92eec036ac
Reviewed-on: https://gerrit.instructure.com/15821
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
optimize varied due dates for when there are no overrides

[Fixes CNVS-1945]

Previously, we were executing a lot of unnecessary queries
in AssignmentOverrideApplicator#overrides_for_assignment_and_user
when the end result was coming up as an empty array in the case
of no overrides. We can predict this outcome by simply checking
if an assignment has overrides before trying to determine if a user
has matching enrollments.

With caching disabled for this method, hitting the assignments
listing as a student with 5 assignments and no overrides ran 46
queries. With this change, only 27 queries are made (41% fewer).

Change-Id: I42d6c81fe1a271e5fdea89e148417833312c83c3
Reviewed-on: https://gerrit.instructure.com/15838
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
integrate cassandra to run in a parallel test environment

Change-Id: Ic04ee524be774f89aba0b3c0186dc970cde3c329
Reviewed-on: https://gerrit.instructure.com/15640
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
restore warning icon to new icon style when previewing a quiz

Restores a header in app/views/quizzes/take_quiz.html.eb to the new icon
set. The button style was overwritten as part of the "One Quiz Question
at a Time" feature in f4b8c3c8eff3c2992226e885c2e69dfc493d9a2e.

Added global fix because this impacts all headings across the app

- although there are very few instances right now where an icon is used with a heading

test plan:
  As a Teacher, edit (or create) a quiz.
  Click 'Preview' to preview the quiz
  The icon next to 'This is a preview of the draft version of the quiz'
  should have the new, black icon, not the old, yellow icon.

Change-Id: I3e47f9a506e8a4f5163c30340df8440e7b01ead1
Reviewed-on: https://gerrit.instructure.com/15753
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
fix spec failure on ruby 1.9

this commit fixes the ruby 1.9 nightly build failure for
"AssignmentsApiController should take overrides into account in
the assignment-created notification for assignments created with
overrides"

Change-Id: I5bf1e1d3afa7f62ee0427e5131bb0d3f8ecc0890
Reviewed-on: https://gerrit.instructure.com/15919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
filter out page views with the same created_at ruby side

This avoids a sometimes-nasty query plan by removing request_id from the
order by clause, at the expense of selecting some duplicate rows and
having to query cassandra about them.

Also remove references to last_request_id since it's no longer used.

test plan: the page view cassandra migrator should still run, and not
process duplicate page view entries (as before).

refs #CNVS-868

Change-Id: I5933c695cc5f4c519f89362af315595221a70fdc
Reviewed-on: https://gerrit.instructure.com/15879
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
maintain rubric-outcome associations in course copy

the looked like they were being maintained, but the content tag links between
rubric and outcome and between assignment and outcome were not being generated
properly after a course copy.

fixes #CNVS-1274

test plan:
- create and account level outcome and a course level outcome
- in the course create two assignments, with rubrics
- in one, add the course level outcome
- in the other add the account level outcome
- grade a student with the rubrics
- ensure that alignments and mastery look correct
- copy the course
- in the new course grade a different student
- ensure that alignments and mastery look correct

Change-Id: I04c240256f007791613e4f29b8288f1bc7729849
Reviewed-on: https://gerrit.instructure.com/15908
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
updated version of mime-types gem (needed for newer Mechanize)

refs #CNVS-122

Change-Id: Ic82694c46fe2f58b1be744afba180c15080928f2
Reviewed-on: https://gerrit.instructure.com/15846
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
course role support in sis import/export

closes #CNVS-1078
test plan:
 - create custom roles in an account
 - sis import:
   - put the custom role name in the 'role' column in a SIS
     enrollment import, and ensure the role_name is assigned
     in the Enrollment
   - ensure only valid roles can be assigned this way
     (must be defined in the course's account or parent
      account, and must not be inactive)
  - sis export:
   - ensure custom role names are exported in the 'role' column
     of the SIS enrollment export and provisioning reports

Change-Id: Ib8b4c129d451023fa51c73747baadd42cb305338
Reviewed-on: https://gerrit.instructure.com/15868
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
wrap quiz#submissions_for_statistics in a slave block

Change-Id: Ib387e6f4c8fb9631f2c6cc7b7fa52d3287e811f6
Reviewed-on: https://gerrit.instructure.com/15951
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
send painful query to slave

Change-Id: I9d84220347cdc4f630250c26040ed5e4d2407f72
Reviewed-on: https://gerrit.instructure.com/15949
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>