closes EVAL-2023
flag=assignments_2_student
Test plan:
- PreReqs:
- Setting.set("assignments_2_observer_view", "true")
- CanvaDocs enabled
- 'Assignment Enhancements - Student' enabled
- 'Student Annotations submissions' enabled
- A course with student and observer
- Create a student annotation assignment
- As the student, view the assignment and observe doc loads
- As the observer, view the assignment and observe doc loads
- As the student, create an annotation and submit the assignment
- As the observer, view the assignment and observe doc loads and
shows the student annotation
- As the student, submit another attempt with new annotation
- As the observer, view the assignment and observe both attempts can be
viewed and load the correct student annotations
Change-Id: Ie1f973432ae3cf1da985ad6090d0b01affa6b21d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276081
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Currently peer reviewers can see annotations left by other peer
reviewers. This commit fixes this behavior and updates tests to detect
regressions.
Test Plan:
- Create a file upload assignment with peer reviews
- As Student1, submit to the assignment
- As a teacher, assign Student2 and Student3 as peer reviewers
- As Student2, review the assignment and leave an annotation
- As Student3, review the assignment and observe Student1's annotations
are not visible and then leave an annotation
- As a teacher, observe all annotations are visible and leave an
annotation
- As Student2 and/or Student3, view the assignment and observe the
teacher's annotations are not visible
- As Student1, observe all annotations are visible
- Repeat with anonymous peer reviews enabled
fixes EVAL-1844
flag=none
Change-Id: Ie09b1c45da45b1b165ba2ecaa6876a594afc958c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270724
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
flag=annotated_document_submissions
closes EVAL-1639
Test Plan:
- Have a course with a teacher and a few students
- create an anonymous peer review student annotation assignment
- as one of the students annotate and submit the assignment
- as the teacher assign the other students to peer review the previous
submitted assignment (those students also have to submit before peer
reviewing is available)
- as those students ensure the student's name they are reviewing is
not attached to any of the annotations. Instead it will read 'Student'
- complete the peer review as those students and ensure the teacher can
see all the reviewers feedback and submitters annotations with names
attached
- Grade the student and ensure the student can see all the reviewers
comments and teachers feedback
Change-Id: Ic92a1ed4dcfe4d5420dbe53503fce8b34494aaae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264953
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Edwin Ramirez <edwin.ramirez@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Jody Sailor
closes EVAL-1586
flag=annotated_document_submissions
Test Plan
- Have 2 students in a course.
- Create a manually posted, peer review, student annotation assignment.
- As Student 1 and Student 2, make some annotations and submit the
assignment.
- Assign Student 2 to peer review Student 1.
- As the teacher, leave some annotations and submission comments on
Student 1's submission.
- As Student 2, view Student 1's submission.
- Verify that Student 1's submission is viewable.
- Verify that Student 1's annotations appear to Student 2.
- Verify that the teacher's annotations and comments do not appear
for Student 2.
- Verify that the submission is not annotatable by Student 2.
- Leave a comment as Student 2.
- As the teacher, post the submissions.
- As Student 1, view the submission and verify that all annotations
and comments from previous steps are visible.
Change-Id: I00b3aab3bf22a05b7a4580ff5ddd7125cb8bace8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263286
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
This sets the user filter sent to DocViewer to include more than just
the viewing user's id when the assignment is an Annotated Document.
closes EVAL-1553
flag=annotated_document_submissions
Test Plan
- Create an Annotated Document
- Set it to post manually.
- As a student, make some annotations and click Submit.
- As a teacher, navigate to that submission:
`/courses/:course_id/assignments/:assignment_id/submissions/:user_id`
- As a teacher, make some annotations. Refresh the page and verify
the annotations are still there.
- As the student, view that submission. Verify that the teacher
annotations do not appear.
- As the teacher, grade the submission and post it.
- As the student and the teacher, both users' annotations should be
visible.
Change-Id: I01bfbc36683ffc9120785df622b60ea98db3d913
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261978
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
When a submission is unposted and the assignment posts manually, peer
reviewers' comments are visible to the student, so their DocViewer
annotations should be as well.
fixes EVAL-579
flag=none
Test Plan
- Create a file upload, peer review assignment that posts manually.
- Assign 2 students to peer review each other.
- Submit a file upload to the assignment as each student.
- As the teacher, leave an annotation on Student 1's submission.
- As Student 1, leave an annotation on Student 1's submission.
- As Student 2, leave an annotation on Student 1's submission.
- Verify that Student 1 only sees the Student 1 and Student 2
annotations.
- Verify that Student 2 only sees Student 2's annotations.
- Verify that the teacher sees all annotations.
- Post the submission's grades.
- Verify that Student 1 sees all annotations.
- Verify that Student 2 only sees Student 2's annotations.
- Verify that the teacher sees all annotations.
Change-Id: Id7c4a02ce6d01efb19893fa3b42cbc1057be9218
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243230
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
The method used to find the Submission object via the
AttachmentAssociation won't work for previous versions of the
submission if they had different attachments. In scenerios where we
we have the submission information, so we'll take the
permissions for whitelists, user info, etc off the submission and
assignment directly rather than attempting to look up via the
attachment association.
fixes GRADE-1611
test plan:
- Have DocViewer configured in your canvas instance
- Have a course with an assignment and a student
- As the student, upload/submit homework
- As a teacher confirm that docviewer works in speedgrader
- As the student, resubmit the homework
- As a teacher confirm that docviewer works in speedgrader for the
current submission
- As a teacher confirm that docviewer works in speedgrader for the
previous submission
Change-Id: I3bb34dbdbe9b254a2ff4e89f6dc89635ab2f0766
Reviewed-on: https://gerrit.instructure.com/164814
Reviewed-by: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
When talking to DocViewer, include relevant data for the current user as
well as the filter of users whose comments should be shown. This commit
enables functionality for anonymous annotations.
closes GRADE-1427
closes GRADE-1456
Test Plan 1: Moderated Assignments
1. Create a moderated assignment and allow for at least two provisional
graders in addition to the final grader. Then, leave at least one
annotation and one comment per provisional grader, final grader, and
the student.
2. When "Graders cannot view student names" is checked, verify that
no instructor or admin can see the students identity on annotaions.
Instead, the student's name should show up simply as 'Student'.
3. When "Graders cannot view each other's names" is checked, verify that
non-admin, non-final-grader provisional graders cannot see each
other's names on annotations. Instead, they should see a generic
grader name such as "Grader 1".
4. When "Final grader can view other grader names" is unchecked, verify
the final grader cannot view the other graders' names on annotations.
Instead, they should see a generic grader name such as "Grader 1".
5. Smoke test the settings listed in steps 2, 3, and 4 in various
combinations of being on or off.
6. While the assignment is still in moderation, verify the student can
only see their own annotations.
7. When grades are published for the assignment, verify the assignment
no longer shows any anonymous annotations.
Test Plan 2: Anonymous, Not Moderated Assignments
1. Create an anonymous assignment. Submit to the assignment as a student
and leave some annotations as the student and as an instructor.
2. Verify the student can only see their own annotations while the
assignment is still muted.
3. An instructor *should* be able to see any annotations made by an
instructor, but DocViewer has not implemented this functionality
on their side yet. As a result, just verify that an instructor
can see the student's annotations but they are anonymized while
the assignment is muted.
4. Unmute the assignment and verify the annotations are no longer
anonymized, and the student can now see annotations from instructors.
Test Plan 3: Normal, Not Anonymous Assignments
1. Do a general smoke test of not anonymous, not moderated assignments
to verify annotations still show up as expected.
Change-Id: I181a6ace3c00ca93ab8e6c7608a034b521ed78b7
Reviewed-on: https://gerrit.instructure.com/161486
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Create new Canvadoc plugin setting to enable the hijacking of crocodoc
sessions.
When enabled crocodoc sessions will really go to canvadocs.
Canvadocs still needs to add support for migrating crocodocs from the
raw crocodoc data table.
Test Plan:
Enable the setting.
View an existing crocodoc
You should get an error :D
If you dont want an error I have A PS you can checkout
that returns a fake session id, which you can verify is being used
but it will still result in an error. but on the canvadocs side instead
of the canvas side.
Change-Id: Ie634e3f822ae3f9c453e9fefa70069d43c896d09
Reviewed-on: https://gerrit.instructure.com/108436
Tested-by: Jenkins
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Orr <jgorr@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
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>
When the new canvadocs annotation stuff is ready, we want to be able to
selectively turn it on to slowly roll it out. This adds a feature flag
to the course that allows the new annotations to be enabled by course.
There is also an account-level flag that allows the feature to be turned
off globally per account, turned on, or simply "allowed" which delegates
to the course.
Refs CNVS-26668
Test Plan:
- Open up the account settings and observe that there is a feature
flag called 'New Annotations'
- See that the feature flag can be either Off, Allowed, or On
- Inside a course belonging to the account, see that there is
a feature flag for New Annotations that can be toggled on/off when
the account level setting is 'Allowed', or is Off when the account
is off or On when the account is on.
If you have rails console access:
- Submit an attachment to an assignment in the course with the
new annotations flag turned off
- Observe that the preferred_plugin on the associated Canvadoc
object is 'nil'
- canvadoc_obj = Canvadoc.last # or whatever
- # send has to be used cause #preferred_plugin is a private
- # method. Returns nil or 'pdfjs'
- canvadoc_obj.send(:preferred_plugin)
- Turn the feature flag on for the course (either through the
course settings or through the account)
- you should not need to resubmit, and shoudl see that the
preferred_plugin gets set to 'pdfjs'. It should toggle from
pdfjs to nil and back when turning the feature flag on and
off, whether at the account level or the course level
Change-Id: I6dd70fa2b379d527315dd7e14ee6ff8cceda024e
Reviewed-on: https://gerrit.instructure.com/84956
Tested-by: Jenkins
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
Fixes PLAT-1463, PLAT-1464
Test plan:
You'll need to test canvas-canvadocs integration, this will require you
to use canvadocs edge to communicate with wopi.
Enable feature flag
Make sure **new** MS docs open in WOPI
Disable Feature flag
Make sure **new** MS docs use box
Change-Id: Iebaee3d057ece9b319b39e5cb7608a4759ec14e1
Reviewed-on: https://gerrit.instructure.com/79349
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
this is necessary to do permission checks for submissions with multiple
versions
closes CNVS-10734
Change-Id: Ifee6e35d851dc3953c5f3fe1086015bf51e469f1
Reviewed-on: https://gerrit.instructure.com/62648
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
closes CNVS-20189
closes CNVS-19902
Test plan:
* enable canvadocs and crocodoc
* enable annotations for canvadocs
* homework submissions should be submitted to canvadocs (not crocodoc)
(you can tell the difference by the unicycling panda)
* disable crocodoc
* annotations should still work (through canvadocs)
* annotations should work the same as they did through crocodoc (but
now more doc types are supported)
Change-Id: I041b40d2545545c7766b57f98ea194b777fdef30
Reviewed-on: https://gerrit.instructure.com/59697
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
This is common functionality, so I pulled it out into the canvas_http
gem.
test plan: a canvadocs config using an http:// url should work, as well
as https:// urls which already worked.
Change-Id: I640445bfcf9b5c903d37aeb9db6c566430e2113d
Reviewed-on: https://gerrit.instructure.com/36760
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
This commit adds support for document previews from a Box View
compatible API.
closes CNVS-12416
Test plan:
* NOTE: check everywhere for previews (speedgrader, files list,
individual files page, etc?)
* Enable Scribd and Crocodoc
* attachments should be previewable in scribd or crocodoc (submission
attachments should go to Crocodoc)
* Enable Canvadocs
* Files that previously previewed in scribd should now go to
Canvadocs. Nothing should ever go to scribd.
* New submission attachments should continue to use Crocodoc (for
supported file types)
* Other attachments should preview in Canvadocs
Change-Id: I173e4fabc0ae677cdddd4bd065777a90360c1f34
Reviewed-on: https://gerrit.instructure.com/34535
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>