twitter link sending to correct url

fixes CNVS-5147

test steps:
- trigger a twitter notification and ensure the link is pointing to
  the correct url (without 'mr' in the url)

Change-Id: Ib70b67039e919720c941c15ec1d20eca652d478b
Reviewed-on: https://gerrit.instructure.com/19882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
spec: fix registerTemplateCss test

the spec assumed it would be the only thing on the page doing
registerTemplateCss

Change-Id: I27d7433a4c7e35b73dc1bf3fdd6aa11289c00fbc
Reviewed-on: https://gerrit.instructure.com/20075
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
js extension mechanism for plugins, refs CNVS-5434

given app/coffeescripts/foo.coffee in canvas-lms, if you want to monkey
patch it from your plugin, create app/coffeescripts/extensions/foo.coffee
(in your plugin) like so:

define ->
  (Foo) ->
    Foo::zomg = -> "i added this method"
    Foo

and that's it, no changes required in canvas-lms, no plugin bundles, etc.

note that Foo is not an explicit dependency, it magically figures it out.
also note that your module should return a function that returns Foo.
this function will magically wrap around Foo so you can do stuff to it
anytime somebody requires "foo" as per usual.

test plan:
1. use it as explained above
2. it should work

Change-Id: If3b21782c0e79bb0ce55b4f16804047a2c2e2143
Reviewed-on: https://gerrit.instructure.com/20004
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fix deparam bug

don't blow the stack if the query string is empty

Change-Id: I7595cbd14f4d1433a0ea9b08fc143bec0723967e
Reviewed-on: https://gerrit.instructure.com/20058
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
wiki page draft state support

wiki pages can be unpublished but will still default to
active until the feature is enabled.

Test Plan:
 * make an unpublished course in the console
 * using the wiki api make sure students can't see it in
   the index or show actions

closes CNVS-5270

Change-Id: I48970ce9c6b86a3039432b6d7647810b434bfdfc
Reviewed-on: https://gerrit.instructure.com/20014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
updated the syllabus to better handle public courses

- added assignment links for public courses
- fixed images in the syllabus body for non-enrolled admins

test plan:
 * syllabus page is shown (including when the course home page is set to the syllabus)
 * images in the syllabus body are shown
 * links are presented when the user has access to the content (assignment, event, etc)

public and non-public courses for all role types, including:
 * teacher, ta, etc
 * student
 * anonymous (not logged in)
 * admin (with & without 'View Course Content' right)

fixes: CNVS-5364

Change-Id: Ieea5987530e67563c97eec2b495cfb8b712f8a03
Reviewed-on: https://gerrit.instructure.com/19822
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
wiki pages CRUD API

fixes CNVS-5279

test plan:
 - see API documentation to create/retrieve/update/delete pages
 - exercise endpoints, including
   - CRUD functionality (above)
   - test renaming page
   - test publishing / unpublishing
   - test creating the front page in a new course or group

Change-Id: I5d3b36615b7bdbfda0d4781db14cd7d49d32eba1
Reviewed-on: https://gerrit.instructure.com/19952
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fix assignment page with long names in narrow browser

fixes CNVS-1866

test plan:
- make a few assignments, some with long names, some with short names
- include due dates and points possible
- view the page as a teacher and make your browser window small
- the different columns (name, due, points) should stay vertically aligned
- should verify in multiple browsers

Change-Id: Ic2a234983f19668b4b6cf4e5b52474fdf5912bfb
Reviewed-on: https://gerrit.instructure.com/19960
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fix spacing between links in footer

fixes CNVS-5477

test plan:
- space between links in footer should be consistent

Change-Id: I14ecf80cf4f443c687e77fc743de038afc7a34d8
Reviewed-on: https://gerrit.instructure.com/19997
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
class to generate and save a quiz item analysis csv report

closes #CNVS-4578

no test plan, see specs

Change-Id: I9417e362fcead64b9e87647e615eab7318633262
Reviewed-on: https://gerrit.instructure.com/18696
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
keep media comment information in API round trip

closes CNVS-5218

test plan: insert audio and video comments into rich text that goes
through the api (for instance assignment descriptions, and discussion
entries). modify the content multiple times, the audio and video should
still play correctly. use the api to pull the same content, modify it,
and push it back through the api. the content should still play
correctly.

