fixes JAWS reading of manage cog wheels for IE9

fixes CNVS-6842

test plan
- as a teacher with draft state enabled
- using JAWS and IE9
- go to assignments index page
- tab over to Assignment Group cog
- interact with cog menu and read the "Edit" menu item
- it should only read "Edit" menu item once
- repeat for Assignment cog wheel

Change-Id: If0efcdf46fa43d15da28d75a2626bae6c98e390a
Reviewed-on: https://gerrit.instructure.com/26156
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
properly sort by lastname, firstname

fixes CNVS-2330

Test plan:
  * make a course with students named "Ball Wall" and
    "Shmallart Wallart"
  * In gradebook2, "Ball Wall" should be listed *above* "Smallart
    Wallart"
    * only in chrome though... other browsers don't support the locale
      options we need
  * In gradebook.csv, "Wall, Ball" should be listed above "Wallart,
    Shmallart"

Change-Id: I7f20e81cc55b4ee962b2cca32cc48e6c49c48472
Reviewed-on: https://gerrit.instructure.com/26236
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
stringify audience field in conversations api if requested

fixes CNVS-9374

test plan:
 - call conversations api endpoints that return an "audience"
   parameter. See that it returns numeric ids for audience in
   the result.
 - make the same calls and add the
   "Accept: application/json+canvas-string-ids" header to the
   call. See that it returns strings ids for audience in the
   result (as well as all the other id fields).

Change-Id: I0ee5dea4ec50c7cecfd33c2112f26be904f46806
Reviewed-on: https://gerrit.instructure.com/26298
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
improve agenda view date range and load more accessibility

also reworked the flash message helpers so the screenreader
elements aren't animated because the animation would cause
screenreaders to read the elements multiple times. added a
polite screenreader message region.

fixes CNVS-9220

test plan:
 - check the header datepicker suggestion text is read by
   screenreaders when you type a date, such as "nov 15".
 - check invalid dates (such as "p") are read as invalid.
 - check that the updated date range is read when the agenda
   view finishes loading.
 - when "load more" is clicked, check that the first new date
   receives focus when the new dates are loaded.
 - when "load more" is clicked, check that the new date range
   is read when the new dates are loaded.

Change-Id: If706b80745caf56bf231b5b73d0f12512199b6ed
Reviewed-on: https://gerrit.instructure.com/26019
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
fancy page revisions

test plan:
 - with draft state disabled
   * ensure the page revisions still behaves as would be expected
 - with draft state enabled
   * navigate to a page
   * using the gear menu, select 'View Page History'
   - the revisions list should open with the latest revision selected
   * the 'Next' and 'Previous' page buttons should work
   * restoring a revision should work
     - should restore title, url, and page content
     - restoring a revision that is 'Same as latest' is not allowed
   * clicking the 'X' next to Revision History or the page breadcrumb
     should navigate back to the page view

 - any browser windows opened to the revisions page should show the
   alternate page, if refreshed (when transitioning to/from draft state
   being enabled)

closes CNVS-8486

Change-Id: Ie22bf82ead396cbfa5a206c3a1234859cb2df7ff
Reviewed-on: https://gerrit.instructure.com/25922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
adds validation for name to assignment quick add

fixes CNVS-9495

test plan:
- with draft state enabled
- from assignment index page as a teacher
- click quick add button for assignment
- save without title
- verify that the error message renders
- also verify that you can save assignment with a title from quick add window

Change-Id: If7359af56656b9e3dd6a33b9db9d6638c8b3f175
Reviewed-on: https://gerrit.instructure.com/26281
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
stub on the version-appropriate association class

refs CNVS-9166

rails2.3 calls it AssociationProxy, rails3 just calls it Association.

Change-Id: I28d52d0a50a7f8d3269a92c64676c171c11a9239
Reviewed-on: https://gerrit.instructure.com/26233
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
boot fix for rails3 and compass

refs CNVS-9166

Sass::Plugin isn't automatically available by this point in the rails3
boot. but to my knowledge, it's late enough that it *can* be available,
so just require it.

rails2 has already loaded it by then, so this is a no-op there.

Change-Id: I14b6c160a4f35a9e711c4158418aa8a48e7a4c1f
Reviewed-on: https://gerrit.instructure.com/26232
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
bump rails3 from 3.2.14 to 3.2.15

Change-Id: Ie7c441ad3fbbae6bca28b7648187c2cf58b0ca87
Reviewed-on: https://gerrit.instructure.com/26230
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
improve accessibility of undated events list

