cap the number of new groups creatable when creating a group category

fixes #11846

test plan: create a new group category with self-signup and specify to
create 500 new groups. only 200 should be created.

Change-Id: Ie5189cf528af96c96a5f2e9e28dce93e9a97e955
Reviewed-on: https://gerrit.instructure.com/15378
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
speed up submission categorization for grade summaries

fixes #11777

we were filtering the list of submissions once for every assignment in the
course, rather than filtering once and saving that filter.

test plan:
- in a large course (eg 700 students, 50 assignments, 40k submissions)
- go to a student grade page (/courses/x/grades/y)
- it should load
- make sure grade distribution graphs still work for regular sized courses

Change-Id: Ib14718d4725aa9ddd547018d3875449fb515e073
Reviewed-on: https://gerrit.instructure.com/15351
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
extend entries bg to bottom border fixes #11808

Change-Id: Ia213178aa14646adccb13cf364c0f5ecf88b3908
Reviewed-on: https://gerrit.instructure.com/15319
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
added author to Entry::toJSON fixes #11815

test plan:
1. expand comments in a side-comment discussion
2. observe the authors don't all say "unknown"

Change-Id: Ib8392ef5d5c9a145a8812555cfbe154594b0a39c
Reviewed-on: https://gerrit.instructure.com/15328
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
erase reply if parent exists fixes #11819

test plan:
1. delete a root entry
2. load the page (it should work)

Change-Id: I7a6a27bf8253955f74c518981ade3f5b87fee972
Reviewed-on: https://gerrit.instructure.com/15332
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
allow overriding the Gemfile location with BUNDLE_GEMFILE

Change-Id: Idba5b6d7186321fa795bfb2ca0dca39316884208
Reviewed-on: https://gerrit.instructure.com/15363
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
1.9: bump nokogiri gem to 1.5.5

1.5.0 has trouble compiling against our libxml

Change-Id: I55ea3ddfeb03a32e037480f5b36dd6a53d7242eb
Reviewed-on: https://gerrit.instructure.com/15364
Tested-by: Jenkins <jenkins@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
remove role="tree" from outcomes navigation. fixes #11701

this improves voiceover support, because voiceover explodes
on role="tree" elements.

test plan:
  * using voiceover, attempt to use the outcomes navigation and
    verify that it is read.

Change-Id: I94b7932aed7c262e97f6863fc82167fd00103759
Reviewed-on: https://gerrit.instructure.com/15228
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
don't give an error id of "none" if there is no error report

This was causing db errors trying to do ErrorReport.find("none")

fixes #11816

test plan: configure rails to render the public error pages (turn off
local mode), then add a line to generate a low-level error (such as a
marshal error when reading a cache value, which is how we discovered
this). in the error form the id should be blank, rather than "none".

Change-Id: I83367d1073739bc5588e8cfb59318c502c3eb41a
Reviewed-on: https://gerrit.instructure.com/15367
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
get rid of unused files leftover from summer CN work

this removes all the css/javascript for collections
and some communities stuff, we can reintroduce them
if/when we actually use them

Change-Id: I7751bdf4653eac869d9d20eaed8c8835a8649930
Reviewed-on: https://gerrit.instructure.com/15358
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fix admins merging users across shards via the UI fixes #11783

basically use ids, not uuids

test plan:
 * as a site admin
 * go to a user
 * click "merge with another user"
 * in the id field, put in a global id
 * it should pull up that user
 * finish the merge
 * it should succeed

Change-Id: I11f6a2e989f8342d748c5a7ba63aac414f340ca4
Reviewed-on: https://gerrit.instructure.com/15366
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
red canvas logo

login: http://cl.ly/image/1Y1a1G0D2F3i
app:   http://cl.ly/image/0g1g032A3d18

Change-Id: I6dab0fe756e7b5f0f1936ad3533d16368c1ab401
Reviewed-on: https://gerrit.instructure.com/15423
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
explicitly scope teacher enrollments on course

test plan
 * existing specs should all pass
 * when including teacher enrollments from course conditions should keep enrollments.type

