Commit Graph

18 Commits

Author SHA1 Message Date
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[skip-stages=Flakey]

Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-06-06 16:44:26 +00:00
Cody Cutrer 62fc5c033d rubocop: prep for updating rubocop-rspec
auto-correctable cops applied

[skip-stages=Flakey]

Change-Id: I17e18e2e1a230ef7b27f01ddb7e587045eabf97f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315809
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>
2023-04-12 19:30:10 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer e7e5192b70 RuboCop: RSpec/EmptyLineAfterExample
auto-corrected, no additional changes beyond the auto-correct

Change-Id: Ic0194e60ccd8cee4cfc814134f807f621b7d511d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277748
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-10 16:14:50 +00:00
Cody Cutrer 06a2c9df42 spec: remove manual requires of spec_helper
[skip-stages=Flakey]

Change-Id: Id65c835b72e1c0a4bb825b58490ce0ff7c8d9873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276829
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-10-26 20:38:27 +00:00
Cody Cutrer b6e406ddcf RuboCop: RSpec/ExampleWording
[skip-stages=Flakey]

Change-Id: I291432cd1f51fdaefb3cf6160d423879fb858c11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274253
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-24 02:15:35 +00:00
Gary Mei 0836cdacd8 add read-only mode for annotated document attempts
closes EVAL-1515
flag=annotated_document_submissions

Test Plan
- Create an Annotated Document.
- As a student, annotate the document.
- Refresh the page and verify that annotating is still possible.
- Submit the assignment.
- View the Submission Details page.
- Verify that the annotations made previously appear.
- Verify that adding more annotations to that attempt is not
  possible.

Change-Id: I6dbfdb3f107ef04e2a042d9c50bc719a1357a324
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261650
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-30 22:46:49 +00:00
Cody Cutrer 81d0bbc465 add # frozen_string_literal: true for specs
Change-Id: Id508bec1817937b1c24c29f1db7221e09cb9c2ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251157
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:48:35 +00:00
Jeremy Neander 2cf0c733d6 spec: remove post policy enable_feature! calls
Change-Id: I7becb72121d2dd66cfb8c65e273bb87379b25a1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229748
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
2020-03-12 16:37:48 +00:00
Jeremy Neander f872089ee8 remove new_gradebook flag
closes TALLY-563
flag = none
...obviously

test plan:
 * Smoke test New Gradebook
 * Smoke test Grade Summary

Change-Id: I0bf7f962f5e910002b69d727666464356a1e3ccf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225876
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2020-02-18 20:50:34 +00:00
Gary Mei bfb503e0e9 fix notifications for submission posting
fixes GRADE-2330

Test Plan
- In Old Gradebook, create the following 3 assignments:
  - An muted assignment named "old GB muted".
  - An unmuted assignment named "old GB unmuted".
  - An unmuted assignment named "old GB unmuted -> new GB manual"

- In another tab, as an admin, navigate to a student's messages page:
  "your_canvas_domain/users/#{student's id}/messages"

"old GB muted"
- Grade. Verify that no messages appear.
- Unmute. Verify that a message about submission grading appears.

"old GB unmuted"
- Grade. Verify that a message about submission grading appears.

- Enable on New Gradebook.
- Create 2 more assignments:
  - A manual posting assignment named "new GB manual".
  - An automatically posting assignment named "new GB auto".

"old GB unmuted -> new GB manual"
- Set to manual posting.
- Grade. Verify that no messages appear.
- Post grades. Verify that a message about submission grading appears.

"new GB manual"
- Grade. Verify that no messages appear.
- Post grades. Verify that a message about submission grading appears.

"new GB auto"
- Grade. Verify that a message about submission grading appears.

Change-Id: Id2c5920efe8db0fa5a08d7e67b0855541500bc3a
Reviewed-on: https://gerrit.instructure.com/202541
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-30 14:25:25 +00:00
Gary Mei 9098cf88b7 display annotations when assignment auto posts
fixes GRADE-2307

Test Plan
- Create an assignment of type file upload.
- Submit to the assignment with a document.
- As the teacher, annotate the submission.
- As the student, verify that annotations appear when viewing the
  submission.

