add new collaborator picker interface. fixes #CNVS-1160

test plan:
  * set up etherpad and google docs collaborations at
    /plugins;
  * navigate to a course collaborations page and test
    creating both an etherpad and google docs
    collaboration (for google docs, make sure that each
    user has a gmail account set up);
  * verify that the picker properly loads and alphabetizes
    course users and groups;
  * verify that you can select both users and groups to
    collaborate with;
  * as a student, verify that the picker only displays
    groups that you are a member of;
  * verify that editing a collaboration works as expected
    and that, on update, the collaborators list is
    properly updated;
  * navigate to a group's collaborations page and verify
    that it also works as expected, but that the
    people/groups filters are not displayed and that only
    users can be selected.

Change-Id: I99372daff141f2d0847dacbe88c5d289d117a5f9
Reviewed-on: https://gerrit.instructure.com/16343
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
add a specific setting for self registration refs #2660

test plan:
 * a fresh account should not be able to visit /register
 * enable self_registration in script/console for the account
   (see the migration)
 * you should now be able to visit /register
 * no other changes should be visible

Change-Id: Ibfd6a0d23d3c3e37243ffb762e284b8907cd45cc
Reviewed-on: https://gerrit.instructure.com/16713
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
users tab: don't increment the count with duplicate enrollments

test plan:
 - have a user with a login enrolled in a course
 - in the users tab, try to add that user again, in the same role,
   using the user's login id
  - you should see an "already existed" message, and the count
    above the role should not change
 - the above should still work if this user is preceded by more
   than 16 other users in the enrollment list (that is, we should
   still recognize the user as already enrolled even if they're
   not loaded in the paginated list; please do a refresh before
   enrolling the test student to make sure the buffer students
   aren't loaded)

fixes #CNVS-2767
fixes #CNVS-2770

Change-Id: I2ee56b48ac7dc382cb352c4e99d02e86480aec95
Reviewed-on: https://gerrit.instructure.com/16720
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
include adobe connect web conferences gem. fixes CNVS-1275

test plan:
  * bundle install and verify that canvas_connect is
    installed;
  * as a site or account admin, navigate to /plugins and
    verify that the adobe connect plugin is visible.

Change-Id: I60eac7abbc7f014b79d86a04e77c197c0e1eb976
Reviewed-on: https://gerrit.instructure.com/16256
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
use assignment overrides for all sections on student view student

test plan:
 * create section overrides for an assignment
 * enter student view
 * the latest override across all sections should be
reflected in views where vdd has been implemented

closes #CNVS-388

Change-Id: I22d02e228c596d431835117383d12c7311f13a7a
Reviewed-on: https://gerrit.instructure.com/16529
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
parallelized gem update better escaping for rerun examples

Change-Id: Iad81d8d40f8e6cb0c5470ba20690aa13622353f5
Reviewed-on: https://gerrit.instructure.com/16747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
add allow_student_discussion_topics course setting

test plan:

1. log in as a student and go to:
   /courses/:id/discussion_topics/
   - the “start a discussion” button should work
2. open script/console
3. Find a course and change the setting, i.e.:
   c = Course.find(1)
   c.allow_student_discussion_topics = false
   c.save!
4. Log in as a student and go to:
   /courses/:id/discussion_topics/
   - The “start a discussion” button should not
     display

UI coming in a different commit

closes #CNVS-2613

Change-Id: I162b0356f1e23bee2bdb89f7797976bc3bab192d
Reviewed-on: https://gerrit.instructure.com/16674
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
api: enable assignment peer review options

test plan:
  - through the api, create an assignment with automatic_peer_reviews
    set to false. your response should not have the keys
    'peer_review_count' and 'peer_reviews_assign_at'.
  - through the api, update the same assignment to have
    automatic_peer_reviews of true. Your response should ahve the keys
    'peer_review_count' and 'peer_reviews_assign_at'.
  - Try updating the peer_review_count and peer_reviews_assign_at
    through the api (you will need automatic_peer_reviews set to true!).
    These values should update when sent through the api.

Change-Id: If0457a5b7d3441137a445a51794800e46563dab2
Reviewed-on: https://gerrit.instructure.com/16733
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Erik Lyngved <erik@12spokes.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
don't try to sanitize params on already graded quiz

in order to sanitize params on a can't go back quiz, we need to compare them
with the params in submission_data, which doesn't work if the quiz is already
graded and submission_data has become an array.

fixes #CNVS-2795

test plan: i'm not positive how to reproduce this issue, because it requires
submitting an already submitted quiz.  maybe if you have a quiz open in two
different tabs and submit first in one and then in the other, it should
redirect you to the results page (although not change your answers)

Change-Id: I7a3cee402077343ab9de85a51ec33d02217c6754
Reviewed-on: https://gerrit.instructure.com/16736
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
QA-Review: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
spec: fix frozen string issue with spec in 1.9

Change-Id: Ia98e92e1171c98db9564d92d0da7606ed9c2b85b
Reviewed-on: https://gerrit.instructure.com/16737
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
strip invalid utf-8 when loading serialized AR columns

In ruby 1.8, it was possible to get invalid utf-8 into the database in
these columns, since the database doesn't check serialized columns
encoding, and ruby 1.8 won't check the encoding either. So in ruby 1.9,
you'll get an error when you try to actually use the data for most
things. This work-around recursively checks the serialized column for
any strings containing invalid utf-8, and just strips it out.

Fixes #CNVS-2587

test plan: using ruby 1.8, insert some bad utf-8 data into a serialized
column. one vector for doing this is to put it in a quiz question. then
switch to ruby 1.9, and verify you can load up the quiz question, and
the bad data has been scrubbed out.

Change-Id: I3272e46dbe5e9b424998c3c7459ea6f5b6b363d4
Reviewed-on: https://gerrit.instructure.com/16619
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Fix internet explorer issues with permission buttons

Test Plan
Go to the permissions page to manage an admin or
account.

Button drop down should work in i.e. including
selecting items.

closes #CNVS-2540

Change-Id: If190186dc296912e6febf33c908c1d7c5338d3c5
Reviewed-on: https://gerrit.instructure.com/16538
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
add accessibility layer to tinymce editor

Make it easy to add accessibility text to TinyMCE components
so that we don't have to directly edit the core Tiny library

Added some label for font options in the editor

Test Plan:
 * Navigate through the TinyMCE options and the voice over should tell you to "press down" to use the font size, font formatting, text color, and background color options

closes #CNVS-282

Change-Id: I74526848cb713ca4148c21b6f6fab6ce70090404
Reviewed-on: https://gerrit.instructure.com/16500
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Return all events from the calendar_events api

Optional parameter :all_events causes all date criteria (:undated,
:start_date, and :end_date) to be ignored

Test Plan:
 * Use the calendar_events api to query events and assignments
   (events and assignments must be queried separately)
 * Set the :all_events parameter to true
 * Check that all events/assignments are returned
   (:undated, :start_date, and :end_date should have no effect)

fixes #CNVS-2437

Change-Id: Id3d5eb49b98d9b4713815764e14272ce38266d04
Reviewed-on: https://gerrit.instructure.com/16710
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
properly handle assignments with no points possible

fixes #CNVS-2475

* these assignments were previously being ignored in ruby-land
* caused an infinite loop in the js grade-dropper

Test plan:
  * make an assignment with 0 points possible in an assignment group
    with grade dropping rules
  * make sure the grades in js and ruby are correct

Change-Id: Id9f478f79ea83c7382b2fa5dbca8c0b45dbb6fc4
Reviewed-on: https://gerrit.instructure.com/16417
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
do away with user-merge warnings when unnecessary

refs #CNVS-1959

remove session interaction, everything is
now tracked with parameters.  Also
removed the "confirm_merge" action which
does not appear to be used.

Test Plan:
1) login as an admin
2) try to merge two users together
3) as long as the users being merged are 
  not the same user, you should not get a warning
  about how the user cannot be merged with itself.
  (naturally, if you DID try to merge a user 
   into itself, you absolutely should receive
   that warning)

