Commit Graph

30 Commits

Author SHA1 Message Date
Cody Cutrer dbfd4d4de4 RuboCop: Style/TrailingCommaInArguments
[skip-stages=Flakey]

auto-corrected

Change-Id: I042349a67e1473a0db9b07e66e13c149e5c92b55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278845
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-19 22:22:20 +00:00
Dustin Cowles d843b77f5a enable student annotations for observers in new assignments
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>
2021-11-19 21:58:17 +00:00
Cody Cutrer 299314b162 RuboCop: Style/NegatedIf
auto-corrected

Change-Id: Ieab0b9525c1342f900721196c6694bef17378ec0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278024
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 22:55:11 +00:00
Cody Cutrer 1832881748 RuboCop: Performance/RegexpMatch
[skip-stages=Flakey]

auto-corrected

Change-Id: Icf79dc86947cde22d0853b3db8afa3db853e7b8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278013
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 22:02:06 +00:00
Cody Cutrer 6311053d81 RuboCop: Style/ColonMethodCall
[skip-stages=Flakey]

auto-corrected

Change-Id: I46f0ee2c3fb97f3ca37627c0edd8eecffaf0aa59
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277986
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 17:39:58 +00:00
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Dustin Cowles bf57e3e33f Ensure peer reviewers cannot see other peer reviewer annotations
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>
2021-08-19 14:11:46 +00:00
Kai Bjorkman 4131a8be1c adds support for anonymous peer reviewed student annotations
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
2021-05-27 21:50:29 +00:00
Gary Mei 8d31c56359 add peer reviews to student annotation assignments
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>
2021-04-26 14:52:53 +00:00
Spencer Olson a1454de972 rename submission_type "annotated_document" to "student_annotation"
closes EVAL-1585
flag=annotated_document_submissions

Test Plan:
1. Smoke test creating, updating, and submitting to annotated
   document assignments.

Change-Id: I64504c48d35a84ad30911bc3af05a827c0dad229
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262817
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2021-04-13 19:02:31 +00:00
Kai Bjorkman dea2e254ab rename 'Annotated Document' type to 'Student Annotation'
flag=annotated_document_submissions
closes EVAL-1581

Test Plan:
-all instances of Annotated Document renamed to Student Annotation

Change-Id: I625869764453a65a6cd4ba4cad076c9a856b39b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262615
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2021-04-13 18:00:18 +00:00
Gary Mei 6973b4d096 show users' annotations for Annotated Document
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>
2021-03-31 22:04:06 +00:00
Ethan Vizitei 6116663bf2 don't tell sentry about canvadocs problems
Change-Id: Ia1b078f04c12480c4d3138e2dcbf11efa3760722
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255394
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2020-12-17 18:52:40 +00:00
Ethan Vizitei 1517d352a2 handle canvadoc 500s too
closes FOO-1317
flag=none

TEST PLAN:
  1) make canvadocs returen 500s
  2) treat as service unavailable
  3) no sentry report

Change-Id: Id3040aaf131d6af7707a3556e3b705b50ca9707d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254840
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2020-12-10 20:05:13 +00:00
Ethan Vizitei dbd705e5b5 improve error reporting for canvadocs integration
Change-Id: I7f104bec7a149d6a40372884442002901818d02b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252157
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-06 20:08:55 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Nick Pitrak be4ce6fb28 remove uses of whitelist and blacklist
closes EVAL-1062
flag = none

test plan:
- make sure tests pass

Change-Id: I25f72393d6711944718ad2aa04441c810e8fbf4a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247629
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Nick Pitrak <npitrak@instructure.com>
Product-Review: Nick Pitrak <npitrak@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2020-09-18 15:58:40 +00:00
Gary Mei e5d36e0649 show peer review annotations even when unposted
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>
2020-07-28 19:37:04 +00:00
Keith T. Garner 92c0bfd84a fix docviewer for historical submissions
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>
2018-09-18 22:18:22 +00:00
Adrian Packel 6a5a916e45 pass user-related params to docviewer
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>
2018-08-24 18:55:06 +00:00
Brad Horrocks c6df643425 Canvadocs hijack crocodoc sessions
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>
2017-05-03 22:11:01 +00:00
Landon Wilkins f1359d33e2 da licença part 27
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I331826e3e3be8b7d73bbf4f6afe3a79ec1340f54
Reviewed-on: https://gerrit.instructure.com/110051
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:53:31 +00:00
Benjamin Porter 5a975d407f Include pdfjs in preferred_plugins array
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>
2016-08-03 03:07:50 +00:00
Benjamin Porter 07687bcbd1 Add feature flag for canvadocs preferred plugin
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>
2016-07-15 21:15:37 +00:00
defektive 190c3973e7 Canvadocs 0365 preferred render
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>
2016-05-16 21:00:24 +00:00
Cameron Matheson cd7bd26a79 associate c(anva|roco)docs with submissions
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>
2015-11-05 18:47:48 +00:00
Cameron Matheson 2a1b1ccbe0 canvadocs annotations
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>
2015-09-04 16:42:17 +00:00
Strand McCutchen 1a24af8e53 fix Lint/StringConversionInInterpolation issue
Change-Id: Ibea00b023aa91e4f4a627161fbe87dbb54d22daf
fixes: CNVS-20009
Reviewed-on: https://gerrit.instructure.com/52884
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Strand McCutchen <smccutchen@instructure.com>
2015-04-27 20:53:25 +00:00
Brian Palmer 0a71091080 determine canvadocs http/https based on url
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>
2014-06-24 15:26:18 +00:00
Cameron Matheson 33b4eb55f9 canvadocs
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>
2014-05-09 22:38:57 +00:00