format filenames better in content migration tooltips

test plan:
* import a file with a long continuous name (+40 characters)
* hover over the link to the imported file
* the filename should not extend beyond the borders of
the tooltip

fixes #CNVS-7269

Change-Id: I3640abc50017552d80541055fadc3ac849f2c3d7
Reviewed-on: https://gerrit.instructure.com/22985
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
allow grading nil points possible by percent

fixes CNVS-7245

test plan:
- create an assignment with no points possible
- with the api, grade it by percent
- it not error (the grade will be 0)

Change-Id: Ief6d88e7683d425c32588a0fecea1107e770bb18
Reviewed-on: https://gerrit.instructure.com/22820
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
only touch context once after outcome group delete

fixes CNVS-7045

test plan:
- create an outcome group with some outcomes in it
- delete the group and refresh
- the group should stay deleted
- watch a query log when you delete and make sure the context is only touched
  once, not once per outcome in the group

Change-Id: I656f2685b20959f2096820acc604d940e1f1c63d
Reviewed-on: https://gerrit.instructure.com/22842
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
prevent select db calls in folder_as_options

fixes #CNVS-7324

Change-Id: I40e4e56affaa73264c2cb41fce617d9dd0f129cb
Reviewed-on: https://gerrit.instructure.com/22982
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
set assignment as locked if their quiz or topic is locked

test plan:
* create a topic or quiz with an associated assignment
* lock the topic or quiz
* use the assignments API to retrieve the assignment
* should indicate the assignment is locked

fixes #CNVS-7091

Change-Id: I06d4f16d010accedc05dca9d018e6b7e47441471
Reviewed-on: https://gerrit.instructure.com/22786
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
remove transactional=false from conversation migrations

Change-Id: Ic00905e832c6dbf3471f8b925de4c51a307a04d0
Reviewed-on: https://gerrit.instructure.com/23002
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
QA-Review: Joel Hough <joel@instructure.com>
add helper for writing csv files

refs PS-451

Change-Id: I9efdfc2ac218642321cff152e905f8544e8ff2ad
Reviewed-on: https://gerrit.instructure.com/22995
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
underscore 1.5.1

no noticeable changes given how we use it, just new features

test plan:
canvas should work :)

Change-Id: I85dd1b887670b5238421057e36840b69f3946fef
Reviewed-on: https://gerrit.instructure.com/22965
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
fix PaginatedView performance issue/bug, fixes CNVS-7309

fix an issue introduced in c95537ba where the same fetch can be kicked off
many times. backbone removes dups, so it's not a huge deal, but it is
suboptimal behavior. for PageViewCollection, however, this results in
duplicate models in the collection (since the model has no id).

because we do a fetchNextPageIfNeeded on any collection event, and
multiple events can be triggered in the same tick (e.g. reset + add),
several of the same fetch will happen (fetchingNextPage is false when we
check it for all of them, but it's true after the first setTimeout runs).

test plan:
1. open your chrome console
2. under settings, check the "Log XMLHttpRequests" box
3. enable page views and go to a user page
4. if you have fewer than 100 page views, lower per_page so that paginated
   requests happen
5. you should only see one of each ajax request in the logs
6. you should not see duplicate/out of order records in the UI

Change-Id: I11fe68c6955bf42fc3b4452b45bb441b1ff0f87b
Reviewed-on: https://gerrit.instructure.com/22964
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
set the correct namespoce for lti grade service

We had some draft namespace which isn't valid anymore

Change-Id: Ic12b27d6bdad376c71442a6fe974b885bbc78035
Reviewed-on: https://gerrit.instructure.com/23058
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
remove ad-hoc "permission" checks on submissions

refs CNVS-6926

This avoids some extraneous user queries.

Change-Id: I5e416f53fe131dca49710e077e985de84e37f31b
Reviewed-on: https://gerrit.instructure.com/22825
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
update account report progress on master

test plan
- run Student Competency report
- progress should work(this may take thousands of outcomes to see progress in api)
- report should not fail
- run recently deleted courses report
- run unpublished courses report
- reports should not fail

Change-Id: I0020af16a73c0aec5d017ab048b926e3e7e93279
Reviewed-on: https://gerrit.instructure.com/22936
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fix delete assignment group dialog

fixes CNVS-7270

test plan:
- on the new assignment index page with >= 2 groups
- open the delete dialog
- make sure the assigment count and list of move to groups is correct
- close it
- add an assignment to the group
- add another assignment group to the list
- open the delete dialog again and make sure the values have updated properly

Change-Id: I4190a28ccfb818c867e7d835d6c6d82380375e3d
Reviewed-on: https://gerrit.instructure.com/22875
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>
fix course api helper for account reports

test plan
- make a course in a sub_account
- use a report that has a course filter on a root_account
- report should work

Change-Id: I17e4f62d2049ab2f73b6baee37b0f85e578e6c7d
Reviewed-on: https://gerrit.instructure.com/23057
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fix quiz re-importing with unique assignment index

test plan:
* create a course with a published quiz
* export the course to .imscc file
* reimport the file back into the course
* should not give an import error

* copy the course
* import the file into the new course
* should not get an import error

* create a new course
* import the file into the course
* copy in from the original course
* should not get an import error

fixes #CNVS-7249

Change-Id: Ieb5d5cf9de0cb8a1465f2f7e704c5db0cef7098e
Reviewed-on: https://gerrit.instructure.com/23010
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fix materialized views through pgbouncer

i.e. don't use find_each with an order outside of a transaction

test plan:
 * through pgbouncer
 * with jobs running
 * create a new discussion topic, and access it
 * it should not seem to hang

Change-Id: I1f83497fe482246520c0858f638218e895dfb9c7
Reviewed-on: https://gerrit.instructure.com/23077
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>
add foreign keys part 5

refs CNVS-6202

Change-Id: I482bc4d2dbb95e1962ce4a7dacd95351bfd0ed7c
Reviewed-on: https://gerrit.instructure.com/11534
Reviewed-by: Rob Orton <rob@instructure.com>
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>
never do Sass/Compass updates in non-development environments

Change-Id: I2bf26286d0927bd7f0aaffa199481f8c82e55a3c
Reviewed-on: https://gerrit.instructure.com/23097
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
allow teachers to see delayed discussion topics.

fixes CNVS-7323

when a course has multiple teachers or TAs, they are now
all able to see a delayed_post_at discussion topic, even
if they were not the original author.

test plan:
  * create a course with two teachers;
  * as teacher 1, create a delayed_post_at discussion
    topic;
  * as teacher 2, verify that the discussion topic is
    visible on the discussions index page.

Change-Id: Ibefef34d63f66a6524315189c9c7ecc7c3139370
Reviewed-on: https://gerrit.instructure.com/23046
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
persist newly created assignments in UI after group edit

fixes CNVS-7340

test plan:
- in the new assignments index page, create a new assignment
- then edit the name of the group
- the new assignment should not disappear

Change-Id: I8b9bd210645714bb1d621c9ac914a44d3e346c86
Reviewed-on: https://gerrit.instructure.com/23000
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>