add validation for group split count for group set creation

fixes CNVS-9973

test plan:
* click the create group set button
* check the Split students into equal groups and
  leave the associated number input empty
* attempt to create the group set
* verify that you get a validation error

Change-Id: I67cf71704e46ce5035fb86344442f5f06ea09041
Reviewed-on: https://gerrit.instructure.com/27536
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Dan Dorman <ddorman@instructure.com>
make discussion show page publish button consistent

fixes CNVS-9936

test plan
- ensure that the publish button on the discussion show page
 appears darker when published, as shown on the images attached
 to the ticket

Change-Id: Ib4ec677bcb4ee20ff1615590b8a73f977cf5d32b
Reviewed-on: https://gerrit.instructure.com/27865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
make ruby gems fix more accurate

it's not precisely Ruby 2.0 that's missing this method, just a newer
version of RubyGems, so look for the method we're replacing

Change-Id: I9cbd145dfe04e5f21ad1928df756a785645ba954
Reviewed-on: https://gerrit.instructure.com/28122
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
custom gradebook columns api: support hidden state

refs CNVS-5856, CNVS-6906, CNVS-6475

Test plan:
  * use the api to make some custom columns hidden (you should be able
    to create hidden columns too)
  * hidden columns should not be returned in the list of custom columns
    by default (you can request them with the include_hidden param)

Change-Id: Ic8c6eed567e6b2890d6e62b9da64ab767888f03e
Reviewed-on: https://gerrit.instructure.com/28033
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
custom gradebook columns: teacher_notes support

refs CNVS-5856, CNVS-6906, CNVS-6475

Test plan:
  This commit lets you mark columns as teacher_notes columns.  The UI
  only supports one teacher_notes column, but this isn't enforced by
  the API.  Create a teacher_notes column using the API.

Change-Id: I1c15082e95ac08b092148f32f3c6906ec2dcef11
Reviewed-on: https://gerrit.instructure.com/28097
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
jsonapi-ify outcome results api

fixes CNVS-10198, CNVS-10201

test plan
- test outcome result api as in c/27631
- ensure that jsonapi paging metadata is returned

