update ic-menu to 0.1.9

this release of ic-menu has fix for conditional items being ordered
correctly and adds ability to have a disabled menu item

closes CNVS-13355

test plan:
  - enable ember quizzes
  - navigate to an existing quiz overview / show
  - click the admin cog in the top right
    - lock, or unlock the quiz
    - click the cog again
    - using up and down keyboard arrows navigate through menu
      - verify that the key navigation order syncs with the visual order
        in the list

Change-Id: Ica4809c1454fcc0204155d60a429852f1af1bbc3
Reviewed-on: https://gerrit.instructure.com/35803
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
fix duplicate dependency in event_stream spec

to avoid bundler warnings

Change-Id: Ie997a7bb06c6d3334ea8973a80902a5239f67eb5
Reviewed-on: https://gerrit.instructure.com/35516
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Ember Quiz Stats - Discrimination Index Sorting

Fixes an issue where sorting by the DIndex would position questions with
negative indices below questions that don't have a DI at all.

Closes CNVS-13384

TEST PLAN
---- ----

  - create a quiz with a few questions of type multiple-choice, and
    another of a different type
  - go to ember quiz stats:
    - sort by discrimination index
      - verify that MC/TF questions are sorted below each other, and
        other questions that don't have a DIndex are below them

Change-Id: I512b7e9fe5e2c909d7145415e022ab49abc1d889
Reviewed-on: https://gerrit.instructure.com/35737
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
disable take quiz / speed grader menu items in ember if they're not available

fixes CNVS-13258, CNVS-13300

test plan:
  - enable fabulous quizzes
  - as a teacher
    - create an unpublished quiz with only a single attempt allowed
    - go to the ember quiz page
    - the speedgrader link in the menu should be greyed out, and will give you
      a warning if you attempt to go there
    - the "take the quiz" menu item should be greyed out, and will warn you if
      you attempt to take it.
    - publish the quiz
    - the "take the quiz" menu item should now be enabled
    - take the quiz using this menu item
    - attempt to retake the quiz
    - now (since we're limited to 1 attempt) it should be disabled again

Change-Id: I634b0727fccee377c08a390e5507c71c9b9cdd25
Reviewed-on: https://gerrit.instructure.com/35687
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
bundle check before bundle install for gem tests

they're likely already installed, and it will save a ton of trips
to rubygems.org

Change-Id: I9ccf2194619a6e8f97d7f21b4e232dac7ff20d3c
Reviewed-on: https://gerrit.instructure.com/35694
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
parse cc assignment extension data

test plan:
* importing the example package with cc assignment data
 should bring in canvas specific assignment data (like grading type)

* cc and canvas package import regressions

closes #CNVS-13270

Change-Id: Ic053837aa7642212bc0360f5e5ecf2cd27a88d9b
Reviewed-on: https://gerrit.instructure.com/35747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Disable button group after deleting a conversation message

Fixes: CNVS-13399

After a conversation message gets deleted we need
the buttons that relate to that message to become
disabled, so that we don't get an error message.

Test-Plan
1.) Send a message to a user using conversations
2.) Login as that user and verify that you have
    received a message
3.) Delete the message
4.) Make sure that the messages buttons;
    reply, reply-all, archive, and delete,
    are disabled.

Change-Id: I373d278b0c17f1a09bc7a4280c5b5932594ac919
Reviewed-on: https://gerrit.instructure.com/35783
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Minor translation and aria clean-ups

Test plan:
- Visit the conference concluded page and verify that the accessible label on
  the pop-up menu is "Settings" and not "settings".
- Visit the New Conference page and verify that the Edit option in the pop-up
  menu no longer has an unnecessary aria-label.

Change-Id: I563b1a1a479b213253b65da4362bd5c050c4ec35
Reviewed-on: https://gerrit.instructure.com/34629
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
fix all the places we were using incorrect css3 gradients

fixes: #CNVS-13294

firefox can render gradients prefix-free but
all of these were using an invalid syntax for css3
gradients. The invalid syntax still works in chrome
but not firefox (or other browsers).

That's a huge gotcha because almost every
example & tutorial out there also uses the bad syntax
and that's also how you would do the prefixed version
if it was required.

Now that we use autoprefixer, it was leaving
the unprefixed rule in-tact and not printing
a -moz one. and since these used the wrong syntax
for the unprefixed ones they didn't work in FF

so: you should use `to bottom` instead of `top`:

bad:
background: linear-gradient(top, white, black)
good:
background: linear-gradient(to bottom, white, black)

see: https://github.com/ai/autoprefixer#why-dont-gradients-work-in-firefox

