allow checkboxes to be used as elementTogglers

Change-Id: I4a9303d1f051633d3a53806c377fe78842e7d682
Reviewed-on: https://gerrit.instructure.com/12650
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
add 'checkbox' handlebars helper for making <input type=checkbox>es

Change-Id: Ie92e69a14ab4078fd401e98adfc764b960e2058b
Reviewed-on: https://gerrit.instructure.com/12652
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
provide a way to pass options to 'sync' with ValidatedFormView

Change-Id: If9b6fd458688c04e9ea6dbf8de41b2c70ed9d83b
Reviewed-on: https://gerrit.instructure.com/12653
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
make formToJSON handle special inputs like .datetime_field tinyMCE and files

Change-Id: Ieadb3d09d9eea69a7113d683b9cfef256c0d0a5f
Reviewed-on: https://gerrit.instructure.com/12654
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
authentication required flash notice -> warning

changes styling from green check to yellow warning

from: http://cl.ly/image/223A2x1G0D00
to: http://cl.ly/image/39400E2C0B3r

Change-Id: I80a5f8e001ced5ea924eb5498bfa3c3ce825cc3f
Reviewed-on: https://gerrit.instructure.com/12758
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
disable group settings page (fixes #9767)

Test plan:
  * Go to a group's page
  * There should not be a 'Settings' link in the sidebar
  * Appending /edit  to the URL should result in a 404

Change-Id: I7c2115f6c42d420c306aa312d2c7ec319d08b115
Reviewed-on: https://gerrit.instructure.com/12747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
tag these migrations as predeploy

They add a column and a table, so they need to happen before the new
code that uses that new schema is running

Change-Id: I9b9eb1c175af91eba7042906ae5fbf66fd9516e2
Reviewed-on: https://gerrit.instructure.com/12764
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
make Backbone.syncWithMultipart return a deferred object

…to keep consistent with Backbone.sync's API

Change-Id: I212cd9ce0fbf1864efd22e7750d201a2e73b1cdb
Reviewed-on: https://gerrit.instructure.com/12651
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
track request timing and error reports with statsd

Adds an infrastructure for using statsd (configured with
config/statsd.yml) and uses it to track a few basic stats. Stat names
are appended with the hostname.

test plan: without statsd enabled, make sure no errors are raised when
doing requests. add a statsd.yml configuration, restart the server, and
verify that stats are sent over UDP to the given host/port (this could
even be checked without statsd available, by monitoring UDP traffic)

Change-Id: Ie8c3ece7e08ff48616ffd968069bd760300e4fd2
Reviewed-on: https://gerrit.instructure.com/12673
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
validate that account chain loops aren't created

fixes #9768

test plan:
 * create two accounts via SIS that reference each other (you'll need
   to add the first account two times, once valid, the second changing
   its parent to the other account)
 * one of the accounts should cause a warning about a loop

Change-Id: Ieb1710a1d0b7d11c652d8e000dcf33b63d2b187f
Reviewed-on: https://gerrit.instructure.com/12749
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
api: only allow interacting with active logins

for listing, updating, and deleting logins through the api, only return or
interact with active logins.

test plan:
- with the api, create a couple of logins for a user, and delete one of them
- make sure it doesn't show up when listing logins for that user
- make sure you can't modify the deleted one
- make sure you can't delete the deleted one again

Change-Id: I78e838d5fa835860f48b9ee17c668721584c6d54
Reviewed-on: https://gerrit.instructure.com/12760
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
update moodle2cc gem

Change-Id: Icbc03a13ba0dcd0d15b1bc9a4006b475ffe5c73a
Reviewed-on: https://gerrit.instructure.com/12761
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fix wording on remove-user prompt; fixes #9758

test plan:
 * attempt to remove a user from a course
 * you should get an "Are you sure...?" type prompt, not
   "Remove User from Course"

Change-Id: Id49438985533d3566ac9df06d5ffdb38243b9e96
Reviewed-on: https://gerrit.instructure.com/12748
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
make ConnectionSpecification extensions cache coherent

refs #9786

Change-Id: I0cdb23840a00be0dde48d5b8a865263842742050
Reviewed-on: https://gerrit.instructure.com/12777
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
update ruby-saml to validate saml assertions with libxmlsec1

fixes #9634

test plan:
 * saml should still work
 * some problematic SAML IDPs (e.g., shibboleth) should now work

Change-Id: Ie4307d0bc5490af5117055b0b342f5b4e3266984
Reviewed-on: https://gerrit.instructure.com/12731
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
html file editing fixes fixes #9785

- can open the dialog multiple times without
  getting into a strange state
- can save files from the editor

Change-Id: I8dd0eea66a61e3fcfb5e215714493c2bab1e1f8b
Reviewed-on: https://gerrit.instructure.com/12766
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
pass user.id to path helper instead of user

The user was getting marshalled when caching the profile tabs.

Test plan:
  * Go to your profile page on an account with profiles enabled
  * The profile tab should still work

Change-Id: I60b4882859396fd3e9cc63416b75ae831f7fe4f0
Reviewed-on: https://gerrit.instructure.com/12804
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refactor jobs admin functionality to not use AR queries

A set of class functions were added to Delayed::Backend::ActiveRecord
for all the querying a updating functionality that the jobs admin needs,
so that no direct ActiveRecord queries are needed. The /jobs UI is
refactored to use these new functions.

There are a few differences in behavior: The search isn't a combined
wildcard search anymore. Instead, new "flavors" were added to the
drop-down for strand, tag, and ID. The search box searches only the
selected attribute, and it's exact match now.

Specs are being updated to use these new functions as well. Eventually,
no direct AR queries will be done against Jobs anywhere, so that non-AR
jobs backends are possible.

Also as part of this, all jobs require a queue now. Passing nil for the
queue will use the default of Delayed::Worker.queue.

test plan: Load /jobs, and verify that it works as before except where
there are differences as described above.
  * Selecting flavors of jobs lists only those jobs.
  * Searching by ID, strand or tag works.
  * The hold/unhold/delete actions work in the various combinations of
    filtering/searching.
  * Linking to an individual job still works (though the query string
    has changed so old links don't work)
  * Running jobs and list of popular tags still works as expected.

Change-Id: Iffd5b8c7b3d6e4b128792a9dee7b97c6dfb251dc
Reviewed-on: https://gerrit.instructure.com/12632
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
make allow/deny flash buttons for media comments clickable.

fixes #9740

a bug was introduced in chrome 21 for mac that makes the
allow/deny buttons in flash objects unclickable if the parent
object is given a non-integer position in the DOM.

this fix loops through all flash objects in the media comments
popup and adjusts their position in the DOM by the difference
between their current position and the rounded value of that
position.

test plan:
  * enable media comments on an account;
  * log in as an admin or teacher and visit a course's
    announcements page;
  * click the new announcement button, and then the record/
    upload media button in tinymce;
  * verify that you can click the "allow" button inside of the
    flash content.

Change-Id: I3bf4f10f728bfde3e84f06754bf5baa9722335ff
Reviewed-on: https://gerrit.instructure.com/12756
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
set max-width for page view table url column

fixes #9743

set a max-width and ellipsis overflow so that long urls in this column doesn't
push all the other columns off the edge of the page.

test plan:
- visit a really long canvas url (a good candidate is clicking 'more options'
  when creating an assignment)
- go to the users page (/users/:id)
- you should see the long url, as well as all the other columns
- check in all major browsers

Change-Id: I96dd25f3efcbbca6eb2036f10b4491b9ac1ae049
Reviewed-on: https://gerrit.instructure.com/12750
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>