- fetch outcome results for a course that includes students
 without outcome results (i.e. haven't submitted anything)
- ensure that the student is listed in the returned results
 with an empty scores array

Change-Id: I00d8e9de241a243fb6ac1aa9f55150b8955a2452
Reviewed-on: https://gerrit.instructure.com/28015
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
better error message for custom_gradebook_columns

this used to tell you that your title was too long when you forgot to
include one.

Test plan:
  - use the api to create a custom_gradebook_column, but leave out the
    title parameter
  - you should get a helpful error message that reminds you of your
    ommission

Change-Id: Ia61d427f3df4ab12e08d1a5f23800f95d5ab416d
Reviewed-on: https://gerrit.instructure.com/27888
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
sort and filter in screenreader gradebook

added ability to filter students by section

added ability to sort assignments by assignment group, name, or due date

fixed fast select so that removing items when the instance has a default
<option> works properly

fixes CNVS-10019

test plan
=========

- navigate to screenreader gradebook in a course with multiple sections
- select a section
- verify that only students in that section show up in the students drop
  down
- select a different sort than the default
- verify that the assignments are sorted as expected

Change-Id: I3a93edb018f343b0f3ac55381df68ddab1a40f9b
Reviewed-on: https://gerrit.instructure.com/27877
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
QA-Review: Matthew Irish <mirish@instructure.com>
Updated de translation
Updated fr translation
Updated pl translation
improve feature flag caching

 * properly cache nil per context
 * cache the full lookup in-proc only

test plan:
 * quick regression test of feature flags

Change-Id: I0d2435777bcc82d01301af96df81f179366b2fdc
Reviewed-on: https://gerrit.instructure.com/28118
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
TinyMCE: Improved the accessibility of the equation editor.

Fixes CNVS-6709

Test plan:
- Open the equation editor from within TinyMCE.
- Using the keyboard only, confirm that all controls are reachable and usable
  in both the simple and advanced views.
  - Using a screen reader:
  - Notice the hidden text recommending that screen reader users use the
    advanced view for improved accessibility.
  - Confirm that the advanced view is reachable and usable.
  - Confirm that the tabs are treated like tabs.
  - In the advanced view, confirm that each of the buttons within the toolbar
    has a label which says what will be inserted when pressing the button.
  - Confirm that the formula entry edit field in the advanced view has a
    meaningful label.

Change-Id: Ic71124b443494cdceda5792892048fdd3b6b405e
Reviewed-on: https://gerrit.instructure.com/27676
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
fix outcome results api specs

test plan:
  * run specs

Change-Id: I82986f492019fa212a49058029ec2a1b41b0b223
Reviewed-on: https://gerrit.instructure.com/28160
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
use https for all kaltura communication

kaltura is always available over https, and requesting a secure resource
from within a plain http page is not harmful.

so we can simplify the code and pave the way for a media service that
only runs over https by converting everything to request kaltura
resources via https.

to accomplish this we pull together all of the myriad ways that HTTP
requests were being made from canvas's kaltura client. then in the
unified code path we ensure SSL is being used to make requests.

we're also pulling in webmock to make for better tests of the kaltura
client code with stubs closer to the HTTP layer.

unfortunately this change ends up touching most of kaltura
functionality, so the test plan is basically a full kaltura regression
test.

test plan:
 - upload a video to kaltura; once it's done transcoding, the thumbnail
   should work, and the video should play
 - upload a video via canvas files, then embed it in some content; do
   the same verification
 - record a video using your webcam; verify it works

Change-Id: If5f67469fee07db80188911a0c7edd256c94c0a3
Reviewed-on: https://gerrit.instructure.com/28100
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
fix report query update progress less often

fixes CNVS-10286

test plan
 - run outcome results report
 - it should work

Change-Id: I8c32fa9302c5af8c3af3c6ce4a5b2c4a42809ffa
Reviewed-on: https://gerrit.instructure.com/28117
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
speedgrader: always show group submission files

closes CNVS-9715

Some API consumers are uploading files intended for a group assignment
to a user's files endpoint instead of the group one.  This commit
allows a user's files to be associated with all submissions for an
assignment belonging to the same group.

NOTE: this does not allow users in the same group to steal each other's
files, only the owner of the file can submit it.

Test plan:
  1. create a group assignment
  2. upload a file to your user files area
  3. make a submission to the assignment with that file
  4. other users in that group should be able to view the file on their
     submission page
  5. try to submit the file from step 2 as another user in the group.
     this should fail

Change-Id: Ie949a5b71795fe0537305c57be94d48535605460
Reviewed-on: https://gerrit.instructure.com/27808
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
add aggregate parameter to outcome results rollup api

also replaces raw hashes in outcome result analytics with
structs to improve error detection and possibly support active
model serialization in the future.

fixes CNVS-10037

test plan:
 - check the outcome results api documentation for the new
   aggregate parameter.
 - call the outcome rollup api with the aggregate=course
   parameter.
 - verify the result in this case is one rollup that contains
   an accurate average of the user rollups for each outcome.

Change-Id: I635cf5e28f5de73e44b63ac6234971657728d035
Reviewed-on: https://gerrit.instructure.com/28103
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
QA-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
add outcome gradebook feature

fixes CNVS-10196

test plan:
  * verify that no outcome gradebook tab or option appears
    on the gradebook2 page;
  * using feature flags, enable outcome gradebook;
  * verify that the gradebook2 page now displays a learning
    mastery tab;
  * verify that clicking the learning mastery tab displays
    the learning mastery gradebook;
  * verify that course outcomes with scores are displayed as
    columns and that students with results are displayed as
    rows;
  * in a course with sections, verify that filtering either
    the gradebook or outcome gradebook by section updates
    the filter of the other view (note: only the section
    dropdown will change in the outcome gradebook; no
    filtering will actually take place);
  * verify that toggling the mastery checkbox filters in
    the outcome gradebook will show/hide relevant cells in
    the table.

Change-Id: I9979f37ac42d9bc45f0dd9846dd7a92e45c25c09
Reviewed-on: https://gerrit.instructure.com/28014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
display type of aligned items on outcome show page

fixes CNVS-7274

test plan:
  * create an outcome, associate it with a rubric, and use
    that rubric to grade an assignment;
  * navigate to the outcome's show page (e.g.
    /courses/x/outcomes/y);
  * verify that the assignment and rubric both display as
    aligned items and have assignment and rubric icons.

Change-Id: I85e448c6e276b0d5c466cf77aee3ca175a378b38
Reviewed-on: https://gerrit.instructure.com/28138
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>