Accessibility: Added navigation landmark to the the top bar.

Fixes CNVS-12503

Test plan:
- Using a screen reader, visit any page in Canvas.
- Verify that the top bar has a navigation landmark with a label of
  "User Menu"

Change-Id: I0ba93c519427d83f32e74f99ede2d2501bd76172
Reviewed-on: https://gerrit.instructure.com/35510
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
spec: test that multiple-recipient user notes actually work

Change-Id: Ie7aec4cd12177b8aa1ab39741acad2e09a84822c
Reviewed-on: https://gerrit.instructure.com/35697
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
QA-Review: Braden Anderson <banderson@instructure.com>
add section_id to submissions API when grouped

Canvas submissions API can group submissions by user, but does not
currently provide the section that the user is in. We need a
section_id in order for SIS integrations with powerschool to work
since the powerschool data model is different wrt how assignments
are stored (assignments are stored in sections in PS, but in
courses in Canvas).

Test Plan:
- Query submissions API via students, e.g.

curl -H 'Authorization: Bearer [yourtoken]' -XGET
     http://localhost:3000/api/v1/courses/1/students/submissions
     -F 'student_ids=all' -F 'grouped=false'

- section_id should now be included alongside user_id

Fixes SIS-301

Change-Id: I1c0ad639a088fa9e0b8015a25adf48fec64a9e0f
Reviewed-on: https://gerrit.instructure.com/35603
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Eric Adams <eadams@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fix issue with republish quiz not working correctly pre-draft state

fixes CNVS-13391

test plan:
  - turn off draft state
  - as a teacher
    - create a new quiz
    - publish the quiz
    - make changes to the quiz questions
    - make sure the notification shows that you have unpublished changes
    - republish the quiz
    - the quiz changes should be published

  - make sure there are no regressions with CNVS-13003

  - make sure that publish/unpublish of a quiz with DS continues to work
    as expected
  - mess around with any way you can think to publish the quiz via modules
    etc.

Change-Id: I1365609f8c4fc10056de42a806a3629155e6643e
Reviewed-on: https://gerrit.instructure.com/35754
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
add notification that ember quiz has been regraded

fixes CNVS-12440

test plan:
  - enable fabulous quizzes
  - as a teacher
    - create a quiz
    - take the quiz

  - as a student
    - take the quiz

  - as a teacher
    - change the answer and choose to regrade the quiz
    - view the quiz
    - it should show you a regrade notification

  - as a student
    - view the quiz
    - it should show you a regrade notification

  - try variations where
    1. the student's grade isn't affected, should say:
      This quiz has been regraded; your score was not affected.

    2. there is one question regraded, should say:
      This quiz has been regraded; your score was affected.

    3. there are two or more questions regraded, should say:
      This quiz has been regraded; your new score reflects 2 questions that were affected.

Change-Id: I4f12334d553b20314e37bf45ba16d3221778ad85
Reviewed-on: https://gerrit.instructure.com/35585
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
add launch_type parameter to external_tools show action

some planned extensions will need to launch their tools in a
manner similar to a module item tool, but with their extension
specific settings. Added the launch_type parameter to the show
action to make this possible.

refs RAN-53, RAN-55

test plan:
 - configure an external tool that has a an integration type
   other than account_navigation or course_navigation.
 - enter the url for the tool in a browser:
     /course/<course-id>/external_tools/<tool-id>
 - this should display an error.
 - add the launch_type parameter to the url:
     ?launch_type=<extension_name>

Change-Id: I1495db4deca8042ddf6f09548b006a0f7741db35
Reviewed-on: https://gerrit.instructure.com/35159
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
add display_type configuration to external tools

this setting should allow tools to choose how they are displayed
in the canvas interface. the new full width display removes the
canvas sidebars, footer, and breadcrumbs.

test plan:
 - install a tool with course_navigation and account_navigation
   extensions.
 - make sure the tool displays normally without a display_type
   configuration.
 - use a console to set display_type = 'full_width' in a tool's
   course_navigation settings.
 - the tool should display as a "full width" tool when viewed
   by the course navigation link. full width means without the
   left or right side bar, without breadcrumbs, and without a
   footer. the canvas header should still be displayed.
 - the tool should display normally when viewed by the account
   navigation link.
 - use the console to set the display_type = 'full_width' in the
   tool's top level settings.
 - tool tool should now display full width using the account
   navigation link.

Change-Id: Idc19c0c96031bd80a45ce984241c23e4ce1efe78
Reviewed-on: https://gerrit.instructure.com/35160
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
ignore unpublished module items for course progress

fixes CAT-79

test plan:
1. Enable Draftstate on a course that has gallery set up
2. Set up a module with multiple module items
3. unpublish some of the module items ( individually)
* verify that the "requirement_count" adjusts to the
* unpublishing of items for the following endpoint:

/courses/:course_id?include[]=course_progress

Change-Id: I092b8c7a76a1abf4b05bd0a0ed654bee98de0217
Reviewed-on: https://gerrit.instructure.com/35654
Reviewed-by: Jeff Belser <jbelser@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
fix typo in account reports

Change-Id: Ice80bbb6a4cd4ad5ee2390414b106670ee6ce416
Reviewed-on: https://gerrit.instructure.com/35776
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
stop appending digits to long assignment names

fixes CNVS-1662

test plan:
  - turn draft state off
  - go to the asignments index
  - create an assignment group w/ a 254 char name
  - click the add assignment link on the right side
    with the newly created assignment group selected
    - the assignment created should not have a number at the end
    - it should save properly
  - click the add assignment link on the right side
    with a different group (without a long name)
    - the assignment created should have a number at the end
      (like usual)

Change-Id: I1cb7c1aa80eb698e1e5b84098448817e943e79fa
Reviewed-on: https://gerrit.instructure.com/35300
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
spec: vendored_gems pin rspec versions

Change-Id: Ibad1c172e58a69eb3a5a9ff2c874e861086ae227
Reviewed-on: https://gerrit.instructure.com/35756
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
update enrollment activity while window is open

fixes ALYT-32

test plan:
  * open a course page as a student
  * check the student's enrollment's total activity time
  * leave the page open and in the foreground for at least three minutes
  * verify that the student's activity time is updated

Change-Id: I0448ea48dc6739ae1199996d0a4b88b030f43856
Reviewed-on: https://gerrit.instructure.com/35553
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
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>