admin-links: open menu on enter or space

fixes CNVS-8154

test plan:
  * open a page with a cog menu, such as assesments
    or discussions (JAWS testing is important)
  * bring your focus to the cog menu
  * press enter or space
  * verify that the menu opens
  * close the menu and repeat
  * verify that the menu still opens
  * open a discussion topic page in Chrome or Safari
  * focus the topic settings gear button
  * verify that the focus outline wraps the button neatly

I'm happy with my change to admin-links here--I like having it just pass
through the event instead of having special-case magic. I'd appreciate
feedback on my jquery UI popup changes, though.

Change-Id: I72dcb150e467748c59428fe2bdd4c8c2ddf22823
Reviewed-on: https://gerrit.instructure.com/24499
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fix editing a wiki page to only prompt to save true changes

test plan:
 - with draft state enabled
 * edit a wiki page already containing elements such as:
   - <br>
   - <hr>
   - consecutive  spaces
 * if no changes have been made, you should not be prompted
   to save changes
 * once changes have been made (to the body or title), you
   should be prompted when attempting to navigate away from
   the page in any way

fixes CNVS-8146

Change-Id: Iab650bfe7caab757b6f7d9111061973aed4c18a3
Reviewed-on: https://gerrit.instructure.com/24549
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
don't validate frozen assignment fields

fixes an issues where, since the assignment title label was disabled, the data
wasn't being collected for save (correct), and so the validations mistook that
as the field being empty (incorrect).

fixes CNVS-8245

test plan:
- set up a frozen assignment
  * enable assignment freezer
  * edit assignment to be frozen
  * copy course
  * view copied assignment as a teacher (not admin)
- you should be able to edit the due date

Change-Id: I4f29107b47999d602193454ec9b2754efd408b8b
Reviewed-on: https://gerrit.instructure.com/24550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
allow bulk messaging in new conversations

fixes CNVS-8045

test plan:
  * as a teacher with new conversations, navigate to new
    conversations and click the compose button;
  * verify that the "Bulk message" checkbox appears
    below the subject line;
  * attempt to send two messages to an entire class: one
    with the bcc checkbox selected, and another with it
    unchecked;
  * as a student in the class using old conversations,
    navigate to conversations and verify that you have two
    messages: one group conversation with the entire class,
    and one group conversation between you and the
    instructor.

Change-Id: Ic3bab8ce406c565a50ca50ad19d74b949f1caad1
Reviewed-on: https://gerrit.instructure.com/24515
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fix messaging to all teachers/students in course

test plan:
  * from the new conversations ui, attempt to send a
    message to all teachers or all students in a course;
  * verify that the message sends.

Change-Id: I64d782b10fc932e24bf4df223c93dfd3117e6c32
Reviewed-on: https://gerrit.instructure.com/24637
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fix layout bug for long conversation participants

when a conversation has two participants with long
usernames, they overflow the message date.

test plan:
  * create two users with long usernames;
  * send a message to those two users in the new
    conversations UI;
  * verify that the message displays in your sent pane's
    left pane and doesn't have a wonky layout;

Change-Id: Icf8e1ba1c6718d61c92fa7df31b2ede381b8fb7d
Reviewed-on: https://gerrit.instructure.com/24636
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
make Filterable search case-insensitively

Change-Id: I2bcf2f54ff6d0413e2f7987fc29ed25ec118e7b9
Reviewed-on: https://gerrit.instructure.com/24629
Reviewed-by: Mark Ericksen <marke@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
fix file upload questions for IE 9 & 10

Also fixes an issue in Backbone.syncWithMultipart where an error would
be thrown if iframe.contentWindow was null/undefined.

test plan:
  - as a student, take a quiz with a file upload question type in IE9,
    IE10, Firefox, Safari, and Chrome.
  - You should be able to upload files, remove files, and upload files
    again in all of these browsers.
  - Refreshing the page while taking the quiz should have your uploaded
    file displayed to you in the UI.
  - As a teacher, make sure you can access the file once the student is
    done taking the quiz.

fixes CNVS-7480

Change-Id: I9b62c9c0590624172a058df6512b7f1c661bd801
Reviewed-on: https://gerrit.instructure.com/24605
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
accessibility fix for modal dialogs

test plan:
* with a screenreader program, 'click' a button to open
any modal dialog
* should read the content that appears immediately

fixes #CNVS-7429

Change-Id: Ie9f5d0aed96dd91a6c02a8f4ab44fd27b05face2
Reviewed-on: https://gerrit.instructure.com/24502
QA-Review: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
[WebAIM] @title attributes for icons in quiz views

Some <a> tags included icons (marked by <i> tags with a @class of
"icon-" something) and had either a descriptive @title or @text set
but the icon elements did not and that was affecting the accessibility
of these icons. So, all icons that are parented by an anchor with a
description now have a @title that mimics that description accordingly.

Specs had to be adjusted to properly locate accessible anchors since
their text() value now returns "duplicated" values, once for the anchor
itself, and once for any embedded span.screenreader-only elements.

