consolidate i18n strings in account reports

refs CNVS-13751

test plan
 - rake i18n:generate should not fail

Change-Id: I27ee88ba85b84a1e5d13c3993fcad8e1b5006ff4
Reviewed-on: https://gerrit.instructure.com/36834
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Quiz Submission Questions - Bulk-answering

This patch makes the QSQ API accept answers to more than one question in
the same API call.

Closes CNVS-13667

TEST PLAN
---- ----

  - create a quiz with two or more questions
  - generate a submission, don't turn it in just yet
  - hit the API with a request similar to the example shown below:
    [POST] /api/v1/quiz_submissions/:id/questions
    - verify that the answers get through by checking the response of
      the API (should include the answers) and by turning in the quiz to
      make sure
  - verify the API docs r updated
  - other things you may want to test but are already covered by specs:
    - try hitting the endpoint against another student's submission,
      shouldn't work
    - try hitting the endpoint anonymously, shouldn't work either

Example request:

{
  "validation_token": "foobar",
  "attempt": 1,
  "quiz_questions": [{
    "id": "QUESTION_ID",
    "answer": "ANSWER_ID",
  }, {
    "id": "2",
    "answer": 42
  }]
}

The validation token is what you get when you generate the submission
(or just hit the API to retrieve the submission and it will include it
in the output.)

Change-Id: Iecec247efc4389883e49265005ffe77eae421a5c
Reviewed-on: https://gerrit.instructure.com/36559
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
don't load rspec rake tasks if on production

closes #CNVS-13742

Change-Id: Ie18a0f5198838cdfe5f680b340a4a4c0ca15b0a7
Reviewed-on: https://gerrit.instructure.com/36865
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
fixes broken links in api documentation to LTI

fixes CNVS-13740

test plan
 - run rake doc:api
 - /doc/api/file.tools_intro.html should render
 - links to LTI resources should work

Change-Id: Ifb90b0f23ef84d3376fea445057ded2a256d820b
Reviewed-on: https://gerrit.instructure.com/36816
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
move Bullet config inside config block

Change-Id: I699cf95823fdb2e5e1b8ea6d62829c95e737d246
Reviewed-on: https://gerrit.instructure.com/36890
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Tested-by: Hannah Bottalla <hannah@instructure.com>
fix page view controller and action logging in rails 3

test plan:
* enable page views in rails 3
* using the api, retrieve the page views for a user
* the 'controller' and 'action' fields should not be null

fixes #CNVS-13769

Change-Id: I19748f0f4bb455c8932283adf2a04b2f7d445554
Reviewed-on: https://gerrit.instructure.com/36886
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
fix two speedgrader i18n issues

fixes CNVS-12953

test plan:
- create an assignment that needs submission and 4 students
- have 3 students submit, grade 2 of them, and have 1 of the graded ones
  resubmit
- check in the speedgrader dropdown, the help text that shows up underneath the
  student names when you hover over them
- there should be 1 each of 'graded', 'not graded', 'not submitted', and
  'graded, then resubmitted...'
- make sure they are localized (i18n)
- also make sure the link to speedgrader for teachers in the right sidebar of
  an assignment page is localized

Change-Id: I62388220f6bd2c0bdf71d79e9d2802ac51db112e
Reviewed-on: https://gerrit.instructure.com/36666
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
spec: remove bullet-instructure gem

Change-Id: I0881a9f5329b5c594fe55127548d4a54ba45ad60
Reviewed-on: https://gerrit.instructure.com/36964
Reviewed-by: Hannah Bottalla <hannah@instructure.com>
Product-Review: Hannah Bottalla <hannah@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Hannah Bottalla <hannah@instructure.com>
spec: canvas_cassandra vendored_gems cassandra setup

Change-Id: I2a5a2100f3f0d818376675f7a1e085032241a006
Reviewed-on: https://gerrit.instructure.com/36947
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
escape quiz titles in ember show page