Change-Id: Ic99fc40069b4d5ab003ed43cd1b7c9f34454a43f
Reviewed-on: https://gerrit.instructure.com/15097
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Allow accounts to specify session timeout time

fixes #11388

This should work for single and multiple accounts. 
You can now enable a plugin that lets you set
how long (in minutes) before users on your account
are automatically logged of because of inactivity.
You are required to set this to at least 20 
minutes or more.

Test Plan
  Steps: 
  1. log in as a site admin 
  2. [plugins] 
  3. [Sessions] 
  4. on the account drop down menu, select all 
     accounts, then enter a time in the text field
     in minutes. At least 20 minutes
  5. [Apply] 
  6. log out 
  7. go to /login and make sure the
     "stay signed in" checkbox is checked 
  8. log in with any user that can get on the
     account you enabled the plugin to work for 
  9. wait for a little longer than the amount of
     time you set the plugin for 
  10. try to complete an action, like clicking on
     course or the canvas home page logo

You should be logged out

Thanks Adam for writing this test plan.

Change-Id: If7dc772e4a1a59e646645c698d732308d3e0a19f
Reviewed-on: https://gerrit.instructure.com/15231
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
fix assignment link regression in calendar 2

fixes #11847

test plan:
 - create an assignment
 - click on the assignment in calendar 2 to show details
 - click on the title link in the assignment details dialog
 - should be taken to the assignment page

Change-Id: I1fe7f0923fcb21a4e0208698ebeb7ea897ef16d8
Reviewed-on: https://gerrit.instructure.com/15385
Reviewed-by: Mark Ericksen <marke@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
overwrite quiz and assessment questions on re-import if checked

fixed a problem where checking the "Overwrite assessment
content with matching IDs" on the "Import Quizzes" page
wasn't actually overwriting the content

test plan:
* import the original quiz file from redmine
* look at the quiz questions
* import the updated quiz file from redmine, checking
 the "overwrite" option
* confirm that another quiz has not been added
 and that the original quiz questions have been updated

closes #11662

Change-Id: Ib4ec5d79e062a4ae3e8abad4cbdede96b600a64a
Reviewed-on: https://gerrit.instructure.com/15282
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
doc fix in assignment overrides API docs

section_id => course_section_id

Change-Id: I7b80a67c5bdd4328baf9012c3ea41545acf7f08b
Reviewed-on: https://gerrit.instructure.com/15427
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Revert HTML5 video playback and subtitles

There are still several issues that need to be resolved with this, so it's
being removed from master for now.

Commits being reverted are:

f77b1d77f08c0df4517cd86c1b87c7ce9a441d04
  "make media_object info action not an api, fixes: #11464"
497156a4f7e58510116a67945693a1cf76d9f4f2
  "fix error when viewing a video file that has an unknown source type"
39eaab2269a6bd336b270c3ba0f3625f23cb6cd4
  "use the playlist urls to get kaltura urls"
a22f8c13a3d8a9d0e30b5acac0e800cc23438529
  "Use html5 to show videos by default & show subtitles"

Change-Id: Iefcef83a42174634485e1c61e993244b0029aae2
Reviewed-on: https://gerrit.instructure.com/15440
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
fix failing gradebook2 selenium spec

Change-Id: I86cd8e7324665324e3ba8260db91128aaceddb5e
Reviewed-on: https://gerrit.instructure.com/15449
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
create/update/delete sections API

fixes #11565

test plan:
 - look at generated documentation for sections api
 - create, update, and delete course sections with the API,
   checking the following:
  - verify documented parameters are accepted
  - verify the Section json object is returned
  - verify the SIS ID can only be set by admins
  - verify students can't create/modify/delete sections
  - verify you can't delete a section that has
    active enrollments
 - cross-list a section using the API
  - make sure it requires admin privileges
  - make sure it fails if the target course is in
    a different root account
 - un-cross-list a section using the API
  - make sure it requires admin privileges
  - make sure it fails if the section isn't
    cross-listed

Change-Id: I9dbf2541f5f88f015514830e6cc79a564b1ff3c3
Reviewed-on: https://gerrit.instructure.com/15234
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>