remove join condition mangling

it's a complicated monkeypatch. easier to just make our code compatible

Change-Id: I2ea89cc7aa5b77a0613f5aca4c1c9f20bf7b8486
Reviewed-on: https://gerrit.instructure.com/41709
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
implement drag-n-drop move for newfiles

closes: CNVS-14866

also, fixes some specs that were really brittle and
causing lots of pain and frustration with jenkins.

test plan:
open newfiles
select some things
try dragging them to another folder on the page
it should work equally as well to drop on folders
shown in the left folder tree as well as
folders shown in the main panel

Change-Id: Ieaca31640146dbf570a8525733199eb1b8f00c14
Reviewed-on: https://gerrit.instructure.com/41957
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Adds a title and heading to new Files

fixes CNVS-15592

Test Plan:
  - Enable better files browsing
  - Go to files
  - An H1 tag should be there for screen readers only
  - The title in the header/tab should be present as well

Change-Id: I045b9516148b4adc5e351f17dd6d551c211631d1
Reviewed-on: https://gerrit.instructure.com/41945
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
fix a broken route due to rails 4

refs  CNVS-15128

Test Plan:
* Upload a Picture for a user Avatar
* Should work

Change-Id: If2a78042957871750e0a72e07a5d61974f65df55
Reviewed-on: https://gerrit.instructure.com/42134
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
CQS - lock down NPM dependencies

Closes CNVS-15990

Change-Id: I8a67acc5247b005fdd1841b5de607c8beff68762
Reviewed-on: https://gerrit.instructure.com/42154
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
Tested-by: Ryan Florence <ryanf@instructure.com>
show module footer for topics with assignment content tag

fixes CNVS-15922

test plan
- create a graded group discussion
- create a module
- using the api, add the assignment linked to the topic to the
 module (make sure not to add the topic itself, ever)
- add other items to the module so that the module navigation
 footer will have something to navigate too
- navigate to the discussion topic show page
- ensure that the module navigation footer appears at the bottom
 of the page

Change-Id: I74d5bed96a2dec20f5fa66c3a4fd6b4e39e5b1db
Reviewed-on: https://gerrit.instructure.com/42035
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
fix message attachments in IE 10

test plan:
* using IE 10, should be able to add attachments when
 composing a message in conversations and send the
 message successfully
* should also work in other browsers as before

closes #CNVS-13369

Change-Id: I28459ffbbd9a58751c26d69ce9c6718d3a05c304
Reviewed-on: https://gerrit.instructure.com/42093
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
external tool logout service

test plan:
 0. configure an external tool that
  - reads the $Canvas.logoutService.url
  - POSTs to this address, adding a 'callback' parameter
    specifying the URL canvas should GET when the user
    logs out of Canvas
  (see the platform team for help with this step)
 1. launch this tool
 2. log out of canvas
 3. ensure the logout callback is called

closes CNVS-15764

Change-Id: Iaa66212d8068f2c6f919477bae509a05f1a2993c
Reviewed-on: https://gerrit.instructure.com/41745
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
don't load all contexts for section recipient lookup

fixes CNVS-15797

test plan
tl;dr - regression test recipient finder, it should be faster for
 sections

- as a teacher with many courses in many accounts (10ish? as long
 as it usually causes a delay in the address book), begin composing
 a message in the conversations inbox
- select a course from the context dropdown
- using the recipient finder, select 'Course Sections'
- select a section
- ensure that the delay between selecting the section and seeing
 the section users is less than before this commit
- ensure that the section user list has the same contents as
 before this commit

Change-Id: I5ede3d05c25580d9cb354dfd5a4bd03ed6a2e440
Reviewed-on: https://gerrit.instructure.com/41755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Revert "prevent ungrouped users from submitting to group assignments"

We actually do want non-grouped students to be able to submit.

This reverts commit bcdc5f33288a187a584e2fabf8ccef3e60087ba0.

Change-Id: I6786483027cd54ef62c6f6b51317fa6a0d940afb
Reviewed-on: https://gerrit.instructure.com/41506
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
show groupless submissions in speedgrader

fixes CNVS-15753

Test plan:
  * make a group assignment with a group category that has no groups
  * submit some homework
  * the submissions should display (and be gradeable) in speedgrader
  * add some groups (with people in them)
  * submit more homework for the people with groups
  * the submissions for people in groups and people not in groups
    should all display
  * downloading submissions should work as well

