Instead of sending a separate param to canvadocs for pdfjs as
a preferred plugin, just put it in the preferred_plugins array (which
used to be called preferred_renders)
Refs CNVS-30582
Test Plan:
- This is very difficult to test manually, particularly without
changing any code. The reason for this is that canvadocs doesn't
currently do anything with the pdfjs preferred plugin so you can't
just check for that behavior. However, this is something you can
do even tho it isn't ideal (and this is how I tested this patch in
development):
- get canvas working with a canvadocs instance on which you can
modify code. By modifying the canvadocs instead of the canvas,
the integrity of this patch is maintained for test purposes.
- In the canvadocs session controller
(app/controllers/session_controller.js), add a log statement to
display what comes in in the body of the request. Something
like:
- console.log('Request body: ')
- console.dir(req.body)
- Submit an assignment to a course as a student.
- As a teacher, open speedgrader from that assignment. This will
cause a new canvadocs viewing session to be created.
- In the console output of the canvadocs instance, see that the
body did not include a preferred_plugin of pdfjs.
- Toggle the feature flag to enable new annotations.
- Repeat opening speedgrader but this time observe that the body
includes pdfjs in the list of preferred_plugins.
Change-Id: Ie3e16e1331fcdd757e96888f033e8341e7d6a0bc
Reviewed-on: https://gerrit.instructure.com/86549
Tested-by: Jenkins
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>