test plan:
make sure these look right:
1. Assignments Gradebook:Grid View 
   http://screencast.com/t/eVop4gcbogm
2. Assignments Gradebook:Grid View Settings Dropdown 
   http://cl.ly/image/1g0M203Z250c 
   (BG color on hover isn't showing)
3. SpeedGrader student dropdown 
   http://cl.ly/image/2P2g0O3I3R08

Change-Id: Ie76a53da026dacfc0e1c21561292aa616b3de7c4
Reviewed-on: https://gerrit.instructure.com/35808
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
messageable user: exclude bookmark from serialization (rails2)

fixes CNVS-13309

test plan:
  * set up pg_collkey on rails 2
  * open user settings page
  * verify that the page loads

Change-Id: I4b9bac1b48a974d0f415b9db7fa67468eddea237
Reviewed-on: https://gerrit.instructure.com/35780
Reviewed-by: Drew Bowman <dbowman@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Quiz Stats - Matching

Adds support for Matching question statistics. Similar to FIMB and
Mulitple Dropdowns in the output.

Closes CNVS-13088

TEST PLAN
---- ----

Similar to https://gerrit.instructure.com/#/c/35101/ but with Matching
questions instead of FIMB.

Change-Id: Iaa5da1631503a8750b9673d7cb6064a296a8aa55
Reviewed-on: https://gerrit.instructure.com/35331
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Ember Quiz Stats - Matching

Question statistics like those for FIMB and Multiple Dropdowns.

Closes CNVS-13072

TEST PLAN
---- ----

  - create a quiz with matching questions
  - take it by a number of students, score differently
  - visit ember quiz stats
  - verify that each left-side "answer" gets its own button
  - click the button and verify that:
    - the possible matches as well as the distractors are charted in the
      answer response distribution chart
    - the correct answer is highlighted in green
    - the ratios should be correct
  - expand the question details to display the answers
    - verify that no matter which answer set you're previewing, all the
      possible matches are displayed, but only the correct one gets
      highlighted differently as you activate an answer set
  - really, it's the same AC as for FIMB and MDropdowns in
    https://gerrit.instructure.com/#/c/34804/

Change-Id: I4fb18c041b7648f20223766dd402bfdbcceb3b55
Reviewed-on: https://gerrit.instructure.com/35428
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Ember Quiz Stats [+Backend] - Numerical

Adds numerical question support to CanvasQuizStatistics and the renderer
in the Ember quiz statistics (subclass of ShortAnswer question).

Closes CNVS-13087, CNVS-13086

TEST PLAN
---- ----

  - create a quiz with a numerical question:
    - mix and match between the answer types: exact, exact with margin,
      and range answers
  - take the quiz by a number of students, we need to score like this to
    cover the possible cases:
    - a correct answer
    - a missing answer
    - an incorrect/out-of-range answer
  - hitting the stats api should return the documented metrics in the
    output of "question_statistics":
    /api/v1/courses/:course_id/quizzes/:quiz_id/statistics [GET]
  - visiting ember quizzes should now render the numerical stats which
    is similar to short answer (fill in the blank) and multiple answers:
    - make sure the "Other" and "No Answer" answers and bars show up
  - verify the API docs are updated

Change-Id: I0c9ec0dbc7c729410241177b6ed43b0cd4dad143
Reviewed-on: https://gerrit.instructure.com/35431
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
Ember Quiz Stats - fix chart sections placement

On smaller screens, the question statistics were acting too big and so
the last section always dropped down below the other ones. This patch
makes the initial section width just a tad smaller to make more room for
friends.

Closes CNVS-13230

TEST PLAN
---- ----

  - use a 13" or smaller laptop (not sure if changing resolution works,
    i tried on 4 different resolutions/monitors, only laptop one did
    this)
  - go to ember quiz stats for a quiz with some questions
  - verify that the discrimination index and essay/formula/fileupload
    charts are on the same line as the rest

Change-Id: I298c577bb626547c56315d612ea9c9c24ea7e768
Reviewed-on: https://gerrit.instructure.com/35429
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
add extend time modal link and dialog for ember quizzes moderate

fixes CNVS-12448

test plan:
- as a teacher
  - enable fabulous quizzes
  - enroll a few students in the course

  - create a quiz with a time limit
  - publish the quiz
  - visit the quiz moderate page

- in a different browser / session as a student
  - start the quiz as a student
  - don't submit the quiz yet!

- as a teacher
  - refresh the moderate page
  - you should be shown a clock icon for the students with currently running
    quizzes.
  - you can now click on this icon!
  - this will bring up a modal dialog to extend time for the current attempt
  - try out extending the quiz by a few minutes from now
  - try out extending the quiz by a few minutes from the end date