Change-Id: Iec89ed52b44c9ed2e7db52a8c6df03e52e23ca55
Reviewed-on: https://gerrit.instructure.com/201817
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
2019-07-19 15:03:51 +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
Spencer Olson b0c91c44a6 annotations: fix moderated grading whitelist
closes CNVS-43261

Test Plan:
1. Create an assignment that accepts file uploads and is not moderated.
2. As a student, submit to the assignment.
3. As a teacher, go to SpeedGrader and leave an annotation on the
   student's submission. Reload the page and verify you can still
   see your own annotation.

Change-Id: I9f318b877dc3d002523d6bbecff93484c4f7242d
Reviewed-on: https://gerrit.instructure.com/159972
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-08-07 22:10:04 +00:00
Daniel Lee 920d30a2bb teacher canvas permissions set to readwritemanage
refs RD-4399

this is the Canvas-lms part of the fix
the canvadocs part is
https://gerrit.instructure.com/#/c/137484/

TEST PLAN:
- check this commit out
- check https://gerrit.instructure.com/#/c/137484/
   out in the canvadocs-server project
- as a student, add canvadocs annotations to document
   file upload assignment submission
- verify that you can edit and delete your annotations
- as a teacher view, the student's submission in
   speedgrader
- verify that you can edit and delete the student's
   annotations
- as an admin who is not enrolled in the course, verify that you can do
   what the teacher does
- as a custom role that inherits from a teacher,
   verify that you can also do what the teacher does

Change-Id: I3617bd2ed4cd4f2e3093d65ae3f5b837b1b02f09
Reviewed-on: https://gerrit.instructure.com/137492
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
2018-01-17 16:41:14 +00:00
Caleb Guanzon 3a0fde44ba Revert "teacher canvas permissions set to readwritemanage"
This reverts commit 7228575fe0.

Christi, wants this withdrawn. RD-4399 has to be re-groomed.

Change-Id: I5f19cbca264f4f6bdd0fb7c7517d618f5f229189
Reviewed-on: https://gerrit.instructure.com/130577
Tested-by: Jenkins
Reviewed-by: Josh Orr <jgorr@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-10-23 18:51:44 +00:00
Caleb Guanzon 7228575fe0 teacher canvas permissions set to readwritemanage
fixes RD-4399

this is the Canvas-lms part of the fix
the canvadocs part is
https://gerrit.instructure.com/#/c/128993/

TEST PLAN:
- check this commit out
- check https://gerrit.instructure.com/#/c/128993/
   out in the canvadocs-server project
- as a student, add canvadocs annotations to document
   file upload assignment submission
- verify that you can edit and delete your annotations
- as a teacher view, the student's submission in
   speedgrader
- verify that you can edit and delete the student's
   annotations
- as an admin who is not enrolled in the course, verify that you can do
   what the teacher does
- as a custom role that inherits from a teacher,
   verify that you can also do what the teacher does

Change-Id: I80cb9d41222d347c4a2026480fc4d9698ae23394
Reviewed-on: https://gerrit.instructure.com/129381
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Orr <jgorr@instructure.com>
2017-10-18 19:23:01 +00:00
Daniel Lee 8dd26aa761 Don't allow Observers to annotate submissions they're observing
When viewing an assignment in DocViewer, this now checks to see if the user
has an Observer enrollment, and if that enrollment matches the assignment
they're viewing.  If so, the DocViewer session is launched as read-only.

Fixes RD-4403

Test plan:
- Observe a student in canvas
- Have the student submit an assignment
- Have the observer view the submission details page and "View Feedback"
for the assignment
- In the resulting DocViewer iframe, there should be no annotation tools
- The student should still be able to annotate in their submission details
page
- Speedgrader should still have annotation tools available

Change-Id: I8d427d69151fa5ff9087e7a710a3fcd87e7ef8c9
Reviewed-on: https://gerrit.instructure.com/127724
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Orr <jgorr@instructure.com>
Product-Review: Josh Orr <jgorr@instructure.com>
2017-10-02 18:07:04 +00:00