Change-Id: Id38ef78aaa478c66ae2314b30d33ec3f2199a6bd
Reviewed-on: https://gerrit.instructure.com/19598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
improve screenreader support for notification preferences.

fixes CNVS-4943

test plan:
  * view the notification preferences page using a screen
    reader;
  * verify that table headers are read properly and that
    each category is its own table.
  * verify that the page renders as it previously did and
    that the now 6 tables still like one table.

Change-Id: I07d0efeceec72644f9a0b9d3e8b06307c74403e6
Reviewed-on: https://gerrit.instructure.com/19857
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
bootstrap blockquotes font size consistency

test plan:
* in user generated content use blockquote tags
e.g. "<blockquote><p>text</p></blockquote>"
* confirm that the text size is consistent with
 the other text on the page

fixes #CNVS-5144

Change-Id: Iba46dffa4e1a81afb92ccc49b74e69c29b216eff
Reviewed-on: https://gerrit.instructure.com/19839
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fix and refactor content migration issue messages

test plan:
* import a package containing an item that is
 invalid so it will create a
 "Couldn't import the" item warning, but also
have an extremely long title (~250 characters)
(an example is attached to the ticket)
* confirm that when trying to import,
 the entire migration does not fail silently,
 and thus hang in the import phase,
 but instead creates a proper migration issue
 for the invalid item and continues the import
 normally

fixes #CNVS-5467

Change-Id: I2659ac0c5531ad609f3f58abc1fc0960e9d85c51
Reviewed-on: https://gerrit.instructure.com/19961
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
registration refactor, refs CNVS-5434

* expose templates so plugins can override them
* tweak ENV data we pass into js
* basic cilent-side field validations

test plan:
N/A, see plugin commit

Change-Id: Ic3998affc99e24f9c8d57b8f0068d03ae3be9fef
Reviewed-on: https://gerrit.instructure.com/20056
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
fix assignment due date editing if there are no sections for the course

test plan:
  - as an admin, create a course from the "Courses" tab in the admin
    settings for the account (you can get there by hovering over
    "Courses" in the top menu navigation, then clicking the account's
    name under "Managed Accounts."
  - Create an assignment for the course. Toggle "advanced options" on
    the assignment edit page. You should see the typical datepicker
    stuff there.
  - Save the assignment and make sure the dates get saved as usual.

fixes CNVS-5524

Change-Id: I88724bd745683473d9db494852a5982621b0c7f0
Reviewed-on: https://gerrit.instructure.com/20108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
don't mutate parent prototype embedded objects

Change-Id: Ib8890e124b399c24b46a23b2d1291e94090dd4e3
Reviewed-on: https://gerrit.instructure.com/20120
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
add basic grading info to assignments api for index action

test plan:
  - as a teacher, grade some students submissions for some assignments.
  - for good measure, make sure there is at least one student who hasn't
    been graded for each of the assignmetns
  - query the assignments index api
    (/api/v1/courses/:course_id/assignments) and pass an include
    parameter that is an array that has the string 'submission'
  - you should see a submission object in the response for each student
    with a submission.
  - the student who was not graded should not have the 'submission' field
    for each of his or assignments
  - make sure the api works both from the perspective of the teacher and
    student (teachers should not see the "grade" field in each of the
    assignments unless they have submitted and have beeng graded on that
    assignment)

closes CNVS-5316

Change-Id: I8f6f2c559a3355de4e3ad178c9ade695d7fe5b3a
Reviewed-on: https://gerrit.instructure.com/20006
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
fix gear menu accessibility. fixes CNVS-5350

test plan:
  * using jaws, navigate to conversations page of a user
    with conversations;
  * navigate to 'message actions menu' link of a
    conversation in the left pane and press enter key;
  * verify that the first menu item is read and that
    the menu can be navigated with up- and down-arrow keys.

Change-Id: Ic85e9aab50dc88f371010f2d0748e032070fcef8
Reviewed-on: https://gerrit.instructure.com/19901
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
bootstrap course settings add users checkbox alignment

test plan:
* go to course settings, users tab
* click add users
* select an admin type (teachers, ta's)
* the checkbox that appears should not be misaligned

fixes #CNVS-5538

Change-Id: I1bb4ed1770e21f5dbbf155d4c17474d446b7b679
Reviewed-on: https://gerrit.instructure.com/20101
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>