I've added/modified a few helpers to quizzes_common.rb to accommodate
these changes.

closes CNVS-6546

Note 1: there are a few cases that were not handled as I didn't know
what to actually do with them, more on that in the related JIRA issue.

Note 2: the number of affected files is large because the ticket
requested that not only the reported items be fixed, but any other
related items as well.

Change-Id: Ie34048d7d68b41b74461696b76751340e000344f
Reviewed-on: https://gerrit.instructure.com/24493
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
fix respondus question bank and quiz importing

test plan:
* publishing through respondus should work for question banks
and for quizzes when settings are applied

fixes #CNVS-8276 #CNVS-4297

Change-Id: I3b254c6375aa5524f6ecf78c31e64d34a13ba4a7
Reviewed-on: https://gerrit.instructure.com/24566
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
replace loading arrow with message if no assignments

fixes CNVS-8002

test plan:
- as a teacher, make a new course
- publish the course
- go to assignments page
- verify that arrow is replaced
- verify message: "No Assignment Groups found"
- verify that spinning arrow still shows initially

Change-Id: I02a1ed68b386dff718eb2ddf9fd464aed972dee0
Reviewed-on: https://gerrit.instructure.com/24431
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Irish <mirish@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: David Scoville <davids@instructure.com>
moves drag and drop icons to the left for groups and items

fixes CNVS-8274

test plan
- check that assignments index and quiz index collapsable groups are aligned properly

Change-Id: Icc7640775e74e2e880f5e8e19b0c3926ca93090f
Reviewed-on: https://gerrit.instructure.com/24562
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
spec: sel\ff upgrade spec fixes

Change-Id: If43f47cc5f44e2e163ea4b479d252ecbf6aa9493
Reviewed-on: https://gerrit.instructure.com/24393
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Updated zh translation
fix course copy and content migration date adjustment processing

test plan:
* import a content migration package through
"/courses/:course_id/content_migrations",
checking the field to "adjust events and due dates"
* manually type in dates of various formats
(e.g. "MM/DD/YYYY")
* should adjust the dates accordingly

* copy a course through the "copy this course" link
shown in "/courses/:course_id/settings"
* should adjust the dates here as well

fixes #CNVS-5771

Change-Id: Ib3c74f57ce3e351f6d3df88883b055bb8aa77101
Reviewed-on: https://gerrit.instructure.com/24246
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
preserve course links in group html content

test plan:
* create a course with a group
* create a wiki page for the group
* inside the group, add a link to content for the course
(e.g. "/courses/:course_id/files")
* it should not translate the link to point to "/groups/:group_id"

fixes #CNVS-8313

Change-Id: Icd64cf11668481cee34d4bcddd1332431826959f
Reviewed-on: https://gerrit.instructure.com/24606
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fix for interval saving for quizzes

fixes: CNVS-4676
because we use the same function to do both auto saving (on a 30 second
interval), and event-based saving (e.g. when the user answers a question
or otherwise interacts with the quiz form), sometimes the auto interval
wouldn't fire due to various circumstances.  we bypass this by
explicitly declaring that we're performing an interval save (vs an event
based submission save). i've also added new messaging when we try to
save, but when there's no new data to save (giving the user a time stamp for the
latest save attempt).

test plan:
(this can be confusing to test)
1. take a quiz
2. answer a question
- note that the quiz is still saving (or attempting to save, if there's
  no new data to save) at a regular interval

Change-Id: I139f94cb5b3cdae1d8b316d1c9510f1352d83ae3
Reviewed-on: https://gerrit.instructure.com/24558
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
chat: use iframe for including minichat

fixes CNVS-8154

test plan:
  * set up a chat server with https://gerrit.instructure.com/24593
  * add the chat LTI tool as an app
  * navigate to a course page other than chat
  * verify that minichat still works

Change-Id: I547d34f012d0a846163fc906bc4d3328dbc03f36
Reviewed-on: https://gerrit.instructure.com/24592
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
add timeouts to incoming message processor

incoming message processor should not wait indefinitely on
external connections. it now implements timeouts on external
connections that are controlled by the Canvas.timeout_protection
method. It uses incoming_message_processor as the serivce name,
which makes these meaningful settings to change the timeout
behavior:
 - service_incoming_message_processor_timeout
 - service_incoming_message_processor_cutoff
 - service_incoming_message_processor_error_ttl

fixes CNVS-8198

test plan:
 - see the incoming message processor wiki page for instructions
   on how to do the configuration and run these tests.
 - create a fifo in an empty directory, configure
   incoming_mail.yml to read from the directory, run
   script/process_incoming_emails and make sure it exits in
   30 seconds or so.
 - use nc -l <port> to listen on a port, configure
   incoming_mail.yml to access that port on localhost, and run
   script/process_incoming_emails and make sure it exits in
   30 seconds or so.
 - run script/process_incoming_emails against an actual email
   account and make sure it can still process emails normally.

Change-Id: I23c67c1e8c0581a1e6ca69ab2c7b8855090688d1
Reviewed-on: https://gerrit.instructure.com/24483
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>