spec: fix teacher speed grader spec fix

wraps clicking the link to the gradebook in a "expect_new_page_load"
call in order to avoid race conditions for elements to become stale.

Also adds an ID to the gradebook link in speed grader because the
previous selector was based on an element with two links, this stops the
chance of Selenium selecting the wrong list inadvertently causing the
spec to fail.

test plan:
  - specs pass.

Change-Id: If6cd81ac3a801fcbab1a00814d6dac32bf670717
Reviewed-on: https://gerrit.instructure.com/18748
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
spec: mark two specs pending in 1.8

a bug with mocha stubbing class methods causes these to fail in 1.8

Change-Id: I2f4900f2786ddcbb1e5cb74a1ad143c92df937e1
Reviewed-on: https://gerrit.instructure.com/18779
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
revised plugins page with better ui

fixes CNVS-4666

test steps:
- visit /plugins as an account admin
- ensure that the ui and functionality of the page is ok

Change-Id: I462074dbcfae7b6344891b88455ec7ff2608c59b
Reviewed-on: https://gerrit.instructure.com/18650
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
bootstrapified the edit group form on the groups view

also updated the 'Start a New Group' and 'View Course Roster'
button icons with the new style

fixes CNVS-4574

test steps:
- visit the groups page
- add a group
- hover over the group name on the left side and ensure
  the buttons on the right look good
- click on the 'edit' button while hovering over the name
- click 'cancel' and make sure it works
- modify the name and click 'save' and make sure it works

- log in as a student
- visit the course groups page
- confirm that the buttons on the right are using the new bootstrap
  font icons

note: there is a regression issue with the name removing the link
      after saving the group name

Change-Id: I8212828c5545d3166c52fcd33f194ad6887c2d91
Reviewed-on: https://gerrit.instructure.com/18694
QA-Review: Cam Theriault <cam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
restore border and header styles on the collaborator picker

fixes CNVS-4052

test plan
 - Go to the collaborations page for a course and check the
   collaborator picker interface for proper styling.

Change-Id: I9f78db713308540f83e1920a6ec6af6d699fc7b6
Reviewed-on: https://gerrit.instructure.com/18505
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
make Account.get_special_account re-entrant for creation

for if a plugin hooks into account creation, and calls
Account.get_special_account

Change-Id: I3a46e82f1396ca755a366f49ca62e0df144e809e
Reviewed-on: https://gerrit.instructure.com/18642
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
don't warn browsers we don't recognize, fixes CNVS-4754

treat minimums as a blacklist, and assume that anything we don't recognize
is supported

test plan:
1. load canvas in unsupported browsers (e.g. IE 8), confirm you get a
   warning
2. load canvas in supported browsers (e.g. IE 9), confirm you don't get a
   warning
3. load canvas in an unknown browser (e.g. Android), confirm you don't get
   a warning

Change-Id: I87ed90e97d031431f6a48c814dfa874b785ea777
Reviewed-on: https://gerrit.instructure.com/18801
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
add course code to calendar feed items

fixes CNVS-3504

the course code finding logic is a "best effort" affair. it should
be able to find codes for events one step removed from a course. i
only promise that it will find course codes for:
- course events
- group events for course groups
- course assignments

test plan
- create an assignment
- create an event for a course
- create an event for a course level group (as opposed to an
  account level group)
- ensure that the calendar feed items for these things includes
  the course's code in the summary

Change-Id: I0a9af6b6b1d963be7c3741a403bf66757c5900da
Reviewed-on: https://gerrit.instructure.com/18719
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
spec: don't use user for user_id in communication_channel_model

fixes CNVS-4791

it might work with ruby 1.8.7, but it sets user_id to 1 in 1.9
which lets duplicate paths through sometimes

anyway, it's redundant because communication_channel_model sets
channel.user to @user already

Change-Id: I7b4a8f24efdbf6022a57a77145ef91325153ffb1
Reviewed-on: https://gerrit.instructure.com/18747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
set hidden tracking fields, refs #CNVS-4198

helper commit needed for a plugin

