spec: fix half-broken spec

broke with g/22210 ... these are always ordered by name now (previously
the order was arbitrary, though arbitrarily the same in the spec and the
controller)

Change-Id: I1a7a52409d6d7f38087a3d4964b5447b4bd336cc
Reviewed-on: https://gerrit.instructure.com/22316
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fix typo in wiki pages controller

also rename method to prevent future mishaps

test plan:
* try to visit a deleted page (that is not the
front page)
* should not get a page error

fixes #CNVS-6868

Change-Id: If0bea59d810fc0d41d3e9169fffc58fa20d74cd9
Reviewed-on: https://gerrit.instructure.com/22309
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
add foreign keys part 4

refs CNVS-6202

Change-Id: I6a7ae8e95bdca0611eb1ced02992175b9406e914
Reviewed-on: https://gerrit.instructure.com/11533
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>
spec: add respodus specs to parallel exclude

Change-Id: I59bed51cb593c6805a1835aa009ecbcb3820d934
Reviewed-on: https://gerrit.instructure.com/22334
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
move expensive courses queries to slave

Change-Id: Icb85274365555b229646bca806fbb24aa0a8011e
Reviewed-on: https://gerrit.instructure.com/22352
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
move expensive user search action to slave

Change-Id: I4998d50a4e4545981a12a1cb3d740a2217da7c5f
Reviewed-on: https://gerrit.instructure.com/22353
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
miscellaneous accessibility changes

test plans:

CNVS-6481:
* confirm search box on course people page has
aria-label "Search people" instead of just "search"

CNVS-6615:
* add several upcoming events to a course calendar such that
not all of them are initially shown on the right-hand sidebar
on the course main page (instead showing a link with "X more")
* confirm that hitting enter while focused on the link
(note: getting focus using Shift+Tab is probably easiest)
will set focus on the first newly revealed item, rather than
the first of all the items

CNVS-6480:
* confirm that there is a hidden h1 header at the top
of the course people page

CNVS-6516:
* on the course settings page - right sidebar,
inspect the current users html element and confirm that it is
now an <h3> tag inside a <caption> tag (but appears the same)

CNVS-6517:
* on the course settings page -> course details form,
left hand labels should not be contained within <th>
tags but instead in <td> tags (should otherwise be the same)

fixes #CNVS-6481 #CNVS-6615 #CNVS-6480 #CNVS-6516 #CNVS-6517

Change-Id: Ie62944ca8927b943529c78b78c594f340cd653c2
Reviewed-on: https://gerrit.instructure.com/22243
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
remove draft state functionality from old module ui

A publish button had been added to the old module UI before
the feature is ready to release.

Test Plan:
 * the publish/unpublish button should not appear on a
   module in the old ui
 * note that the modules are cached, so if you loaded the
   modules page before this fix, and then after, you'll
	 probably need to clear the cache

closes CNVS-6919

Change-Id: I0ecfb01f5432425639265dccc9d166382deeaad3
Reviewed-on: https://gerrit.instructure.com/22360
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
don't allow re-use of one time passwords

test plan:
 * configure MFA for a user
 * login with that user, but don't remember this computer
 * within 30 seconds, log out and log back in with the same code
 * it should say your code is invalid
 * enter your new code
 * you should be able to log in

Change-Id: I943d985b392b9117ed4c77634d8af2f27cd4e5f9
Reviewed-on: https://gerrit.instructure.com/21613
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix sis courses export report on a sub account

fixes CNVS-4439 FRD

test plan:
 * in a sub account, run the sis export report, selecting the courses
   option
 * it should work

Change-Id: I1fe42aa4ceeb59742376dfdbeeb7481152cf7286
Reviewed-on: https://gerrit.instructure.com/21598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
add descriptive text to the show/hide module items links

fixes CNVS-6482

test plan:
 - the show/mode module items button (otherwise known as the
   collapse module button) anchor element ("a") should have
   descriptive text visible only to screenreaders
   (it also has a "title" attribute that contains the same
   text; apparently neither is enough by itself)