fixes CNVS-13699
this commit escapes any HTML present in a quiz's title when it's
rendered in the breadcrumbs.

Test plan
- As a teacher, create a quiz in the new Ember show design, with HTML in
  the title (e.g., "Unnamed Quiz <script>alert('Oh noes!');</script>")
- The HTML should be escaped in the breadcrumbs, and any script tags
  shouldn't execute.
- The same should apply when editing quizzes.

Change-Id: Ifc67063d053995b3f20d14b029fae2460f7de382
Reviewed-on: https://gerrit.instructure.com/36784
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
use rails 3 method for setting table name

Change-Id: I137a3475ef1e0719150a0fd4eeddb5c0edd99cbb
Reviewed-on: https://gerrit.instructure.com/36942
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
shardify db tasks in rails 3

refs CNVS-13741

Change-Id: I36a3f6d2995681d72940fbc15d2548f548611a60
Reviewed-on: https://gerrit.instructure.com/36896
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fix switchman initializer for class reloading

Change-Id: I39477220c0f1751ae245d504a80bfcc986493fa2
Reviewed-on: https://gerrit.instructure.com/36957
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
don't sanitize title attributes in html content

test plan:
* try to save html content with a title attibute on an
 html element other than a or img:
 e.g. "<p title='a title'>text</p>"
* the attribute should not be removed

closes #CNVS-8357

Change-Id: Ib6bf534a75aa30fff8efc6345189114ff3718e1c
Reviewed-on: https://gerrit.instructure.com/36590
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
allow video and audio html tags in html content

test plan:
* try to add audio and video tags in html content
* should not remove the tags when saving

closes #CNVS-9660

Change-Id: I46e363d2150f16a07ec8cf096be8b7652c437254
Reviewed-on: https://gerrit.instructure.com/36594
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
fix user roster page scrolling

test plan:
* add more than 50 people to a course

 the easiest way to do this would probably be an sis import,
 or running the following in the console:

 c = Course.find(INSERT_COURSE_ID_HERE)
 60.times { c.enroll_user(User.create!) }

* confirm that the people page scrolls and
 paginates correctly

fixes #CNVS-13646

Change-Id: If84251963e5502dddb5fbdac54c98b9d64bfa128
Reviewed-on: https://gerrit.instructure.com/36790
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
switch content migration select icon

fixes #CNVS-13640

Change-Id: If65ae0e3c49a2336cd0c1a47fc52721f6397e43e
Reviewed-on: https://gerrit.instructure.com/36589
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
hide Post Grades for non-SIS contexts

The "Post Grades" button should be hidden for courses and sections
that do not have an integration_id, and visible when they do.

Test Plan:
- Give a section an integration_id and it should show the
  Post Grades button when selected

Fixes SIS-333

Change-Id: I31fdc25db0ee58a528f5c4010fdab70f132a1998
Reviewed-on: https://gerrit.instructure.com/36768
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Reviewed-by: Eric Adams <eadams@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Accessibility: Added label to criterion long description in rubrics

Fixes CNVS-13129

Test plan:
- Visit the rubrics page.
- Click add rubric.
- Click to show the long description.
- With a screen reader, verify that the long description field is labeled.
- Edit an existing rubric, and verify that the same field is also labeled.

Change-Id: Iccbda8a4b29676345e70b69bf5fee142a5d71aed
Reviewed-on: https://gerrit.instructure.com/36759
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
restrict admins from creating or deleting more powerful admins

fixes CNVS-13351

test plan:
 * created an admin role that has permission to create other admins,
   but that's it
 * as an admin in that role, it should only show that role as one
   to choose for new admins
 * you should only be able to delete admins in that role
 * verify both of the above are enforced via the API

Change-Id: I11459567ab184d787ee02af55280e0f4f76d47e8
Reviewed-on: https://gerrit.instructure.com/35672
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>