conferences: reload after starting conference

fixes CNVS-8289

test plan:
  * create a conference
  * click the "Start" button
  * verify that a new window or tab opens
  * wait for the conference to load
  * return to the original window
  * verify that the conference now has a "Join" button
      and does not allow editing type or duration

Change-Id: Ib247693e540fa621e209e0ffa740d6324ccb4dc4
Reviewed-on: https://gerrit.instructure.com/27618
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
remove tinychat code

fixes CNVS-10058

canvas no longer integrates with tinychat; this commit
removes legacy references to it.

test plan:
  * run specs

Change-Id: I4887e901d57ff39f8554af3e4eacd52ec4edd6e5
Reviewed-on: https://gerrit.instructure.com/27621
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
fix "enter" in guard

- you must run guard from the root of the project
  for this stuff to compile

Change-Id: I8d35448f2c54c4ff59cfbcb792af1911f96ea8e4
Reviewed-on: https://gerrit.instructure.com/27669
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
force encoding on all string fields in page views

The idea was to have a generic solution so
if we add fields to be tracked and exported
or displayed to users, we don't forget to force
the encoding and thus end up with an obscure
bug we only see in production.

Fixes CNVS-9528

Test plan
- in production environment
- Go to a users account details page where they
  have page views.
- Download the CSV file from the top right corner
  of the page views listing.
- Open the CSV file and check the "Remote IP"
  column to the far right.

Change-Id: I83250f218936c8af0b3a7ae2ff69e777034e731c
Reviewed-on: https://gerrit.instructure.com/26798
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
Quiz Submissions API - Create & Complete

Allows users to start a "quiz-taking session" via the API by creating
a QuizSubmission and later on completing it.

Note that this patch isn't concerned with actually using the QS to
answer questions. That task will be the concern of a new API controller,
QuizSubmissionQuestions.

closes CNVS-8980

TEST PLAN
---- ----

- Create a quiz
- Keep a tab open on the Moderate Quiz (MQ from now) page

Create the quiz submission (ie, start a quiz-taking session):

- Via the API, as a student:
  - POST to /courses/:course_id/quizzes/:quiz_id/submissions
    - Verify that you receive a 200 response with the newly created
      QuizSubmission in the JSON response.
    - Copy the "validation_token" field down, you will need this later
    - Go to the MQ tab and verify that it says the student has started a
      quiz attempt

Complete the quiz submission (ie, finish a quiz-taking session):

- Via the API, as a student, prepare a request with:
  - Method: POST
  - URI: /courses/:course_id/quizzes/:quiz_id/submissions/:id/complete
  - Parameter "validation_token" to what you copied earlier
  - Parameter "attempt" to the current attempt number (starts at 1)
  - Now perform the request, and:
    - Verify that you receive a 200 response
    - Go to the MQ tab and verify that it says the submission has been
      completed (ie, Time column reads "finished in X seconds/minutes")

Other stuff to test (failure scenarios):

The first endpoint (one for starting a quiz attempt) should reject your
request in any of the following cases:

  - The quiz has been locked
  - You are not enrolled in the quiz course
  - The Quiz has an Access Code that you either didn't pass, or passed
    incorrectly
  - The Quiz has an IP filter and you're not in the address range
  - You are already taking the quiz (you've created the submission and
    did not call /complete yet)
  - You are not currently taking the quiz, but you already took it
    earlier and the Quiz does not allow for multiple attempts

The second endpoint (one for completing the quiz attempt) should reject
your request in any of the following cases:

  - You pass in an invalid "validation_token"
  - You already completed that quiz submission (e.g, you called that
    endpoint earlier)

Change-Id: Iff8a47859d7477c210de46ea034544d5e2527fb2
Reviewed-on: https://gerrit.instructure.com/27015
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Updated de translation
fixes tooltip for first row in gradebook2

fixes CNVS-1479

also fixes intermittent issues with tooltips not displaying properly for
random rows

test plan
- once in a small class, and once in a class with lots of students
- grade some assignment/quiz submissions
- pull up gradebook2
- verify that all "x/x pts" tooltips are visible, especially the first
  row (first row should appear below the cell; all other rows tooltip
should appear above the cell)
- verify that other tooltips are still visible ("Text Submission", etc)
- reorder columns and verify that first row tool tip is visible