Change-Id: I98fdb925b3f6d14b4de98737f9af8b6093312847
Reviewed-on: https://gerrit.instructure.com/16692
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
prevent local admins from making logins for site admins

refs #CNVS-2496

TEST PLAN:

1) login as a local admin
2) navigate to the user management page for a
site admin
3) try to add a new login for them
4) it should not work!



Change-Id: I66b81162baa2508431b0d106b37ac83b9d763dd3
Reviewed-on: https://gerrit.instructure.com/16620
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
handle concurrency problems with materialized views

fixes #CNVS-1554

test plan:
 * discussions should still work

Change-Id: I11e07e25c8e456e68acda519bcd412e9b25633f9
Reviewed-on: https://gerrit.instructure.com/16748
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Re-enable a "show" page for Calendar Events. Fixes #CNVS-1229

Testing Notes:
===========
* Create a user-created event in the calendar. When the event is clicked,
   the title in the popup now actually goes to a show page.
* Create an event in the context of a course (select the course
   in the right-side of the calendar, disable others).
   * Masquerade as a student in the course. Visit the Calendar.
   * Select the event, verify that the "title" is a link and works.
   * Should show the calendar event in the context of the course (sidebar)
* Click an event title and view the show page. If the user has permissions to
  edit the event, an edit and delete link should show on the right.
* Editing the event should work and correctly update the event.
* Deleting an event on the "show" page should work without error.
* Creating and editing an event on the dedicated page should
   redirect back to the calendar.

 NOTE: When viewing your own event, there is no sidebar on
 either side since it is viewed in the context of a user and not a course.

Change-Id: Ic8ed6f84bd75c30c8e35297399b281ac62205ba9
Reviewed-on: https://gerrit.instructure.com/16370
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
assignment dropping: really support never_drop

fixes #CNVS-2649

Test plan:
  * set up some non-trivial assortment of assignments in a
    assignment group with drop rules and never_drop rules
  * make sure the never_drop assignments are never dropped, and that the
    kept assignments result in the highest possible grade

Change-Id: Ia1963812d74cd547e9859dda78e1d8dacb4e9223
Reviewed-on: https://gerrit.instructure.com/16618
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>