Change-Id: Ida2ae3270c7d4524592268198cbd3c6fdf2b3a62
Reviewed-on: https://gerrit.instructure.com/22318
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>
sis_group_id support

in both requests and responses

test plan:
 * in all group and group membership apis, it should be able to use
   the sis id of the group instead of the canvas id (sis ids are only
   supported on account level groups)
 * in api responses that return groups, it should include the
   sis_group_id if the calling user can read sis data at the root
   account level

Change-Id: I439bf2d33661ed128a75c759c304c897fe0fc38b
Reviewed-on: https://gerrit.instructure.com/21612
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
define canvas-style compound API documents

documentation on the server side, and adaptation of Backbone.Collection
to handle this style of document on the UI side.

refs CNVS-390, refs CNVS-6069

Change-Id: Ice854695df66efb13545aa7ae47b39e7ad673c60
Reviewed-on: https://gerrit.instructure.com/22145
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
add UI for site admins to enable/disable self registration

test plan:
 * as a site admin, go to account settings for an account, and change
   and save Self Registration; it should persist
 * repeat as an account admin

Change-Id: Idb02a251e5c916237f5ef7a647edaa0ebd93078d
Reviewed-on: https://gerrit.instructure.com/21921
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
spec: fix intermittently failing selenium discussion spec

Change-Id: Ie21ed11fb877483a2a02a0ab70c9699fa1a5f904
Reviewed-on: https://gerrit.instructure.com/22337
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
round scores to two places in gradebook2

Also gives the "round" function in app/coffeescripts/util/round a
default rounding value of 0 decimal places if no decimal place argument
is given.

test plan:
  - As a teacher, grade an assignment for a student with a score of
    0.6666. When you view it in the gradebook, it should display as
    "0.67".

fixes CNVS-3929

Change-Id: I39281c208ec73568d95dd18ac9a3ba712cb8ef6e
Reviewed-on: https://gerrit.instructure.com/22250
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
make DialogFormView a little smarter

make it easier to remove and re-open a dialog with a dialog form view.  this
comes up when dialog form view gets re-rendered after it's dialog has already
been opened once.

test plan: n/a this is not used yet.  make sure existing dialog form views
(like the people page, or turnitin settings on the assignment edit page)

Change-Id: I3b1b0c8ac42f08048f908311be9b953a3745dad9
Reviewed-on: https://gerrit.instructure.com/22361
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fix dialog re-render issue in new assignment index

fixes CNVS-6922

test plan:
- in the new assignment index page
- create a new assignment group
- create a new assignment with the quick add dialog
- create another
- they should both work

Change-Id: I49ea59d563877b7dfda9744802abb01976f49e93
Reviewed-on: https://gerrit.instructure.com/22363
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
sanitize assignment.allowed_extensions from the api

the api was accepting an array, which was skipping the parsing, stripping of
'.' and whitespace, and downcasing that happened when the parameter was given
as a string.  this caused the validation to try to match a file name against
' .DOC' which would always fail.

this fixes the problem and also runs a datafix to correct existing data that
is in this bad state

fixes CNVS-4622

test plan:
- before checking out the patchset, create an assignment and set the allowed
  extensions to ".DOC, .XLS"
- check out the patchset and run migrations
- your assignment allowed extension value should have changed to 'doc,xls'
- try to enter the bad value again
- it should save and automatically become the good value

Change-Id: Iea45dd0d5251e418878567b9267eb6252f1e1250
Reviewed-on: https://gerrit.instructure.com/22299
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
backport fix for ruby bug

fixes CNVS-6947

test plan:
 * upload a file whose name begins with ~
 * download a zip of the folder the file is in
 * it should work

Change-Id: I828095b2dffe96805df5dc4921cfdce7c38af287
Reviewed-on: https://gerrit.instructure.com/22414
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>