Change-Id: I7e6081cec61936c4f833394e995963698f4b57b7
Reviewed-on: https://gerrit.instructure.com/41596
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Implement New Files Preview

This is the first commit of preview functionality into New Files
it isn't polished, but should be a good starting point for
polish.  Tickets are being created to account for any remaining
tasks.

closes CNVS-14727

Test Plan: (sorry kinda big)
  - Enable "Better File Browsing" for a course
  - Go to course files (/courses/##/files)
  - Make sure you have some images uploaded... since that's all
    that is really supported.
  - Click on a file (but not on the file name itself)
  - It should highlight
  - Click the "View" option in the toolbar that should appear
  - An overlay should cover the screen
  - You should be able to tab to each of the interactive
    elements on this page
  - Clicking Download should download the file.
  - Clicking Info should open the information panel.
  - Clicking the show button at the bottom should open up the
    preview thumbnails
  - The arrow keys (and the buttons on the screeen) should
    navigate left/right
  - A non-image file should show you a nice message telling
    you it can't be previewed yet.
  - Clicking close should, you know... close the panel.
  - Now select multiple files and click "view" again.
  - Perform all the same tests, but now you should be limited
    to only the items that you selected.

Change-Id: I8f48a133f739b9bddda5e340f5156269691c7870
Reviewed-on: https://gerrit.instructure.com/41451
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
fix peer review notification links

fixes CNVS-15257

test plan
- cause a peer review notification to be sent from an account with
 a domain name other than the default
- ensure that the links in the notification use the correct domain

Change-Id: Ia0042367317aab3308bc2c8c82138ee1de22f22a
Reviewed-on: https://gerrit.instructure.com/42108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Fix alerts label/radio button Firefox bug

In Firefox, when an `input` is inside a `label`,
and the `label` is for a `radio` button that's
not that `input`, and that `input` is focused,
the focus shifts from the `input` to the `radio`
button, not allowing you to type within that input.
This is a known Firefox "bug":
https://bugzilla.mozilla.org/show_bug.cgi?id=213519

fixes CNVS-15519

test plan:
-Log in as account admin
-In account settings enable "Alerts (Beta)"
-Click on the "Alerts" tab and start to set up an alert.
-Try to type a value for "Re-send alert every __ days until resolved"
-Numeric value can be typed and saved.

Change-Id: I1d71d803b55879eaa0c279e19be136e7c3614570
Reviewed-on: https://gerrit.instructure.com/42186
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
add user access logging to various endpoints

test plan:
* with cassandra and page views enabled, should be able to
log user access to:
 - course home
 - course modules index
 - outcomes index,
 - assignments index
 - pages index
 - external urls
 - external tools tools

(and be able to view them in the user access report)

* also confirm that visiting the discussions index
does not register multiple views when visiting once

closes #CNVS-15321

Change-Id: I43329b1764cdf0c313f548f6aefa3af26c03f300
Reviewed-on: https://gerrit.instructure.com/42075
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
don't use write_attribute for primary_enrollment data

refs CNVS-15830

test plan:
 * the courses menu should not asplode

Change-Id: Ibec8f2496df476767472bf2245edde63909e7b16
Reviewed-on: https://gerrit.instructure.com/41980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
avoid writing bogus attributes during report

refs CNVS-15830

test plan:
 * run the student_assignment_outcome_map report
 * it shouldn't asplode, and assignment url and submission date
   columns should have data (once you have any rows in the report
   at all - looks like you need a submission for an assignment tied
   to an outcome)

Change-Id: I0a202dc9c08ee8a95d614105f31a13f0cf961a0c
Reviewed-on: https://gerrit.instructure.com/41981
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix writing attachments as an attribute on a submission

refs CNVS-15830

test plan:
 * submit some homework with multiple files
 * they should all be there

Change-Id: Iba881874552b9d93255467bbecc6f4607d2d95c2
Reviewed-on: https://gerrit.instructure.com/41973
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
no more dynamic finders

fixes CNVS-15126

Change-Id: I48b99ff69942463df6d6c355fe6f8a2fc679e69a
Reviewed-on: https://gerrit.instructure.com/41969
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
add lti variable substitution for $Canvas.api.baseUrl

test plan
 - install a tool with the $Canvas.api.baseUrl custom param
 - it should substitute with scheme, host, and port

fixes PLAT-668

Change-Id: I7ca633fd3e44dcf632aefb59491866554636226f
Reviewed-on: https://gerrit.instructure.com/42119
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>