fixes CNVS-9231

test plan:
  * using a screenreader, navigate to calendar2 as a
    user with at least one undated event (e.g. a teacher
    with a due date-less assignment);
  * navigate to the unread events header, and click it;
  * verify that a loading message is read;
  * verify that when the undated events list loads, the
    first event is focused.

Change-Id: Id537e1359cb80c9b43805a4c2894a97f3b08cbf5
Reviewed-on: https://gerrit.instructure.com/26289
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
send selected text on LTI launch

test plan:

- Install a tool that uses the rich text editor
- Select some text in the editor
- Launch the tool
- Ensure that canvas sends a "text" param with the selected text

Change-Id: I267b07f3ec5033d84c11e52b873fc36011602198
Reviewed-on: https://gerrit.instructure.com/24909
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
really fix frequent gb2 spec failure

fixes CNVS-9533

Test plan:
  Make sure the section-selector dropdown in gradebook2 still displays
  properly

Change-Id: I8c172b6069e124ddd3e2bdf2376563e288392ab0
Reviewed-on: https://gerrit.instructure.com/26322
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fix submission details for test student in gb2

A.K.A coffeescript's default === thing is lame.

fixes CNVS-9523

Test plan:
  * go to gradebook2 in a course with a test student
  * make sure you can view submission details for real students and the
    test student

Change-Id: Ie032a9d0e7bd1bba0c1cdef7a0fa12e758778bf0
Reviewed-on: https://gerrit.instructure.com/26327
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
switch from rails_xss plugin to gem

fixes CNVS-9384

but maintain our patchup from 0fe0ba0

Change-Id: I828fdd8ef64ca04d10d2ef5b925d07243fb65be7
test-plan: specs
Reviewed-on: https://gerrit.instructure.com/26229
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
only use fake_rails3_routes for rails2 shimming

refs CNVS-4704

Change-Id: I7fe2a86d7aa9f37499e19a6a54ea8159e8fb3df6
Reviewed-on: https://gerrit.instructure.com/26329
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
draft state super specs

fixes CNVS-8941

test plan
- specs should pass; a little bit faster :)

Change-Id: I6c9b4f7204f601fd3c9dc6f16f85d4b6d5c0503f
Reviewed-on: https://gerrit.instructure.com/25512
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
add accessiblity to module item edit admin gear

This allows accessiblity users to access a module items menu gear where
they can add a module item, edit the module or delete the the module.

Fixes CNVS-6047

Test Plan

While using JAWS and VO
1. Go to a modules page as a teacher so you can see the edit module
admin gear.
2. Using accessiblity tools, you should be able to click on the "Add
module item" button by navigating to the admin link gear and clicking
on an item in the menu.

Change-Id: I38dd66be1515113fafa6343ca79446fdb6a205cb
Reviewed-on: https://gerrit.instructure.com/26269
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fix object object error when creating an account user

When adding a new user to and account, there is a modal form. If you
fill out incorrect errors, the errors should have a readable message.

fixes CNVS-1580

Test Plan

1. go to the accounts new user form.
2. don't enter anything in
3. there should be little read error boxes with readable error
messages.

Change-Id: I4d6f24d734bac99d3b4655fa33dbd1fe09283715
Reviewed-on: https://gerrit.instructure.com/26188
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
added some more data to agenda view events for screen readers

fixes CNVS-9226

test plan
- use a screen reader to read a variety of event in agenda view. be sure to
 include assignments, quizzes, appointment groups, vdd assignments, discussions
- ensure that the type of event, event title, event context (ie, course name),
 and event time (with 'due' or 'start at' prepended as appropriate) are read

Change-Id: I4cbf0664be5ce87851e3826da298ecb6e46a8026
Reviewed-on: https://gerrit.instructure.com/26227
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
improve accessibility of calendar2 buttonset

fixes CNVS-9218, CNVS-6672

test plan:
  * navigate to calendar2 and, using a screenreader,
    verify that:
  * the month/week/agenda/scheduler buttons read as radio
    buttons and that their selected state is properly read;
  * each button is only read once;
  * the month and week buttons warn the user that their
    views are not accessible;
  * all of the buttons render the browser's default focus
    style.

Change-Id: Ib8df18356a20d690d7749a23f16ac8a651a9a47a
Reviewed-on: https://gerrit.instructure.com/26306
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>