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>
add submission inclusion for students in polling

fixes CNVS-13826
This commit embeds a student's own submission into the poll sessions
endpoints.

Test plan
1. As a teacher, create a poll with choices and an opened session.
2. As a student, submit a submission to the poll session.
3. As the student, request the poll sessions GET show endpoint.
- The student's submission should be available in the "poll_submissions"
  field.

Other considerations are privacy: a student shouldn't be able to see
others' submissions (unless the poll session has public results).

Change-Id: I6050d5597fd44c0c0e9672b8e69a38022a3ea22d
Reviewed-on: https://gerrit.instructure.com/37078
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
student learning mastery: fix truncation of non-paragraphs

test plan:
  * create an outcome
  * for the description, paste in a div of text from another page
  * view the outcome on the student learning mastery page
  * verify that the description is truncated

Change-Id: I6d89fb9e321e16edde2e7be5e65f7ec4af618e70
Reviewed-on: https://gerrit.instructure.com/36571
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
spec: basic once-ler integration, speed up some specs

see https://github.com/instructure/once-ler

in rails3, reduce spec/models/a* runtime by ~45% (15min -> 8.5min locally)

Change-Id: Ia7bbc36c3602c3c3742c1b894e539584323f3e14
Reviewed-on: https://gerrit.instructure.com/37043
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
don't double-escape filenames for attachments with root attachment

fixes #CNVS-13710

Change-Id: Icf3fd3b81ae841343047cea51663d1eeceed0e8d
Reviewed-on: https://gerrit.instructure.com/36778
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
export CC 1.3 assignment extension

test plan:
 - have an assignment in a course that has points possible
   and submission types
 - use the content exports API to export the course,
   supplying the currently undocumented parameter
   version=1.3
  a) examine the exported XML and verify that it follows
     the IMS standards
     http://www.imsglobal.org/cc/ccv1p3/AssignmentContentType.html
     http://www.imsglobal.org/cc/ccv1p3/CCv1p3Variantguidelines.pdf
  b) ensure the exported course re-imports correctly

fixes CNVS-13503

Change-Id: Iad8a54e94696962d362cfdb48fe03e06a90937ff
Reviewed-on: https://gerrit.instructure.com/36283
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
add group and user file index endpoints

test plan:
 - consult the "List files" API endpoint documentation
   you should see course, group, user, and folder versions
 - exercise the group and user calls

fixes CNVS-13827

Change-Id: Ic3b0b374254a6a0ef0c986b43b9b29c08b98f202
Reviewed-on: https://gerrit.instructure.com/37032
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
spec: once-ler spec/models/{b,c}*

in rails3, reduce runtime by >25% (25.5min -> 18.5min locally)

Change-Id: If2980f721f59fc04cff8d77857bb8554190c1935
Reviewed-on: https://gerrit.instructure.com/37072
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Accessibility: Labels the add users field

Fixes CNVS-13732

Test plan:
- Using a screen reader, visit the course roster.
- Open the add user dialog.
- Validate that the entry field for the email addresses is labeled.

Change-Id: I844152cedb452d0cb3030efbdb030196fc8c86b8
Reviewed-on: https://gerrit.instructure.com/36927
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
always show "Courses" instead of "Home" in global nav tab

test plan:
* confirm that all users have "Courses" in the top global
navigation (instead of "Home")

fixes #CNVS-9701

Change-Id: Idc9200e5a55d8010b3cc7df61592c23b78056389
Reviewed-on: https://gerrit.instructure.com/36730
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
make module prereq more accessible

fixes CNVS-13550

-- Test Plan --

As a user that can edit module items
Given I'm using JAWS and/or voice over
When I edit a module
And I add a pre-req to the module
Then adding a pre-req should be accessible in JAWs
And the "remove" pre-req X should be a button
And the "remove" pre-req X should have a label on it

Change-Id: I421134cbf42f03bac9d7a9a9bc3d425937f7374b
Reviewed-on: https://gerrit.instructure.com/36290
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
refactor lti variable substitutor

to allow for a wider range of variable substitutions

Test Plan: All current variable substitutions should still work

Change-Id: I8260b73d05bc90059b2317ddabce4c064940ecc4
Reviewed-on: https://gerrit.instructure.com/36804
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
remove travis.ci badge until we are re-enabled

Change-Id: I5de983828885d5d604dffebc7850efd717342e0b
Reviewed-on: https://gerrit.instructure.com/37130
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
spec: fix auditor spec regressions

undo the change in f42af73 ... since we were reusing models but not
clearing out cassandra, one spec could interfere with another

Change-Id: Iae606575ce53f54e6659159e49a6e79a42e42ae5
Reviewed-on: https://gerrit.instructure.com/37161
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
spec: once-ler spec/models/[d-g]*

in rails3, reduce runtime by 45% (11min -> 6min locally)

Change-Id: Id7253cb71a7f96a4f3fd4a979cbdea635edec35f
Reviewed-on: https://gerrit.instructure.com/37115
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fix initial setup without add_user

Change-Id: Ia7e75729cfb4cf8e1ede6294e9da8848f680923b
Reviewed-on: https://gerrit.instructure.com/37139
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
allow ruby master to run with scary warning

sometimes it's needed to debug stuff in 2.1, cause it
fixes SystemStackError

bundler doesn't support it yet, so we have to use conditionals
instead of platform options

Change-Id: I88614634d24f36d7c18c999c1dc65eb91df65a32
Reviewed-on: https://gerrit.instructure.com/37010
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
return enrollment object by id through api

fixes SIS-331

TestPlan:
 - create a new enrollment object in a course
 - get the enrollment id of the object
 - return the object through the api
   - /api/v1/accounts/:account_id/enrollments/:id
 - enrollment should return if proper privileges are present

Change-Id: Ib8c83af6d53e5d048047a024aa37228cb5eab8f2
Reviewed-on: https://gerrit.instructure.com/36772
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
Tested-by: Tyler Pickett <tpickett+gerrit@instructure.com>
backport rails4's nullifaction of association scopes on new records

fixes CNVS-13824

test plan:
- with rails3, you should be able to create new course modules without error

Change-Id: I02c38f6d50eff575fc4c7f3371735eaf5d33f332
Reviewed-on: https://gerrit.instructure.com/37165
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>