- also try these out with multiple students taking the quiz at once.
- changing the options in the modal should persist until you choose a different
  student, at which point it will reset the form in the dialog

Change-Id: I0adf1ed2133b6adaf8501b5131bd70365b06c249
Reviewed-on: https://gerrit.instructure.com/35343
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
add explanation that some scores aren't graded yet in quiz attempt history

fixes CNVS-13255

test plan:
  - as a teacher
    - create a quiz with an essay question
    - take the quiz
    - the attempt history table should show an asterisk next to scores
      that are pending review, and a message that explains some questions
      aren't graded yet

    - create a quiz without an essay question
    - take the quiz
    - the attempt history table should NOT show an asterisk next to scores or
      an explanation that some questions not graded yet

  - as a student
    - take the essay quiz and we should have asterisks / message as well
    - take the quiz without essays, and we should not get asterisks/message

  - try this with multiple attempts as well. It should highlight any attempt
    that is pending review
  - this should work with both fabulous quizzes enabled / disabled

Change-Id: I7fd6b0744ca12ee1486a066d15b70701bbb22770
Reviewed-on: https://gerrit.instructure.com/35643
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
get rid of fabulous quizzes route/action so that url is just /quizzes

fixes CNVS-13375

test plan:
  - turn on fabulous quizzes
  - we should no longer see 'fabulous_quizzes' in the url as we navigate around
  - redirection from quizzes/{id} should still work correctly
  - redirection from quizzes/{id}/modreate should still work correctly
  - redirection from quizzes/{id}/statistics should still work correctly
  - visiting a url directly without being logged in should prompt to login

Change-Id: Ib8c4eaacbc098c7168c27a93d16e9443f25bbbca
Reviewed-on: https://gerrit.instructure.com/35723
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
wait a tick to display quiz submission time

when a student has a previous submission and then starts a new one, it
was possible for the previous quiz submission time to temporarily be
displayed in the moderate table. so wait a tick until we display
the quiz submission time counter to verify that all the quiz submission
properties and bindings have had a chance to fire.

closes CNVS-13342

test plan:
- create a quiz with:
  - time limit
  - or pending due date
  - and multiple attempts
- as a student take the quiz, but don't submit it
- as a instructor visit the moderate page
  - verify that submission time is running
- as student, submit the quiz
- as instructor, click the refresh icon and verify that submission time
  stops running
- as student take the quiz again
- as instructor click the refresh icon again and verify that previous
  running time doesn't show temporarily.

Change-Id: Ie501e7ffa31fe4b4959eeb783cfaf868e0f0aa64
Reviewed-on: https://gerrit.instructure.com/35618
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
fix format when adding quiz time extention

round remaining seconds calculation to ensure time format for submission
extension time over 60 minutes. also keep timer from running more than
once per refresh interval.

closes CNVS-13336

test plan:
  - create a timed quiz
  - as a student begin quiz, but do not finish / submit it
  - as instructor
    - visit quiz moderate page
    - click the clock icon / running time
    - add time using the modal window to add up to more than 60 minutes
      total time for the submission
    - click submit on the modal
    - verify that running time in the moderate table updates
      consistently

Change-Id: I2f1f6b28b130dc41795e4b30c156d40beeca56f0
Reviewed-on: https://gerrit.instructure.com/35600
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
fix all the places we were using incorrect css3 gradients

fixes: #CNVS-13294

firefox can render gradients prefix-free but
all of these were using an invalid syntax for css3
gradients. The invalid syntax still works in chrome
but not firefox (or other browsers).

That's a huge gotcha because almost every
example & tutorial out there also uses the bad syntax
and that's also how you would do the prefixed version
if it was required.

Now that we use autoprefixer, it was leaving
the unprefixed rule in-tact and not printing
a -moz one. and since these used the wrong syntax
for the unprefixed ones they didn't work in FF

so: you should use `to bottom` instead of `top`:

bad:
background: linear-gradient(top, white, black)
good:
background: linear-gradient(to bottom, white, black)

see: https://github.com/ai/autoprefixer#why-dont-gradients-work-in-firefox

test plan:
make sure these look right:
1. Assignments Gradebook:Grid View
   http://screencast.com/t/eVop4gcbogm
2. Assignments Gradebook:Grid View Settings Dropdown
   http://cl.ly/image/1g0M203Z250c
   (BG color on hover isn't showing)
3. SpeedGrader student dropdown
   http://cl.ly/image/2P2g0O3I3R08

Change-Id: Ie76a53da026dacfc0e1c21561292aa616b3de7c4
Reviewed-on: https://gerrit.instructure.com/35808
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>