add speed_grader_url to the quizzes api

Test plan:
  - As a teacher, you should be able to see "speed_grader_url" that
    goes to the correct url when you query the quizzes index api and the
    quiz show api.
  - As a student, you should not see the "speed_grader_url" key when
    you query the quizzes index api and the quiz show api.

Change-Id: I9a827846fcf201d031715567e8af1f6ffda4a343
Reviewed-on: https://gerrit.instructure.com/30127
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
fix gradebooks_controller_spec for rails 3

Change-Id: I927859cd69aecf78c593cc5507144a01fc7340ed
Reviewed-on: https://gerrit.instructure.com/30094
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
additional partner data for kaltura

fixes PS-931

test plan
*upload file on files page
*additional partner_data should be available on kaltura
*should include root_acount_id, context_code

Change-Id: If0849dc373acdbbc56cae30434c48adfb016d8c7
Reviewed-on: https://gerrit.instructure.com/28662
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
spec: check image pending

Change-Id: Ib1c4c3de05949ff44a69435583738fe607b9bc8e
Reviewed-on: https://gerrit.instructure.com/30222
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Hannah Bottalla <hannah@instructure.com>
Product-Review: Hannah Bottalla <hannah@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Hannah Bottalla <hannah@instructure.com>
layout changes for srgb

- i18n's everything
- shuffles content a bit
- adds some styling
- added empty states for the various sections rather than just hiding them
- also removes jquery patch that adds "disabled" class when disabling an
  element

closes CNVS-9390

test plan
=========
the layout should look nicer
tests should still pass
general regression tests of srgb

Change-Id: Iba2c0239d2e0312e26225652190c5280120598fd
Reviewed-on: https://gerrit.instructure.com/29845
Reviewed-by: Matthew Irish <mirish@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
add stylesheet for message students dialog to srgb

fixes CNVS-11066

test plan
=========
- navigate to screenreader gradebook and select an assignment
- click the "Message Students Who..." button
- verify that the dialog is styled the same as the one for the same
  assignment in GB2

Change-Id: I6006c31047f0fe3dcc6ab8289b983a2ca1713dd4
Reviewed-on: https://gerrit.instructure.com/30057
Reviewed-by: Matthew Irish <mirish@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
QA-Review: Matthew Irish <mirish@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
another datafixup before adding FK

Change-Id: I3a1252f03f7c659379fb929e826edc64937f022e
Reviewed-on: https://gerrit.instructure.com/30217
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
conversations: handle ghost conversations

fixes CNVS-11205

I don't know how we're still getting empty conversations
in people's inboxes, but we can't let it break everything.
See https://gerrit.instructure.com/#/c/27121/
and https://gerrit.instructure.com/#/c/26059/ .

test plan:
  * In your Rails console, run something like this:
    user = User.where(name: 'banderson@instructure.com').first
    deleted = user.all_conversations.where(message_count: 0).limit(1)
    deleted.update_all(last_message_at: Time.now)
  * Open your user's inbox in old conversations.
  * Click on each of the conversations in the inbox and verify that the
      corresponding messages load in the right pane.

Change-Id: Ia605ac0b2392ca4b1983bca291d4685a5a818f7a
Reviewed-on: https://gerrit.instructure.com/30159
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
do not show warnings when unique_id different case for same user

fixes SIS-162

TestPlan
----------
  - import user.csv with a different case than existing user' unique_id
  - no import warning errors should be shown

Change-Id: I653bcc7c2ace9953fe74ada0c0ab7da32c65662c
Reviewed-on: https://gerrit.instructure.com/30151
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Eric Adams <eadams@instructure.com>
doesn't reset collaborator picker list when loading more

fixes CNVS-8264

test plan
- have a course with more than 50 users (more than 100 is better)
- navigate to the "start a new collaboration" page
- scroll to the bottom of the "collaborate with" user picker
- the users should load in groups of about 50 when you approach
 the bottom of the list
- ensure that when all users are loaded and you've reached the
 bottom of the list, you can scroll back to the top and no users
 have been removed from the list