Change-Id: I4de2ce865ed064853233cf46c170b50ea03037d6
Reviewed-on: https://gerrit.instructure.com/18760
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Product-Review: Joe Tanner <joe@instructure.com>
QA-Review: Joe Tanner <joe@instructure.com>
fix display of conversations search results.

fixes CNVS-4729

test plan:
  * as a user in a course, navigate to the inbox;
  * attempt to locate a recipient for a new message
    using the "To" field and verify that the results
    are spaced properly and that the active result (e.g.
    the one w/ the blue background) text is light enough
    to read;
  * search existing conversations using the "filter" text
    input and verify that its results also display
    properly.

Change-Id: I7564d860e8ff0c6989ea65dfd885a69f38b7b0f6
Reviewed-on: https://gerrit.instructure.com/18813
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Bootstrap: fix layout of Course Details tab

fixes CNVS-4744

test plan:
 - go to course settings / "Course Details" tab
 - click "Edit Course Details" button
 - ensure layout/alignment of things is reasonable
   - see screenshot attached to CNVS-4744

Change-Id: I7305d5770a787d6f7aa1c1daf46ce113054b3eaa
Reviewed-on: https://gerrit.instructure.com/18707
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
bootstrap: fix layout of account settings tab

fixes CNVS-4762

test plan:
 - go to account settings tab
 - ensure things line up
   (see screenshot on CNVS-4762)
 - ensure styling is consistent

Change-Id: Id80136b7834c8b8c03207151f0d6ba36fe3c55d0
Reviewed-on: https://gerrit.instructure.com/18762
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fix lock scope to accept 0 params

refs CNVS-4706

Change-Id: I792e1bd911129bb3164b3972c8fafa25d85b3161
Reviewed-on: https://gerrit.instructure.com/18811
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
sort CoursesController#users correctly

refs CNVS-4115

test plan:
 * with postgres, ensure that it sorts case insensitively, and with
   shorter last names first

Change-Id: I7eff0f1832d4494909be62f6d0e8f7baea0aee08
Reviewed-on: https://gerrit.instructure.com/18067
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
bootstrap touches for content migration choose items forms

test plan:
* confirm that the form for choosing items looks better when
 importing a migration and when copying a course

fixes #CNVS-4696

Change-Id: Ibecc691a8c3164255a379a00e3ba26e75b6a078f
Reviewed-on: https://gerrit.instructure.com/18796
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
cross-shard conversations with multiple tags

fixes CNVS-4763

test-plan:
 - create two users on different shards that can message each other
 - create two shared contexts between them (e.g. both are in each of two
   courses)
 - try and initiate a conversation between them
 - the conversation should be initiated without error and the
   conversation tagged with both contexts

Change-Id: I396475e0525873edbfff6c6f2c9777e0071947cc
Reviewed-on: https://gerrit.instructure.com/18735
QA-Review: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
bootstrap view/edit grading scheme dialog touches

test plan:
* go to edit course settings
* enable course grading scheme
* click set grading scheme
* click to edit the grading scheme
* confirm that the rows are aligned better

closes #CNVS-4697

Change-Id: I7344931c3808cc537ebfc314e7ef0f6ebd2796c2
Reviewed-on: https://gerrit.instructure.com/18770
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fix typo on accounts course page

fixes CNVS-4266

Change-Id: Id57c0680560abf127bda77f154b7297315650f3c
Reviewed-on: https://gerrit.instructure.com/18761
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
round grades on students grade page to two decimal places

test plan:
  - As a teacher, create an assignment with grading type of 'points'
    (this is the default when you create a new assignment).
  - Add a grade for a student in the course from the Gradebook. Then,
    open the console and change the submission score to something with
    a large amount of decimal places like "100.546789" and save!
    like so:
      assign = Assignment.find(1) # Replace this with your assignment's id
      sub = assign.submissions.first
      sub.score = 100.546789
      sub.save!
  - As the student, view the Grade Summary page. You should only see two
    decimal places instead of many decmimal places and the score should
    be visible.

fixes CNVS-4185

Change-Id: Iaf61349b69fffaf57440ece7f29cf96024f7ffbd
Reviewed-on: https://gerrit.instructure.com/18544
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>