Change-Id: I822123c754ba545168e13d8e23c27c55d029299d
Reviewed-on: https://gerrit.instructure.com/27500
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
Merge pull request #379 from Kulgar/peer-reviews-bugs

Peer reviews bugs
rearrange enrollments API query

avoid inline includes, cause they kill performance in very large courses and it's
trying to sort huge amounts of data

test plan:
 * regression test enrollments list API (from a course, a section, and a user)

Change-Id: Ie5bd4085e3520f918c1c86b611f236c751b5474f
Reviewed-on: https://gerrit.instructure.com/27553
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
use ic-actions for quiz settings menu

closes CNVS-9398

test plan:
  - enable fabulous quizzes
  - navigate to quizzes index
  - verify that settings pop up menu works as before
  - verify that settings pop up menu is still accessible
  - verify that new settings style work for design

Change-Id: Ia734c9b1bf0299a396a77b602e55f4010c34dfee
Reviewed-on: https://gerrit.instructure.com/27175
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
fix wiki page revisions to not wrap names

test plan:
 - with draft state enabled
 - click 'View Page History' on a course Page
 * notice names on page revisions are elided rather than wrapped

fixes CNVS-10075

Change-Id: I17109b341ad0ba873988ac14c1f93c7d0e7bc05b
Reviewed-on: https://gerrit.instructure.com/27734
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
patch Rack parse_multipart to fix mobile uploads

test plan:
 - have a Canvas instance that uses local file storage (not S3)
 - acquire an Android app that can talk to this instance
   (the Play Store build will not)
 - ensure the app can upload a file (such as a profile picture)
   to the Canvas instance

fixes CNVS-10065

Change-Id: I942cc60c5a408a064955e0c2f629d4a02d366a5e
Reviewed-on: https://gerrit.instructure.com/27698
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
return empty array for api pagination past end

existing API users need API endpoints to return [] when given a page
past the end of the collection, rather than returning a 404. hopefully
this workaround is temporary...

test-plan:
 - request /api/v1/courses/:course_id/users
 - note the page number in the rel=last url of the Link header in the
   response
 - request /api/v1/courses/:course_id/users?page=<1 more than that>
 - should return an empty array of results
 - should not respond with a 404

Change-Id: Ic8639c7acd2bd07835e8216dd74c1cff0ed51c10
Reviewed-on: https://gerrit.instructure.com/27650
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Updated de translation
skip authlogic 3.2 remember_me check for rails 3

authlogic expects a timestamp in the place where we use
a uuid for SessionPersistenceToken

test plan:
* boot up server in Rails 3 mode
* try to login with "Remember Me" checked

Change-Id: Ic184e80be65b5d5a9be3edd16538949e36569c92
Reviewed-on: https://gerrit.instructure.com/27733
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
fix deconstruction of joins with aliases

Change-Id: I7b8bc73bd546e08723a0dfdca932e9f617ab36dd
Reviewed-on: https://gerrit.instructure.com/27680
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Hide group search during random user assignment

Fixes CNVS-10031.

Test plan:
  - Set up a large-roster course
  - Add some students to the course
  - Create a group set for that course
  - Add some groups to that group set
  - Trigger random assignment
  - Note the disappearance of the search field
  - Note its reappearance after assignment completes

Change-Id: I173ddbc3b2dd41ffebf59d5a3747ad564052c98f
Reviewed-on: https://gerrit.instructure.com/27627
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
unlock_expired_jobs doesn't exist anymore

Change-Id: Ib96d6a579473eb3165711c30941ac50640b65a73
Reviewed-on: https://gerrit.instructure.com/27652
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fix adobe connect conferences

fixes CNVS-10092

test plan:
  * create a new adobe connect conference;
  * start the conference;
  * reload the conferences page in canvas and verify
    that it loads without an error.

Change-Id: Iba63fe121138295e589f8f099c8f27cb4d06c9b7
Reviewed-on: https://gerrit.instructure.com/27720
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
fix UsersController#all_menu_courses for rails 3

@template is not defined in rails 3

Change-Id: Ic2f4fbcb36c19715077c0ed0819e8b3dff175e00
Reviewed-on: https://gerrit.instructure.com/27611
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>