Change-Id: Iff29f880375872afd6a48bf606e93f39236707c8
Reviewed-on: https://gerrit.instructure.com/30130
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
namespace all of quiz into quizzes module

This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.

Test plan:

Full regression test on all quiz related items

refs CNVS-10457

Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
remove embedly

this was used by collections (which no longer exist)

Test plan:
  make sure there are no references to embedly on the account settings
  page

Change-Id: Ia599877523a26560392ca554a2e760930f65deb6
Reviewed-on: https://gerrit.instructure.com/30148
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
show points possible/due dates for unpublished module items

fixes CNVS-10916

test plan:
 - in a course with draft state enabled,
  - create unpublished assignments, quizzes, and graded
    discussions with due dates and points possible
  - ensure this information shows up in the modules page

Change-Id: I2674688fd0e66763094aa66192054b7f29d33663
Reviewed-on: https://gerrit.instructure.com/29803
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
rails3: revert to rails2 behavior for exceptions in tests

Change-Id: If8969692bfe2e3cce63ca7bd6a56b8356cb725aa
Reviewed-on: https://gerrit.instructure.com/30282
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
fix page view on cassandra for rails 3

 * small fix for creating - need to set created_at
 * override finder methods more directly (in rails 3, they all go
   through relation, which we can't override just for PageView)

Change-Id: I33476eaf67180a45c26b70110ca1f9801dff8f44
use api_find for several cases in CoursesController

most importantly #show, but also for finding accounts and terms
when creating/updating a course via the API

Change-Id: I185219db62ead4dc1d04b5b7e91b945a0d39ecc7
Fix links in RCE using IE10

Closes CNVS-11280

The patch for CNVS-5644 (https://gerrit.instructure.com/#/c/29651/) did
not work for IE10 because it relied on IE conditional compiling which is
done using comments, and our optimizer was stripping out those comments.

Sadly, I've had to resort to using eval() to actually run the CC, but I
guess in this case it isn't as evil as the hack itself, so it's okay!

TEST PLAN
---- ----

Please refer to CNVS-5644 for the test plan, verify it works for IE10.

Change-Id: Icb4881b7a8036c34564e3ee379bdbf427898e072
Reviewed-on: https://gerrit.instructure.com/30290
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
only set front page when front page changed

test plan:
 - with draft state enabled
 * create two pages (A & B)
 * set page A as the front page
 * update page B (using the api)
   - update fields (e.g. title, body, etc)
   - include wiki_page[front_page]=false
 * navigate to ../pages
	 - page A should still be set as the front page

closes CNVS-11266
closes gh-405

Change-Id: Ifc22c715a36dc069430f6999c41128ea35b32c83
Reviewed-on: https://gerrit.instructure.com/30232
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
fix selenium after hooks for rails 3

replace append_after with after so the ajax requests are
completed before the teardown_fixtures hook is run

Change-Id: I2ae3d5470bf6a0b5b6ab6574e818eb1df6d416d5
Reviewed-on: https://gerrit.instructure.com/30293
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
ActiveSupport::Callbacks::Suspension

refs CNVS-9522

replace our hokey ActiveRecord::Base.suspend_callbacks implementation
with something that integrates nicely with ActiveSupport::Callbacks in
general, as a gem.

include it into ActiveRecord::Base and use it to implement
save_without_callbacks for rails3 (rails2 still needs to do it the way
we had it before, because the notifications callback isn't handled
through ActiveSupport::Callbacks).

test-plan:
 - make sure ActiveRecord callbacks still run in most cases (e.g. after
   creating a course through the UI, it should have a value in the uuid
   column in the database)
 - make sure callbacks don't run while suspended (e.g. have a user
   enrolled in two courses. call user.delete_enrollments. both
   enrollments should be deleted, but only one delayed job for due date
   caching should be created)

Change-Id: Iecd1cc0346e218261677d16ee44bae9cb9149ddd
Reviewed-on: https://gerrit.instructure.com/29809
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>