Fixes post-grade date picker to not stick on last change

Fixes: SIS-383

Modifies the date picker to check onClose instead
of on change, so that no update is made to the
errors count until the calendar is no longer up.

Test-Plan:
--With Post to SIS feature flag turned on--
1.) Make at least 1 assignment with no due date
2.) Navigate to grades
3.) Click post to sis
4.) Verify that you can update the due-date without
	it locking the calendar on the screen

Change-Id: I7ca143343d65393e5012a62f5b757b1caf47d936
Reviewed-on: https://gerrit.instructure.com/43886
Reviewed-by: Nick Houle <nhoule@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fix default zone argument

Stepping through the code, old and new, zone is set to nil when the call
to ::Time.zone happens in the default argument position, but not when it
happens as the first line of the function.  I don't yet know why.

fixes CNVS-16799

test plan:
- create an assignment with a due date
- view the assignment as a student.  the due date should match

(repeating test plan from commit that caused the regression)
- Create a new course shell and go to the courses settings page and set
  the courses time zone as Eastern and save the change.
- Create a new assignment and put a due date of whatever day you want,
  but have the time be 11pm and save it.
- When the page reloads, hover your mouse over the due date.
- The due date should be correct (on the day after).

Change-Id: I048d766f1552f2c244b5cdebbd7cc3445ed92969
Reviewed-on: https://gerrit.instructure.com/44148
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
allow lti tool to set a beforeunload message

refs CNVS-16272

test plan (in supported browsers):
 * post this message from an lti tool:
    parent.postMessage(JSON.stringify({
      subject: 'lti.setUnloadMessage',
      message: 'Interrupting navigation'
    }), '*')
 * attempt to navigate away from the page
 * a navigation confirmation dialog should be shown
 * post this message from an lti tool:
    parent.postMessage(JSON.stringify({
      subject: 'lti.removeUnloadMessage'
    }), '*')
 * attempt to navigate away from the page
 * the navigation should be successful without a confirmation

Change-Id: I9b41d18b79e7830145445137a75c01aeb61f748c
Reviewed-on: https://gerrit.instructure.com/43844
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
spec: tweak single thread sel spec rake

Change-Id: Ia7c9a7eb2219b04dcbea2650a168d42446e9ae3f
Reviewed-on: https://gerrit.instructure.com/44070
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>
add tinymce help menu when creating or editing wiki pages

fixes CNVS-16720

The help icon should now appear next to the toggle the tinymce
editor/html button.

Test Plan
- Test this on both the new wiki page and edit wiki page
As a user that can creating or editing a wiki page
When I'm on the new wiki page, or edit wiki page
I should see a help icon next to "HTML Editor" text (blue circle with
"i" in it)
Clicking the help icon should open the shortcut help dialog

Change-Id: Ic988af3bda092d053e683edc0c0b1ef53cac2fd4
Reviewed-on: https://gerrit.instructure.com/43963
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
add keyboard shortcut help to syllabus

fixes CNVS-16721
fixes CNVS-15961

This adds the blue help icon next to HTML Editor text.

Test Plan
As a user that can edit the syllabus
When you go the the syllabux page
And you click on the 'edit' button
Then you should see the tinymce editor
And there should be a blue help icon next to "HTML Editor"
And clicking on it should show the keyboard shortcuts help menu

Change-Id: I3e629506b9c331a7d4a3640d0bceb4071506f21f
Reviewed-on: https://gerrit.instructure.com/43971
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
remove non-draft-state features from quizzes

fixes CNVS-16048

test plan:
  - do regression testing around publishing / unpublishing quizzes
    - all publishing / unpublishing scenarios should work correctly
    - make sure to check publishing on:
      - quizzes#index
      - quizzes#show
      - from modules
      - from module items
    - make sure that warnings about unpublished quizzes work
    - make sure that warnings about not being able to unpublish quizzes with
      submissions work
    - make sure that the module sequence footer still works on the quizzes page
    - make sure we can still review published quizzes in speedgrader

Change-Id: I1112e3b28ed6388077bfc165056bb1ab0d84b3fd
Reviewed-on: https://gerrit.instructure.com/42258
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
spec: selena rspec specs shared spec fix

Change-Id: Ia0c90b7ed0a140c5e0ae69c9bb7a3034f774de5e
Reviewed-on: https://gerrit.instructure.com/44183
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
allow api_ids on admin controller index

fixes CNVS-16807

test plan
 - account admin index should find user by sis_id

Change-Id: Idecb3b606e189c1e8f062498092357462efd4b90
Reviewed-on: https://gerrit.instructure.com/44163
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refactor lti setting/selection_type to placements

 - specs should pass

Change-Id: Iefdeb4b4dbc4a878fd11c7b4dec8caa81c741084
Reviewed-on: https://gerrit.instructure.com/42922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
LTI: include_host for return_url on new_tab launches

test plan:
  * create an LTI assignment with "Launch in a new tab" enabled
  * launch the assignment
  * verify that, in the POST request, the launch_presentation_return_url
      parameter includes protocol and hostname

Change-Id: I54e903cf7916627ed77a2a0cccb4b95da40c6316
Reviewed-on: https://gerrit.instructure.com/43726
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
spec: intermittent specs pending while fixed

Change-Id: I596b52ec545c5240335864d7c269dc542e49206b
Reviewed-on: https://gerrit.instructure.com/44216
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
validate group_category_id in discussion topics

refs CNVS-16708

test plan:
 * post a new discussion topic for a group
 * it should work

Change-Id: I0e98b1000383297f21273fe66f2175af9a69d009
Reviewed-on: https://gerrit.instructure.com/43874
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix admin controller index api find

fixes CNVS-16807

test plan
 - account admin index should find user by sis_id

Change-Id: Ife67825c388c9d08802e12e2bfc2155aee573da1
Reviewed-on: https://gerrit.instructure.com/44219
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
spec: remove assignment tab spec

nuke the assignment header tab spec since we removed that tab
from canvas

Change-Id: I13e60548e2dd32648233b85c877309cc7f46389d
Reviewed-on: https://gerrit.instructure.com/44223
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Rubrics - Change "Find Outcome Criterion" to "Find Outcome"

Fixes CNVS-16760

Test Plan:

    - If necessary, add an outcome
    - Create/edit an assignment and click "Add Rubric"
    - Observe that the text next to the magnifying glass says "Find
      Outcome" instead of "Find Outcome Criterion"

Change-Id: I1026224351b1f4b6466de64bc26b230618431d51
Reviewed-on: https://gerrit.instructure.com/44060
Product-Review: Hilary Scharton <hilary@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
improve add_role_id_columns migration performance

Change-Id: I6550a53b2cde3ff9e5638c5af9c60ed77698e9b7
Reviewed-on: https://gerrit.instructure.com/44208
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Fix errors in context_modules_spec.rb

Change-Id: Icb907b3498882bde9ce34d52412a899a464ef8bc
Reviewed-on: https://gerrit.instructure.com/44129
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
spec: fix quiz question creation spec

it was expecting an item that doesn't exist
so i changed it to look for the quiz title item

Change-Id: Ic1902aa40a7d74217aa93ef4e17e545635768f4a
Reviewed-on: https://gerrit.instructure.com/44227
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
specs: explicitly require JSON

fixes CNVS-16777

rails autoloading doesn't always work in gem-engines, I haven't tracked
down the root of the behavior, but I found a lot more explicit requires
necessary in analytics as well.

Change-Id: I780d2176dc4e1da12687b217806069647d2d31b7
Reviewed-on: https://gerrit.instructure.com/44255
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>