drop unused course section columns

test plan:
 * ensure current specs pass, and no functionality changes

Change-Id: I7296f63421eb8041c1f33277244e6b745197e972
Reviewed-on: https://gerrit.instructure.com/11619
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
give people access to bootstrap style forms, see styleguide

Change-Id: Ie2ef0505597d754b13f6a249ebe73c46b61d4b42
make calendar2 look ok with new styles

Change-Id: I3144eb4804c599d0783e4d41a37d8a34291dad8c
darken default link color a bit

Change-Id: I19c6a8eb941fe0d3ee29028ebc2f98d749fbaba2
fix sis_course_id in course create api; fixes #9063

This fixes an tricky condition where setting the sis_course_id in the course
create api only worked if you were also passing the offer => true parameter.
This was because offering the course caused the workflow state to change, and
the object to be saved without validation first, which set up the root account
needed for the real save which validates the uniqueness of the sis_course_id
using that root account. Since validations happen before before_saves, when
offer wasn't present and the first save tried to do validations, they failed.

test plan:
- hit the api course create endpoint with an sis_course_id and without the
  offere parameter
- it should succeed

Change-Id: I8fdfa5654c5a5a06609418224e96ee6aef0628da
Reviewed-on: https://gerrit.instructure.com/11642
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
items and followers counts for collections

aggregate and cache the number of items and number of followers of
a collection. return these counts in the api response.

test plan:
- run the migration
- query existing collections and make sure counts look accurate
- follow/unfollow collections and make sure count changes
- pin/delete items and make sure the count changes

Change-Id: Ic3a96682b550c168f505f419ffc4b619f859f044
Reviewed-on: https://gerrit.instructure.com/11490
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
process sis batches on a singleton strand

And process all pending batches in the job, don't require one job per
batch.

This way we don't pile up jobs for accounts that send frequent sis
updates.

There is also an optional setting to add a delay before the job starts,
so that we can process more batches per job invocation if they are being
sent frequently.

test plan: make sure that sis batches are still processed, including
batches that were queued before the code update. verify that no matter
how many batches are queued, only one job per strand will be in the
queue (sometimes 2, if one is already running and a second is added).

Change-Id: I4d551ef9fa45d9d332244ab29ca8d061fa5d7b9c
Reviewed-on: https://gerrit.instructure.com/11465
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
remove "page views over time" from courses/X/statistics

This is superceded by the analytics data, which is much more efficient
to query.

test plan: visit /courses/X/statistics, and verify the page views graph
is no longer on the page, but the rest of the data loads correctly.

Change-Id: Ic9991f661071dc9eb77f39a8a601fde644c9bc13
Reviewed-on: https://gerrit.instructure.com/11653
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Merge branch 'master' into dev/fft

Conflicts:
	Gemfile
	app/controllers/courses_controller.rb

Change-Id: Ie01f68d5ab6f02e3a581d70adf674f222b88574b
fix jslint error in dashboard.js

Change-Id: Iec4ebc158e1f723a0e3d5fa2a963bf5db024ba18
fix css includes in profile pages

Change-Id: Id5c2f8d0c990d0527826110dff3518ca7a375521
force creation_pending state for students invited via api

fixes #8750

they will automatically transition to invited when the course is published

test plan:
 * invite a student to an unpublished course via the api
 * the student shouldn't get a notification
 * publish the course
 * the student should get a notification

Change-Id: I16795085acd4198b54ec5cf440335845f733c195
Reviewed-on: https://gerrit.instructure.com/11664
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Implement option for "no submission comments in inbox" for teachers. Closes #8084

Backend implementation that, when set, keeps submission comments from
showing up in the teacher's inbox. This commit also adds documentation
comments to related methods that I had to research for understanding behavior.
This currently has no visual interface and can only be enabled from the console.
The UI is part of the Notification rewrite/redesign slated for next.

Testing Notes:
=============
Console commands to change:
  u = User.find_by_email('user@example.com')
  u.preferences[:no_submission_comments_inbox] = true  # to turn option on (defaults to off)
  u.preferences[:no_submission_comments_inbox] = false # to turn option off again
  u.save
=============
Disabled first
* After using console commands to disable
* Submit an assignment as a student with a comment
* Teacher's inbox does not show the comment.
* Comment does show on Course Activity and the Submission view

Disabled after
* While option is disabled, submit an assignment with a comment
* The comment should appear in teacher's inbox (as it has in past)
* Mark all comments as read (or just 'read' it)
* Enable the feature in the console
* As student, add another comment to submission
* As teacher, no unread conversations in inbox and
  selecting the existing thread will show the new comment

Change-Id: Ib9406c9d85bccb33b137af0e60c9803ca6cb3280
Reviewed-on: https://gerrit.instructure.com/11144
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
remove unused context_module_legend html dialog

this was being rendered on every page that contained a module item, but
wasn't being used.

test plan: load module items (assignments, files, etc that are
included in a course module), and verify the page still renders.

Change-Id: I7b4a17b608c6d0484d58c2d80e7228b14cf5d24d
Reviewed-on: https://gerrit.instructure.com/11670
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
spec fixes

Change-Id: Iacebe164539bab1d6f88adb8b0f89a10f0285db3
optimize courses list in accounts

also reduce limit to 50 courses (no one scrolls that far anyway)

test plan:
 * go to account home page
 * it should list number of students in course, and names of unique
   teachers accurately

Change-Id: I517c66b404987b00157129df145beea889b95136
Reviewed-on: https://gerrit.instructure.com/11621
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
more spec fixes

Change-Id: I46fbe1c05efc9d1f4b3e677064ec9fc868300829
wiki sidebar fixes

Change-Id: Iebd9fec9a8ca0c624cb627cc3aba43fa289680a4
remove to_json from js_env submission object

fixes #8872

ENV.SUBMISSION.submission was a JSON string
instead of an object, which caused the grade to
reset to nothing, then adding a comment would
remove the grade from the page

other bugs may be fixed by this commit as well

Change-Id: I03ad06d26e959fbd52129377f2ba7a3a76faa01f
Reviewed-on: https://gerrit.instructure.com/11687
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
don't copy deleted assignments linked to topics or quizzes

Test Plan:
 * Create a topic for grading
 * Change it to not be for grading anymore
 * Copy the course
 * There shouldn't be an assignment for the topic

closes #8948

Change-Id: Ieeda35ab22988e8ed173ff25dea76b4cf8b354fe
Reviewed-on: https://gerrit.instructure.com/11652
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>