deprecate hide_from_students on wiki pages

hide_from_students is being deprecated in lieu of the workflow states
'active' (published) and 'unpublished'

test plan: (draft state and legacy)
  special attention should be given to areas related to hiding wiki
  pages from students (legacy: hide from students checkbox;
  draft state: published/unpublished items)

  items that are hidden from students or unpublished should show for
  teachers, but should not show for students

 - areas to test:
   - pages api and ui (regression)
     - validate hide_from_students and published values in all api calls
   - course migrations (specifically course copy)
   - wiki sidebar in other parts of canvas

fixes CNVS-10354, CNVS-10366

Change-Id: I70f4d8c07c2be4150163279f0673377bad6e9c48
Reviewed-on: https://gerrit.instructure.com/28375
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fix manual locking in mysql used by delayed job singletons

refs CNVS-7032

Change-Id: I6fb05ca85a1cc14a0a7091d277e224b2e5be237e
Reviewed-on: https://gerrit.instructure.com/28574
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
add long enough security.yml for test env

Change-Id: I4baf75daa50c2caec223f73c05d3fc9371c6a0af
Signed-off-by: Stephan Hagemann <stephan.hagemann@instructure.com>
Reviewed-on: https://gerrit.instructure.com/28634
Product-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
spec: rake task for non parallel_exclude tests

Change-Id: I45379aacc391b68003c7ff66239d175a2a362e9f
Reviewed-on: https://gerrit.instructure.com/28663
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
add profile pics to mastery gradebook and outcome result api

fixes CNVS-10295

test plan
- regression on mastery gradebook
- ensure student profile pics appear next to the student name on
 the mastery gradebook when profile pics are enabled
- ensure that profile pics do not appear if profile pics are
 disabled

Change-Id: I24ccb21990402a76fe1c79ea39a752d1f73e8d5f
Reviewed-on: https://gerrit.instructure.com/28561
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
summarize delayed_message on message's shard

instead of attempting to load the passed
DelayedMessage records whatever happens to be the
current shard

fixes CNVS-4568

test plan: specs should pass

Change-Id: I585e1bfb87be160608f7ae4f4c8f8f97d260ff69
Reviewed-on: https://gerrit.instructure.com/28366
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
disallow NULL on custom gradebook column columns

Change-Id: Ib6de3f7168a59d2be1d8663bb9901bcd102558a0
Reviewed-on: https://gerrit.instructure.com/28667
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
srgb global options: hide student names

fixes CNVS-10021

test plan:
  - in screenreader gradebook
  - click the 'Hide Student Names' checkbox
  - the students drop down should
    say 'Student 1', 'Student 2', etc.
  - click the checkbox again
  - the students drop down should list the student names

Change-Id: I566113a413c9aed294e1238c3a4dcd6be799fbc3
Reviewed-on: https://gerrit.instructure.com/28007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Matthew Irish <mirish@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
discussions: use strings for IDs in ENV and materialized view

fixes CNVS-10341

test plan:
  * before applying this commit, if possible:
    * create a discussion
    * add a reply as a student
  * after applying this commit:
    * open the discussion as the student
    * verify that you can edit the reply you added before, but not
        those from other users
    * add a new reply
    * without refreshing, verify that you can edit your new reply
    * refresh the page
    * verify that you can still edit your reply

  * test basic canvas functionality (sorry)

Change-Id: Ifa654f7d853fd167d5bfbaee6184657209d58272
Reviewed-on: https://gerrit.instructure.com/28413
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
spec: fix ordering assumption

refs CNVS-7032

Change-Id: Iee1912e3d32659c0211010872befa45ef6a501b2
Reviewed-on: https://gerrit.instructure.com/28565
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
remove superfluous transaction

refs CNVS-7032

Change-Id: I4ba80222d8b733b46538bfb8168f4869f87a2c19
Reviewed-on: https://gerrit.instructure.com/28655
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix null sorting of grading standards title

refs CNVS-3072

Change-Id: I7b34832c9486f7581dfa59e3e8223ef4676faad4
Reviewed-on: https://gerrit.instructure.com/28654
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
TinyMCE: Made the Insert Image plugin treeview accessible

Fixes CNVS-5670

Test plan:
- On any RCE, click the button to insert an image.
- Select the Canvas tab.
- Using the keyboard, verify that the treeview is navigable via the arrow
  keys, enter, home and end.
- Confirm that the space bar is functionally the same as the enter key.
- Verify that the treeview is likewise accessible and navigable when using a
  screen reader.

Change-Id: Ib45d9f56dc6e7a7168ba13c59296db59504e69a4
Reviewed-on: https://gerrit.instructure.com/28317
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
spec: fix mysql failures in quiz statistics due to no sub-second precision

refs CNVS-7032

also, don't load all quiz submissions just to find the latest timestamp

Change-Id: Ibcd2804644300aa861fbefba0917bd49b97aeb75
Reviewed-on: https://gerrit.instructure.com/28640
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix user merge for mysql

mysql doesn't like simple subqueries in updates and deletes

refs CNVS-7032

Change-Id: Ibd3a4d51049fabacdffed2623d7ed5c13c6659b7
Reviewed-on: https://gerrit.instructure.com/28645
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
outcome results report: add outcome details popup

fixes CNVS-10294

test plan:
  * open gradebook in a course with outcome gradebook enabled
  * click on an outcome column label
  * verify that a popup is displayed
  * verify that it includes title and description
  * verify that it matches the design spec

Change-Id: Ia4a6a3f3ddd4e3445e468f7ae0400f1f798ac0a8
Reviewed-on: https://gerrit.instructure.com/28636
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fix attachment clone_for for rails 3

Change-Id: I65e9030b8cff38ba2a45e7f5f49a934fa16e6342
Reviewed-on: https://gerrit.instructure.com/28690
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix simply versioned association for rails 3

Change-Id: I9545f224ef8340f3efeda04682999ace811c2352
Reviewed-on: https://gerrit.instructure.com/28535
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
add visual indicator to RCE color selector

fixes CNVS-6705
This commit adds a visual highlighting of the color chosen when selecting
colors in the tinymce editor.

Test Plan
1. Go to a page that includes the RCE (the quiz edit page includes one)
2. Switch between background and font colors using the color selector.
- There should be a visual indication of which color you chose (a
  shading of the background of the selected color)

Change-Id: Id3af0b7d36ee8f8fb3b069ef4fa9906558e9da2b
Reviewed-on: https://gerrit.instructure.com/28380
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
restore assessment request notifications

fixes CNVS-10485

test plan:
  * create an assignment with a rubric attached, auto-
    assigned peer reviews, and an online submission type;
  * as two students in the course with ASAP notification
    preferences, submit the assignment;
  * wait for the assignment's due date to pass, then verify
    that each student receives a reminder to peer review the
    assignment.

note: for the test steps to work, delayed jobs must
be running.

Change-Id: Ib066212df31e4af68fcff72a4de225b19db58077
Reviewed-on: https://gerrit.instructure.com/28586
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>