Commit Graph

643 Commits

Author SHA1 Message Date
Aaron Ogata 97dffd25ee introduce bootsnap
refs DE-1383

Change-Id: I6ab3efff2328717a74626a4fc2b4e171e41bcb06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-10-04 13:18:03 +00:00
Samuel Lee 0a0d3a2cdd Newly graded assignment badge doesn't decrement
Fixed bug where badge next to grade does not disappear once student
refreshes or leaves the grade summary page while
Assignment Enhancement - Student feature flag is on.
Also fixed bug where badge count does not increment when teacher grades
assignment while Assignment Enhancement - Student feature flag is on.

flag=assignments_2_student
Fixes EVAL-2514

Test Plan:
1. Turn on the Assignment Enhancement - Student feature flag
2. Have a course with a student and at least one assignment
3. As a teacher/admin, grade the assignment in the course
for that student
4. Go to the student profile and on the grades tab
you should see a badge with the unread graded count of 1
5. Click the grade tab to enter the grade summary page.
6. You should notice that the badge count does not go away and
there is a blue dot next to the graded assignment.
7. Refresh or go to another link and you should see that the
badge count goes away.
8. Regrade the assignment with a different grade
and check to see if the badge reappears with a 1
9.Turn off feature flag and see that the old functionality
still exists.

Change-Id: Ifc02903745b71e39e46804dd0c499bac909f367b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295491
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
2022-08-17 21:36:40 +00:00
Spencer Olson 6bcb11c733 remove flag edit_submission_status_from_speedgrader
closes EVAL-2564
flag=edit_submission_status_from_speedgrader

Test Plan:
- specs pass

Change-Id: Ieb5c451a819c897b5d7af9aa9a62323728fc2292
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/298289
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2022-08-17 18:05:34 +00:00
paulo.chaves cc98f803fc Show a blue dot when a rubric is graded
Show blue dot on the region surrounding
the rubrics icon when a rubric is graded
or a comment is added

Closes EVAL-2419
flag=visibility_feedback_student_grades_page

test plan:

- Have a graded assignment with a rubric and
  peer reviews (manually assign peer reviews)
  and at least two students where one assesses
  each others assignments, or you can assess
  as a teacher via SpeedGrader where you
  select the student then click on the rubric
  - With the FF on:
    - As a teacher go to SpeedGrader and make
      a comment on the rubric or grade it.
      Or as a student peer review the other
      student's submission.
    - As the student who owns the submission
      go to the grades page
    - The rubric icon should be present with
      a gray region surrounding it. The blue
      dot should also show up
    - The blue is removed when clicking on
      the rubric icon. The blue dot should
      not show up after refreshing the page
  - With the FF off:
    - As a teacher go to SpeedGrader and make
      a comment on the rubric or grade it.
      Or as a student peer review the other
      student's submission.
    - As the student who owns the submission
      go to the grades page
    - Only the icon without the gray region
      and blue dot should appear

Change-Id: I13f255d40e1471a4df56747af2304315c0588072
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295765
Tested-by: Paulo Chaves <paulo.chaves@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2022-07-19 20:44:19 +00:00
Jacob Burroughs 24eb2672bb Rip out google analytics
fixes FOO-3006

Change-Id: I41b1b071ef5421ef176a1db55c379fcdd540ed5c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295706
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-07-07 23:01:14 +00:00
Jacob Burroughs 0d642c7506 Some little rails 7.0 spec fixes
Change-Id: Id62960940fbc59563668be147888a8696ccbbdbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293448
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-06-08 16:14:47 +00:00
Eduardo Escobar 955fcc8950 render list of peer reviews in modules view
fixes EVAL-2436
flag=assignments_2_student
flag=peer_reviews_for_a2

test plan:
- enable the FF "Assignment Enhancements - Student".
- enable the FF "Peer Review Support in Assignment
  Enhancements".
- have a published course.
- have a course with a teacher and at least 2
  students.
- create an assignment A1 with "Peer Reviews"
  enabled and the "Peer Reviews Appear Anonymously"
  disabled.
- create an assignment A2 with "Peer Reviews"
  enabled and the "Peer Reviews Appear Anonymously"
  enabled.
- assign some peer reviews to the students for
  both assignments A1 and A2.
- as a student go to the "Modules" tab.
- notice the list of peer reviews is present
  for each assignment.
- when the student clicks on the peer review
  for A1 it should redirect to
  /assignments/:assignment_id?reviewee_id=:id
- when the student clicks on the peer review
  for A2 it should redirect to
  /assignments/:assignment_id?anonymous_asset_id=:id
- disable the FF "Peer Review Support in Assignment
  Enhancements".
- notice the list of peer reviews is not present
  anymore.

Change-Id: I471a1b0fa98129c47cdd8c719ccf1100fa748853
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/291575
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2022-06-06 19:42:21 +00:00
Syed Hussain 3d77ea01da Direct admins and instructors to Speedgrader from grades page
closes EVAL-2149
flag=assignments_2_student

Test plan:
Have a site admin, admin, teacher, student and observer  with:
- an assignment and
- an anonymous grading assignment

1. With the FF ON, go to the student grades page for the
assignment (not anonymously graded) and click on the
assignment title:
1.1. As a student and observer, make sure it shows the
assignment in the improved assignment submission flow
1.2. As an admin, see that it takes you to speedgrader for
that assignment and student
1.3. Repeat 1.2. as a teacher and site admin

2. With the FF OFF, go to the student grades page for the
assignment (not anonymously graded) and click on the
assignment title:
2.1. As a student, see that you go to the old submission
details page
2.2 Repeat 2.1. as a teacher, admin, site admin

3. With the FF ON, go to the anonymous grading assignment
and click on the assignment title:
3.1. student and observer see the improved assignment
submission flow
3.2. link is hidden for teacher and admin
3.3. takes the site admin to speedgrader

4. With the FF OFF, go to the anonymous grading assignment
and click on the assignment title:
4.1. student goes to old submission details page
4.2. link is hidden for teacher and admin
4.3. site admin goes to old submission details page

Change-Id: I9f8e6d75b9151123616e07db2265cd4e07968bd8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290382
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Paulo Chaves <paulo.chaves@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2022-06-03 13:24:59 +00:00
paulo.chaves 0790fac9f3 Add region around icon and show blue dot
closes EVAL-2323, EVAL-2324
flag=visibility_feedback_student_grades_page

test plan:

- Have a graded assignment with comments and
  a rubric
- With the FF on:
  - Go to the students grade page
  - If there is any comment for an assignment
    - There should be a gray region around the
      comment icon and the number of comments
      right next to the icon
    - If any unread comment for an assignment
      the blue dot should show up in the
      top-right corner
  - If there is any rubric for an assignment
    - There should be a gray region around the
      rubric icon
    - If a comment is added and unread by
      a student the blue dot should show up
      in the top-right corner
- With the FF off:
  - Go to the students grade page
  - If any comment is present only the icon
    without the gray region surrounding it
    should appear
  - if any rubric is present only the icon
    without the gray region should appear

Change-Id: I5f3a303c1ab2e14796c75fceb0706476a11b77e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289708
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
2022-05-27 22:00:15 +00:00
Jackson Howe 0bbc82576d Add org_type to fullstory data
closes LS-1502
flag = none

Test plan:
 - In a rails console, run:
   Account.site_admin.external_integration_keys.create!(key_type: "salesforce_org_type", key_value: "Higher Ed")
 - In config/dynamic_settings.yml, set
   development.config.canvas.fullstory.sampling_rate to '1.0'
 - Restart rails server and log user out
 - Log in (as a siteadmin user)
 - Inspect the head section of the html (search for org_type_str)
 - Expect to see "org_type_str: 'Higher Ed'" in FS.setUserVars

Change-Id: Ie66668234ca78197f2b6cff8dd877a08f938478c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/291706
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2022-05-12 15:28:54 +00:00
Isaac Moore 11b0a9a4b8 Add page for managing internal settings
This adds a new page where Site Admin users can manage `Setting`s (aka,
"Internal Settings"). This can be done on the Site Admin settings page,
on the "Internal Settings" tab. Only Site Admin users see and may access
this tab.

The table displayed renders each setting and its value, and offers the
ability to edit or delete each setting. New settings may also be added.
Settings denoted internally as `secret` will be displayed, but their
values obscured. These settings may not be edited or deleted from the UI.

There is also a "Download as..." button that allows all internal settings
(except for secret ones) to be downloaded in JSON or CSV format.

closes DE-1136
flag=none

test plan:
- confirm that, as a site admin, you can add, edit, and delete internal
  settings from the "Internal Settings" tab
  (note: you can edit a setting by clicking on its value)
- confirm the table is sortable by clicking on the column headers
- confirm the table is downloadable by choosing either the JSON or CSV
  options
- confirm that your changes are reflected in the database, and in
  `Settings.get` once settings have been reloaded
- confirm that, as a non-site admin user, you can not see the Internal
  Settings tab

Change-Id: Ia143bf40e85b43a1db2f6fcc2791718179c351c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2022-05-02 20:34:33 +00:00
paulo.chaves abd5853d1f Show out of value with Score
closes EVAL-2322
flag=visibility_feedback_student_grades_page

test plan:

- Have some graded assignment
- With the FF on:
  - Go to the students grade page
  - There should not be a `Out of` column
  - The `Score` column should now show the
    score with the format `Score/Points possible`
- With the FF off:
  - Go to the students grade page
  - There should be a `Score` column
  - There should  be a `Out of` column

Change-Id: Ibde7fa54e1ba20ae46d50fcc0480ab9f8c9c9723
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288867
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
2022-04-19 14:55:10 +00:00
Xander Moffatt 60e5eb9121 refactor: normalize tool loading in modules index
why:
* placements added after the modules page was created were loading
tools in separate queries and formats
* there was already a hash of placement -> tool but instead newer
placements were using separate variables

* standardize calls to external_tools_menu_items for all placements
* load tools for newer placements during same call for older
placements
* ignore tools for tray placements if FF is disabled, as before
* group all tool definitions sent to front end for consistency

refs INTEROP-7294
flag=none

test plan:
* with a tool with assignment_menu, module_menu, module_index_menu,
module_group_menu,
 and module_index_menu_modal placements configured
* with these feature flags enabled on the root account:
  * commons_favorites
  * lti_multiple_assignments_deep_linking
  * lti_deep_linking_module_index_menu_modal
* launching the tool from all of these placements should work before
and after this commit is checked out:
(don't forget to run webpack)
  * module_index_menu: 3-dot menu at the top of
  the page, opens a side tray and launches tool
  * module_index_menu_modal: 3-dot menu at the top of the page, opens a
  modal and launches tool with deep linking request
  * module_menu: 3-dot menu in each module, redirects to tool in new
  page with module_menu placement
  * module_group_menu: same place, opens a side tray and launches tool
  * assignment_menu: add a normal assignment to a module and click on
  the 3-dot menu of the assignment, launching the tool redirects to the
  tool with the assignment_menu placement in a new page

Change-Id: I8e5c338f27443b03a4710fb577194f5b9509d1e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287767
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2022-04-11 20:02:30 +00:00
Spencer Olson 70838f0c98 add submission comment emojis 🎉
closes EVAL-2302
flag=submission_comment_emojis

Test Plan:
1. Verify a 'Emojis in Submission Comments' Course Feature Flag exists
   (needs to be enabled at SiteAdmin level before visible at account and
   course level). Enable the feature at the SiteAdmin account.
2. In the Account settings for your root account (not the SiteAdmin
   account), 'unlock' the feature. Then, go to settings for the root
   account and verify there is a 'Blocked Emojis' section. Click the
   emoji picker, select 😬, and then click 'Update Settings' at the
   bottom of the page.
3. Enable the feature flag in a course.
4. At the following pages, verify that the submission comment textarea
   now includes an emoji 'picker' (button that opens a menu to pick
   an emoji) and a emoji 'quick picker toolbar' (three emoji buttons
   below the textarea, that when clicked insert the pictured emoji into
   the textarea. The icons shown include the most recently used emoji
   and the two most popular emojis. By default, 👍, 👏, and 😀 are
   shown.

   Logged in as a student:
     - "Assignment Enhancement — Student" page
     - Submission Details page
     - "Submit Assignment" page (with "Assignment Enhancement —
       Student" disabled). Make sure to check the textarea for each
       submission type (easiest way to do this is to create an
       assignment and click the checkbox for every submission type).

   Logged in as a teacher:
     - Gradebook
     - SpeedGrader

5. Verify the 😬 emoji is not available in the emoji picker at any of
   those pages listed above.
6. Disable the feature flag and verify at the pages listed above that
   the emoji 'picker' and emoji 'quick picker toolbar' are no longer
   shown.

Change-Id: I2c790904927a897bfb0ac30091a5bafb291fd115
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286283
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2022-03-17 14:46:07 +00:00
Aaron Ogata bbd28c647a fix shared/_fullstory_snippet.html.erb specs
refs FOO-2746

Change-Id: I73b071445c18b0566bc3fede08ff4ecac07094b0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287148
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-03-15 23:41:05 +00:00
Luis Oliveira 9d581ee792 Removes covid responsive flagging
closes: LS-858
flag=none

test plan:
- Confirm that responsive behavior sill works as it would
with the removed flags (responsive_awareness and responsive_misc)  ON

Change-Id: Ia34f8c273db756fcc24f1412b4c3f7f5d88efc12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285420
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2022-02-17 21:43:00 +00:00
Charley Kline 0517710926 Replace some href-less <a> with <buttons> for Voiceover
Fixes FOO-2545
flag=none

See the description in the ticket; when "buttons" are
instead coded as <a href="#" ...> it can confuse some
screenreaders because they think we're navigating to a
new page and thus restart at the top.

Converted everything called out in the ticket from
<a> to <button> as appropriate. Also did a few other
<a href="#" ...> elements as I saw them. Eventually we
should clean all of these up everywhere but that's
beyond the scope of this ticket.

Test plan:
* See the problem description in the ticket
* Voiceover should now navigate the page properly

Change-Id: Ic742c72c74d41380a13a4e5c0158eb59ea8f7f33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282127
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
2022-01-06 19:08:37 +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 e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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:02:35 +00:00
Cody Cutrer eaca556b81 RuboCop: Style/NumericLiterals
[skip-stages=Flakey]

auto-corrected

Change-Id: I88363d87d5a70be941aa81b4ffe5306ce7506b98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279207
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-24 23:31:34 +00:00
Cody Cutrer 9b71ed2054 RuboCop: Style/BlockDelimiters, Style/Lambda
[skip-stages=Flakey]

auto-corrected

Change-Id: I642f868d75c079e698f1fe4161bbbe419dbe1827
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279374
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 21:30:47 +00:00
Cody Cutrer c302dd8bc1 RuboCop: Style/SymbolArray, Style/WordArray
[skip-stages=Flakey]

auto-corrected

Change-Id: Id187ed60c5590025e780d81b85b5212f51368f27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279196
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 14:30:08 +00:00
Cody Cutrer efc87c595a RuboCop: Style/LineEndConcatenation
[skip-stages=Flakey]

auto-corrected, with post review looking for opportunities to convert
to heredocs

Change-Id: Ic163882ebb5f4d2d28b5e5fd65188781d8eef3c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279287
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-23 03:13:13 +00:00
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
Cody Cutrer b8e71beae4 RuboCop: Style/RedundantFileExtensionInRequire
[skip-stages=Flakey]

auto-corrected

Change-Id: Ie207afc9f417a60b88296380256c36966ae78ab8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278788
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 01:40:50 +00:00
Cody Cutrer c4bc112611 RuboCop: Style/MethodCallWithoutArgsParentheses
[skip-stages=Flakey]

auto-corrected

Change-Id: Idcbd419ab2196101398715e6b8cdd8d70ae5c587
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278698
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 23:07:30 +00:00
Cody Cutrer a0096a3375 RuboCop: Style/BarePercentLiterals
[skip-stages=Flakey]

auto-corrected

also enable Style/PercentQLiterals forcing uppercase with it, so that
both %q and %Q get changed to bare %

Change-Id: I91389c18d864b3ec638c6cd366c2c74f78c69a57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278673
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-18 23:06:03 +00:00
Cody Cutrer 4d43809cae RuboCop: Style/PercentLiteralDelimiters
[skip-stages=Flakey]

auto-corrected, with a post-review looking for multiline strings
to convert to heredocs

Change-Id: I7f7afb11edd63415cde10866822dd2ac5ba0d8be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278669
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 23:05:50 +00:00
Cody Cutrer afa38f2686 RuboCop: Style/RedundantArgument
[skip-stages=Flakey]

auto-corrected

Change-Id: Iedf7b23931d0aaa43d2b649d07ad6117621ed839
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278792
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-18 21:38:20 +00:00
Cody Cutrer 157f0ae5d4 RuboCop: Style/RedundantPercentQ
[skip-stages=Flakey]

auto-corrected, with post review changing multiline strings into
heredocs

Change-Id: I1d4c543c936e5bf0ff5eb8bf10348652da7036c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278652
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 20:26:13 +00:00
Cody Cutrer fe75025e1d RuboCop: Style/RegexpLiteral
[skip-stages=Flakey]

auto-corrected

Change-Id: I98a7afefcbb3631ee046e45fcfc9f955ca7ddca8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278636
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-18 02:08:34 +00:00
Cody Cutrer c2f9a66192 RuboCop: Style/RescueStandardError
[skip-stages=Flakey]

auto-corrected

Change-Id: I55e4217ad864f0c0422ba70f4b2789c0c9aee68b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278620
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-18 01:28:36 +00:00
Cody Cutrer 9b5ab437d5 RuboCop: Performance/TimesMap
[skip-stages=Flakey]

manual (it says it's auto-correct, but it didn't. which is fine cause a few
I simplified in other ways than using Array.new)

Change-Id: I8a4d5cf61deac22ad24e012f5a6f3647c84d3d3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278312
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-16 16:20:35 +00:00
Cody Cutrer 2b3a208f9a RuboCop: Style/SymbolProc
[skip-stages=Flakey]

auto-corrected, with review for non-single-argument-callers.
there weren't any, but I did disable it anyway for one file where
it seemed to make the DSL less legible (QtiItems)

Change-Id: I1b4c43ffd899e656902981baac213ca394791b67
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278156
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-12 20:13:56 +00:00
Cody Cutrer b70d3ab89d RuboCop: Style/SingleLineMethods, Style/Semicolon
[skip-stages=Flakey]

auto-corrected

Change-Id: Ib94ed586a0d5bf4985a5367144d398eeee706303
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278138
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-12 18:39:32 +00:00
Cody Cutrer 1ccd29b412 RuboCop: Style/PreferredHashMethods
[skip-stages=Flakey]

auto-corrected for the most part, but I went through specs and used
the have_key matcher when possible

Change-Id: I4a2df1cdd536a94f3b493668386883d1148660c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278050
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-12 16:24:14 +00:00
Cody Cutrer 322f9d8a09 RuboCop: Style/OrAssignment
auto-corrected

Change-Id: I971ad156ed981867644c098969c1ea179735d264
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278030
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-11-12 01:12:09 +00:00
Cody Cutrer ddfd72ca17 RuboCop: Style/RedundantBegin
[skip-stages=Flakey]

auto-corrected

Change-Id: I6a29a9d2fa1057e2278c105a8331d2c79e496897
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277904
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 02:19:27 +00:00
Cody Cutrer 8125858d27 RuboCop: Style/RedundantInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: Id04fd07bb918f0f4dc376b5c3474653a8e767e95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277870
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 02:06:11 +00:00
Cody Cutrer eefb34d6c2 RuboCop: RSpec/HookArgument
[skip-stages=Flakey]

auto-corrected

Change-Id: Ifb3f097064db0e00313a079a45da7e651b58d30b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277798
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-10 16:40:43 +00:00
Cody Cutrer 2d84666968 RuboCop: RSpec/EmptyLineAfterFinalLet
[skip-stages=Flakey]

auto-corrected

Change-Id: I1b4c6b264ed1c5dc86378f706b3b20f0ae84d50b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277758
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-10 16:15:27 +00:00
Cody Cutrer 104f7642ff RuboCop: RSpec/EmptyLineAfterHook
[skip-stages=Flakey]

auto-corrected

Change-Id: I6663e9e197e5f6c06b574804e466c39519050ba3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277754
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-10 16:15:08 +00:00
Cody Cutrer 6b500d3193 RuboCop: Lint/ConstantDefinitionInBlock spec/[m-z]
[skip-stages=Flakey]

all manual, and this concludes this cop for the entire codebase, so
change it to error severity to enforce it

Change-Id: I770c62bbd93ccd4f0b11252fd0cf61158f1ee7cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277357
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-04 03:05:09 +00:00
Mysti Lilla cd9c592f03 Ensure student view can see quizzes
fixes INTEROP-7116
flag=none

Test plan
- Have a course with new quizzes set up
- Have a new quiz set up for testing
- Ensure student view student can see
  the quiz when the course is active
- The student view student should
  get a concluded message if the
  course is concluded

Change-Id: Id160cc51fe37337baf65c36e46ce9947a05c5776
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277149
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2021-11-01 18:32:19 +00:00
Cody Cutrer 47119da659 spec: remove sharding_spec_helper requires
[skip-stages=Flakey]

the main spec_helper already requires it

Change-Id: Ibcd905aa7ae603c8cdfa3cd24216e16aee252a8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276853
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-10-28 00:19:18 +00:00
Cody Cutrer 0a025efa2f spec: use require_relative instead of require File.expand_path
[skip-stages=Flakey]

Change-Id: I861a46acffa893b4ea6630039da66851c71b5a77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276831
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-10-28 00:15:03 +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 349ff7fa49 RuboCop: Lint/UnusedMethodArgument spec
[skip-stages=Flakey]

all manual

Change-Id: I7703886011d35c28ba1b06414a39671eca12b501
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276448
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-21 16:20:05 +00:00
Cody Cutrer 6cb0ea010c RuboCop: Lint/UselessAssignment spec
[skip-stages=Flakey]

all manual

Change-Id: I615934f94060ed339c17d6a73599487dc577e376
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276433
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-21 13:38:12 +00:00
Syed Hussain cd79f0771f Add setting and FF for first/last names in gradebook
Turning on the FF will allow the account admins to enable the
account setting to make this feature available

closes EVAL-1985
flag=gradebook_show_first_last_names

Test plan:
- With the site admin FF "gradebook_show_first_last_names" OFF:
1. As an account admin, make sure that the admin setting "Separate
columns for first/last names in Gradebook" does not show
2. As a site admin, make sure the setting does not show

- With the site admin FF ON:
1. As an account admin:
a. make sure that the admin setting shows up with default as
unselected
b. Select the setting checkbox and click on update settings, make
sure that the checkbox remains selected
c. Unselect the checkbox and update settings, make sure it remains
unselected
2. As a site admin, the setting does not show

Change-Id: I494267303fea57872178af13ac9b23c066c30a12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274820
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: Spencer Olson <solson@instructure.com>
Product-Review: Jody Sailor
2021-10-08 15:14:48 +00:00
Jeremy Stanley a3bb59b199 show an indicator for unread rubric comments
test plan:
 - enable the "Submission feedback indicators" feature
 - have an assignment with a rubric that uses
   free-form comments
 - as a student, submit the assignment
 - as a teacher, grade the assignment while leaving
   comments in the rubric in speedgrader
 - as a student, click the dashboard notification about
   the graded assignment to go to the submission details
   page
 - there should be an unread indicator next to the
   "Show Rubric" link
 - click "Show Rubric" and that indicator should go away
 - refresh the page and the indicator should still be gone
 - the "Show Rubric" dot should look the same with K-5 mode
   on or off
 - VO should tell you if unread comments exist while the
   "Show Rubric" or "View Feedback" link is focused

flag=submission_feedback_indicators

closes LS-2670

Change-Id: I4b8b977eb9478342c1d2fc08b9910f90cdeed317
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274396
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-10-02 00:40:16 +00:00
Jeremy Stanley cbd09990e4 show an indicator for unread submission annotations
test plan:
 - have canvadocs set up with canvas
 - make sure annotation notifications are working
   (this requires a canvas API key to be configured in canvadocs)
 - enable the "Submission feedback indicators" feature
 - as a student, submit a document to an assignment
 - as a teacher, grade the document in SpeedGrader™ and leave
   one or more annotations on it
 - as a student, click the assignment in the "recent feedback"
   column
 - you are taken to the Submission Details page, where there
   should be an indicator next to the "View Feedback" button
   that indicates unread feedback exists
 - click "View Feedback"
 - close the modal
 - the unread indicator should be gone
 - refresh the page
 - the unread indicator should still be gone
 - render API docs
 - use the "Get document annotations read state" returns
   { "read": false } or { "read": true } depending on
   the read state
 - use the "Mark document annotations as read" endpoint
   and ensure doing that and reloading submission details
   makes the unread indicator go away
 (note that these API endpoints are not used by the Canvas UI
  but I am exposing the functionality to mobile users)

flag=submission_feedback_indicators

refs LS-2670

Change-Id: Iedb7330bb5669efe16f7ea01da132b0d69e4ded4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274332
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-10-01 18:28:46 +00:00
Alexandre Trindade a61047237d Show a friendly message to a New Quiz in concluded enrollment
Context:
- Quizzes 2 / New Quizzes / Quizzes.Next returns a 403 page ONLY
   for students when their enrollment is concluded

refs INTEROP-6784
flag=none

Test plan 1 - expired course:
- Access or create a new course
- Make sure the course has students and teachers enrolled
- Make sure that the chosen course has the "Course" participation
  type
- Create a Quizzes 2 assignment
- Set an end date for the course in the past
- Access the course as a student (masquerade)
- Access the quiz created
- Access the course as a teacher (masquerade)
- Access the quiz created

Test plan 2 - expired section:
- Access or create a new course
- Make sure the course has students and teachers enrolled
- Make sure that the chosen course has the "Course" participation
  type
- Create a Quizzes 2 assignment
- Go to Course > Settings > Sections and click on the section
  shown
- Click on "Edit section"
- Set the course start and end dates in the past
- Check the options "Students can only participate in the course
  between these dates"
- Update the section
- Access the course as a student (masquerade)
- Access the quiz created
- A friendly message will warn about the quiz not available
- Access the course as a teacher (masquerade)
- Access the quiz created
- The quiz will be shown
- Create a new section
- Enroll a student and a teacher for this new section
 Access the course as a student (masquerade)
- Access the quiz created
- The quiz will be shown
- Access the course as a teacher (masquerade)
- Access the quiz created
- The quiz will be shown

Change-Id: I1d0fd2c4baa9ad76b90c533925959a7073f4f06a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268811
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Alexandre Trindade <alexandre.trindade@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2021-09-30 13:17:26 +00:00
Cody Cutrer dbd8c46655 RuboCop: Lint
[skip-stages=Flakey]

auto corrections applied:
 * Lint/AmbiguousOperator
 * Lint/AmbiguousOperatorPrecedence
 * Lint/AmbiguousRegexpLiteral
 * Lint/DeprecatedClassMethods
 * Lint/DeprecatedOpenSSLConstant
 * Lint/NonDeterministicRequireOrder
 * Lint/ParenthesesAsGroupedExpression
 * Lint/RedundantRequireStatement
 * Lint/RedundantSafeNavigation
 * Lint/RedundantSplatExpansion
 * Lint/RedundantStringCoercion
 * Lint/RedundantWithIndex
 * Lint/SendWithMixinArgument
 * Lint/SymbolConversion

Change-Id: I222ec19978033544513bb99755994d109435abad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274551
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-29 03:38:23 +00:00
Cody Cutrer 99012579f2 rubocop: fix some grammar issues introduced by auto-correct
[skip-stages=Flakey]

Change-Id: Ife388b6e821615edb3c475380db9806ac9fa05e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274341
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 18:26:52 +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
Cody Cutrer 6b0095610c RuboCop: Layout spec
[skip-stages=Flakey]

Change-Id: Id479617328562fd009f00db27f248c2ebafa4b7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-09-22 22:40:24 +00:00
Eduardo Escobar 0be2ab467a show status menu for assignments with due date
the parent element of the statusmenu mount point
now is not hidden when the FF for the status menu
is enabled.

fixes EVAL-1902
flag=none

test plan:
- create and publish a course with at least 1 Teacher
  and one student.
- enable the feature flag 'Edit Submission Status From
  Speed Grader'.
- create o first assignment with a future due date.
- create o second assignment with no due date.
- navigate to the speedgrader view.
- notice for both assignmens the status menu is
  visible.

Change-Id: I13e606953a0b87b38ed525ef50ebe47bbdbf9768
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272855
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2021-09-15 19:36:21 +00:00
Ed Schiebel ddc7bd7584 Add a k5_user_bool variable to fullstory
closes LS-2542
flag=none

test plan:
  - edit config/dynamic_settings.yml and change the
    fullstory.sampling_rate to 1.0
  - restart your server
  - log in to canvas (you can't just refresh, but log out
    and back in)
  - inspect the DOM and search for "fullstory snippet"
  - open the <script> tag right after ^that comment
  > expect to see
      k5_user_bool: <true or false>
    in the arg to FS.setUserVars()
    - true if the user is a k5 user
    - false if not

Change-Id: I14ddf7d3875df01a9439297322293247c9c5fe5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271844
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2021-08-20 14:44:36 +00:00
Cody Cutrer 3e2762061f cache all feature flags on root accounts
since they are the most common target of feature flag predicates

Change-Id: I2c6be68f442b2eb66f8cd5ad57cafbc83f114ba1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271502
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-08-16 22:52:56 +00:00
Tucker McKnight 7f2b888696 spec: Add a test for INTEROP-6784
Change-Id: I73d6bcf30e177fd3d498d0dc70541e2b84c53eb5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270567
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Alexandre Trindade <alexandre.trindade@instructure.com>
2021-08-11 18:46:09 +00:00
Math Costa a4ac306426 Remove module_dnd feature flag
closes: LS-2482
flag=none

test plan:
- Confirm that module file upload component behaves
as it would, with the module_dnd FF on

Change-Id: I54f656ee5f0f800f2fbad25e2381dffe3cbca585
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270680
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2021-08-09 15:04:46 +00:00
Tucker McKnight db119c2252 spec: Add a helper that can render an LTI ERB template
This module fills in enough sample information to have
ApplicationController#content_tag_redirect run without errors,
filling in the instance variables that are needed for
app/views/lti/full_width_launch.html.erb to render.

This can be used to write tests for LTI launch views without always
relying on Selenium.

Change-Id: I8057069eb83d0282d5c9dfaa104515659ce07c7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269674
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alexandre Trindade <alexandre.trindade@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2021-08-03 19:18:26 +00:00
Jake Oeding 0744bf5cd1 add flag edit_submission_status_from_speedgrader
prep work for future tickets that will add the
actual functionality to speedgrader

closes EVAL-1824
flag=edit_submission_status_from_speedgrader

Test plan:
- pull up speedgrader
- inspect the page source and see that div is
  not added when flag is off
- turn flag on and check that div is added
- visually inspect that late/missing pills and
  other submission details are rendering as
  expected

Change-Id: I23fad100c30338eec1d98192d64251c796667454
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269215
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Jody Sailor
2021-07-19 18:01:06 +00:00
Eduardo Escobar ddb2d18493 redirect to a2 student view for links in dashboard
the recent feedback partial view was using the old
link, now when the assignment belongs to a course
with a2 enabled it redirects to the corresponding
view

fixes EVAL-1743
flag=none

test plan:
- create a course with at least one student enrolled.
- enable the feature flag
  "Assignment Enhancements - Student" for the course
  created.
- create an assignment
- give some grade to the assignment for that student.
- acting as the student go to the dashboard and click
  in the link for the graded assignment in
  "Recent Feedback".
- notice the a2 student view is loaded.

Change-Id: I4f0a24e240ba7d041f05e9fa356da84277620da2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268777
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-07-13 20:06:21 +00:00
August Thornton 8355d5f530 add manage courses reset role override for reset course content
closes FOO-2111
flag = granular_permissions_manage_courses

test plan:
 • Search within Permissions page for "Manage Courses"
 • Verify new role override "Courses - reset" exists
   and is automatically enabled just for AccountAdmin
 • Verify selecting the group label for "Manage Courses" you are
   presented with a "WHAT IT DOES" and the label and description
   for Courses - reset is complete
 • This grants the following enrollments the permission to be able to
   see/use the "Reset Course Content" button on the right-hand side
   of the Course Details page if allowed:
    • AccountAdmin (on by default)
    • AccountMembership
    • TeacherEnrollment
    • TaEnrollment
    • DesignerEnrollment

Change-Id: Id43f05902f3aec839aeaee27726ba2f498e69acb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-06-28 15:18:49 +00:00
Adrian Packel 03562453a0 Don't show incorrect peer review/rubric directions
For a peer-reviewed assignment with a rubric, don't show the message
indicating that you must both fill out the rubric and leave a comment,
since doing the former is sufficient. (For a peer-reviewed assignment
*without* a rubric, continue showing the corresponding message since
it's correct.)

fixes EVAL-1108
flag=none

Test plan:
- Create two assignments:
  - A1: Peer-review enabled, online submissions, no rubric
  - A2: Peer-review enabled, online submissions, attach a rubric
- Assign a student to peer-review another student for both assignments
- As each student, submit submit to each assignment
- As the assessing student:
  - Open the peer-review page for A1
    - You should see a message saying "This peer review is not finished
      yet." and enjoining you to leave a comment to finish it
    - Leave a comment and refresh the page
    - You should see "You have completed the required steps for this
      peer review"
  - Open the peer-review page for A2
    - You should not see a corresponding message
    - Fill out the rubric and refresh the page
    - You should see "You have completed the required steps for this
      peer review"

Change-Id: Ic26bfdfa98adf5d9226a7e5e201eb35fed02d8e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267410
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Jody Sailor
2021-06-21 21:55:58 +00:00
Syed Hussain 4dbc811408 Update no content message in old assignment flow
"No Content" is confusing for students so replace with a more
appropriate message

closes EVAL-1741
flag=none

Test Plan:
- create an assignment with no content
- as a student, open the assignment and make sure it shows the
message "No additional details were added for this assignment."

Change-Id: Ia7b830f7ee44e335db2e065ae25ed442748f9e0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266839
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Jody Sailor
2021-06-15 20:32:35 +00:00
Ethan Vizitei 506ba1f220 add homeroom toggle to fullstory uservars
FOO-2064
flag=none

TEST PLAN:
  1) canvas does not break when it tries to render fullstory partial

Change-Id: If67431432bb5a690c9aea9ca7510bf92071f85f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266777
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-06-10 14:34:21 +00:00
Omar Gerardo Soto-Fortuño 2c5b4b7b10 Remove unneeded links from ways to connect
Test plan:
  - Spec pass

flag=none

Fixes VICE-1526

Change-Id: I62c69d3f9278c605009b1a9475bb967450f8ca9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266677
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-06-09 16:24:28 +00:00
Mysti Lilla 98f19b3eaa Stop using "more" tab for LTI submission
fixes INTEROP-6733
flag=none

Test plan
- Install more than 3 LTI tools
- Verify that you can launch an LTI
  tool from the assignment submission
- Verify that all LTI tools load
  and look ok
- Verify that if you choose the wrong type
  of file from an LTI tool that it won't
  let you submit
- Verify other types of submissions
  also still work

Change-Id: If03f0d0e7532741d14bac0906feb07b66f1887b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265629
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
2021-06-01 20:55:08 +00:00
Simon Williams 801f3d8ba8 show the global nav admin menu for cross-shard admin users
closes FOO-1904
flag = none

test plan:
- create a user on one shard who is an admin on a different shard
- log into an account on the non-admin shard
- the user should see the global nav admin menu, and it should list
  their account

Change-Id: If1d3725ea8d7e4b4276b9aa72cecdf096a36df8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265318
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-05-20 15:42:14 +00:00
Charley Kline d2e1abaafe Disambiguate form id values on term index page
Fixes FOO-1765

The same value for input labels and ids was being repeated used
on /accounts/:id/terms which can cause assistive technologies to
make mistakes when reading out page content or helping a user
navigate. These ids all need to be unique.

Test plan:
* /accounts/:id/terms page still functions
* Per the ticket, use an a11y checker like axe DevTools on the page
* It should no longer complain about any duplicate ids
* (It still complains about a bunch of visual contrast issues which
  were not in scope here)

Change-Id: I4dd41b0627afc72a7a78367745bdf04d9741f6da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264573
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2021-05-11 00:47:33 +00:00
August Thornton a9bf132ce2 add test coverage for manage courses granulars
closes FOO-1747

flag = granular_permissions_manage_courses

[fsc-max-nodes=18]
[fsc-timeout=30]

test plan:
 • specs pass

Change-Id: I6655df4ff3cd9092d050d4dfd04a1d9bff90810d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261868
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-05-05 20:10:41 +00:00
Spencer Olson 188e631fc2 add student annotation assignments to course statistics
closes EVAL-1596
flag=annotated_document_submissions

Test Plan:
1. Create a handful of assignments, each with a different submission
   type. Make sure at least one of the assignments has multiple
   submission types, and at least one assignment has the submission
   type "Student Annotation".
2. As a student, submit to some of the assignments. Make sure to submit
   something for the "Student Annotation" assignment.
3. As an admin, go to /courses/<id>/statistics for the course. Verify
   the assignment and submission counts in the "Assignments" tab are
   correct for the "Student Annotation" type. the "assignments" count
   should include any active (not deleted) assignment that has
   "Student Annotation" as its type (or one of its types, if it has
   multiple submission types). The "submissions" count should count
   the number of actual submissions for each annotated assignment (
   so if a student is assigned but hasn't turned anything in, it
   does not get included in the count).

* NOTE: summing up all the assignment counts will not always arrive at
  the "All Assignments" count in the "# Assignments" column, and
  summing up all the submission counts will not always arrive at the
  "All Assignments" count in the "# Submission" column. This is
  expected (unfortunately) and is how things currently behave. The
  reason for this is that the total number excludes assignments that
  don't expect a submission, and also certain assignment types
  (i.e. 'basic_lti_launch') are not accounted for in the line-items,
  but are accounted for in the totals.

Change-Id: Iaa058081ee0082d87455891d9caa48cc946890ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263104
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Edwin Ramirez <edwin.ramirez@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-04-20 16:48:38 +00:00
Cody Cutrer a121194cac fix course template dropdown for subaccounts without permission
test plan:
 * enable course templates
 * as an admin, in a subaccount, without any course template permissions,
   the settings page should render

Change-Id: Ia1987b79355ae1fe68205a5760346dbe4ffdfb94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263172
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matt Maruri <mmaruri@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-04-19 19:15:26 +00:00
Juan Chavez 57f79179e3 Show text for comments with media on student grades
User should view the comment text and media on student grade summary

fixes EVAL-1506

flag=none

test plan:

- Create an assignment and publish
- As a teacher, go to Speedgrader for assignment and leave a
comment with text and media
- As a student, go to the grades page
- Click the feedback icon for the assignment
- Verify that the text part of the comment is being showed

Change-Id: I50981e999ab1e502bd609b893f5255aa25e92472
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261677
Tested-by: Juan Chavez <juan.chavez@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-04-19 15:37:11 +00:00
Gary Mei c4c8c58c39 fix multiple attachments not showing annotations
fixes EVAL-1592
flag=none

Test Plan
- Upload multiple documents in a single submission.
- As a teacher, annotate all the documents and post the submissions.
- As the student, click View Feedback on all attachments, from the
  submission details page.
- Verify that all the documents launch in an annotation-enabled
  DocViewer session, with the teacher's annotations present.

Change-Id: I17cb7d351f3a7e982abfc94980e46dc60fd3d33e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262995
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-04-15 16:58:56 +00:00
Charley Kline 45cfdbe2d3 Implement Course Template Associated Accounts List UI
Closes FOO-1685
flag = course_templates

Implements the UI for displaying which accounts a course
template is associated with.

Test plan:
* Have at least one subaccount
* Have a course with no enrollments
* In course settings, enable course as a Course Template
* Click on "Update Course Details"
* Page should reload with the box checked and now say
  "Not associated with any accounts" underneath
* Go to a subaccount and in its settings, set the Course
  Template to be the Course Template you just created
* Go back to the settings on the main account
* Now the "Enable as Course Template" checkbox should be
  checked but grayed out (disabled)
* The text underneath should now read "Associated with one
  account", appear as a blue link, and have an Info icon
  after it
* Clicking on the link should bring up a modal that shows
  a list with one item, the name of the subaccount

Change-Id: I3c7fa70a87cb557b1e57a106a54f3ddc56c93515
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262879
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2021-04-14 21:03:09 +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
Spencer Olson 1f0101422a rename annotated_document_id to annotatable_attachment_id
closes EVAL-1584
flag=annotated_document_submissions

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

Change-Id: I7a20d8521459f1b660e3ba0d34f71cd776d7ba43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262805
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 18:27:08 +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
Cody Cutrer 5dd1df2bab allow setting a course template on accounts
closes FOO-1682
flag=course_templates

test plan:
 * configure one or two courses as course templates
 * in the root account, you can choose the template, or no template, and save
 * in a sub account, you can choose a template, no template, or inherit
 * play with permissions - edit permissions you can still do any of the above,
   add permission only you can only go from no template to some template,
   delete permission only you can only go from template to no template or
   inherit

Change-Id: Ie0b02c1ae7d3ffe17d73ca46c8f1f0eec5adb7ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261029
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-04-05 19:57:17 +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
Matthew Lemon e6a88f7c28 remove notification_update_account_ui FF
fixes VICE-1000
flag=notification_update_account_ui

Test Plan:
- Navigate to your account FFs and note that the flag is no
  longer there
- Navigate to your account notification preferences and it
  should show the updated UI

Change-Id: I97ecb53902a1688b19c0c511a6e4d56a487b506b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261784
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-03-30 22:00:43 +00:00
Jeremy Stanley 34e04307d6 remove direct_share feature flag
test plan:
 - direct share features appear if the user has permission
   to use them

closes LS-2046

Change-Id: I0a3d4614d572d3037d06494bbb05c5a8a1956125
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261055
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-03-29 16:25:30 +00:00
Syed Hussain 29fdf920e1 Update muted tooltip text
closes EVAL-400
flag=none

Test Plan:
Set the Grade Posting Policy for an assignment to manual. Go to
a students grade page:
1. Make sure the tooltip text for the eye icon for this assignment
is "Instructor has not posted this grade" for the assignment
2. Set the what-if score for this assignment and revert it. Make
sure that the eye icon has the above tooltip text
3. Confirm the text below the Total field on the student Grades
page is updated to "has not posted" as well
4. Bonus: For an old quizzes quiz, change the grading policy to
manual and confirm the tooltip text on the students Grades page

Change-Id: Icd489c23b68cc5810cc5ab104a627e2bf54f98dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260653
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-26 19:47:41 +00:00
Pat Renner d37e69fc33 remove enable_webcam_submission flag
flag=enable_webcam_submission
closes OUT-4328

test-plan:
- verify use webcam shows up within
the assignment submission page for a
student when the assignment is of type
"file upload"

Change-Id: Id2d5fd3694792c25f0881f822532a7a587105248
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261400
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2021-03-25 16:12:49 +00:00
Cody Cutrer 57a1bb7774 course template setting
closes FOO-1680

flag = course_templates

API and UI; only shown in API and UI if feature flag is enabled

test plan:
 * as an admin, enable the feature flag, then go to a course with
   no enrollments
 * you should be able to check the Course Template checkbox in settings,
   and it saves. then uncheck and it saves
 * in a course with enrollments, the checkbox should be disabled

Change-Id: I778e7a2d7c7cef83d4c32c84bb0940f87ea9d74a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260652
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2021-03-19 18:10:11 +00:00
Chawn Neal 2987f3b77b Impliment SiteAdmin notifications
fixes VICE-907
flag=none

Add logic to render Canvas Administration if
the noitification is made by site_admin else
render account.name.

TEST PLAN:
 Note there are two areas to test:
 Admin Settings and User Dashboard
 1) Using Canvas gui, use the site_admin to create
  a notification. Confirm it renders
  Canvas Administration.(It will say
  ...from Canvas Administration in notifications.)
  Then create a notification using a default account.
  Note it will render "... from Account.name".
 2) rspec <filepath> will output a verbose description.
  filepath = spec/views/accounts/settings.html.erb_spec.rb
  filepath = spec/views/users/user_dashboard.html.erb_spec.rb

Change-Id: Ic858153d545e064139edc9eddad219292d7d7a25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260329
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2021-03-16 16:12:33 +00:00
Jared Crystal 713b649ec0 hide NQ option in add content to module if NQ is disabled
fixes QUIZ-8191
flag=new_quizzes_modules_support
flag=quizzes_next

test plan:
 - enable new_quizzes_modules_support
 - leave New Quizzes disabled/unprovisioned
 - when using the "add content to module" modal to
   create a quiz, the user should not see an option
   to create a New Quizzes quiz
 - with New Quizzes enabled/provisioned etc, the
   user should see an option to create a New Quizzes
   quiz in that modal

Change-Id: I183cbe366301a287ae48841757b358b1ba44a82e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259649
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
2021-03-02 15:13:14 +00:00
Jacob Burroughs 784c8ea80b Make plugin show erb spec more realistic
Change-Id: I19848500c86f52988f3b04d80f9277cd54cfeecd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-02-17 22:46:02 +00:00
Adrian Diaz 87ae54c2dc api can change graded quizzes types
refs DEMO-101
flag=none

Test plan:
  - As a teacher/admin
    - Create a course with at least one student enrolled
    - Create a graded quiz
  - As a student
    - Take the graded quiz
  - As an API client
    - Edit the assignment paired with the quiz via api
        so that it's submission type is "file_upload"
        (or some other submission type that is not
        "online_quiz")
  - As a student
    - View the submission
  - As a teacher
    - View the submission

Change-Id: Id6f7518b7f7dd3c87e9cf4cdfeb772bd79645b72
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257299
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
2021-02-17 19:12:16 +00:00
Cody Cutrer 160ff3c899 bump sanitize to latest
[fsc-max-nodes=12]
[fsc-timeout=60]

 * switch lots of parsing to Nokogumbo to keep things consistent
 * deep CSS sanitization is now built in, and with a proper parser (meaning
   we can drop our code to do it, and adjust some specs to account for things
   that _are_ valid)

lots of changes because gumbo parsing<->serialization cycle is slightly different:
 * better job preserving original whitespace
 * literal non-breaking space characters are converted to &nbsp; entities
 * <p> tags aren't inserted for the heck of it
 * several _other_ entities are unnecessary, and output as literal characters
 * some elements no longer have a closing tag

Change-Id: I7c5e36cbd04b8a05f64c9e0af00868dd6b00f4ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256444
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-02-17 18:17:57 +00:00
Simon Williams 86e8e0fc4d fix up a few failing specs when the granular user flag is on
refs FOO-165
flag = granular_permissions_manage_users

test plan: specs pass when the flag is defaulted on

Change-Id: I89f474ea0812dbcb3cb5fe07b86f49d124cfe650
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258882
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-02-17 15:42:14 +00:00
Augusto Callejas 92e03a64cd Allow reassignment from SpeedGrader
closes OUT-4033

[fsc-timeout=50]

flag=reassign_assignments

This feature allows teachers to reassign an assignment
to a student after they've submitted to the assignment
and the teacher has provided feedback via comments.

The reassignment will appear in their planner with
a "Redo" tag visible next to the assignment.

Only supports assignments of submission type "Online".

test plan:
  - enable "Reassign Assignments" feature option
  - in a course, create a student account
  - as a teacher, create an assignment with a due date
  - as a student, confirm the assignment appears in
    their planner
  - as a student, submit to the assignment
  - as a teacher, open the submission in SpeedGrader
  - reassign the assignment to the student by:
    * adding a comment to the assignment
    * clicking the "Reassign Assignment" button
  - as a student, confirm the assignment appears
    with a "Redo" pill in the planner, along with
    the comment from the teacher
  - as a student, resubmit to the assignment and
    confirm the assignment shows as completed again
    in the planner without the "Redo" pill
  - repeat the above steps, except with an assignment
    that has "Anonymous Grading" enabled and it should
    behave in the same way
  - repeat the above steps but with more students and
    no due date on the assignment, but with various
    assignment overrides with due dates and some students
    assigned to those overrides (using course sections)
    and confirm the "Resassign Assignment" button only
    appears for those students with assignment overrides
    (and hence due dates), with the button being disabled
    until the student both submits to the assignment and
    the teacher has provided a comment.

Change-Id: Id745b50f3810378804e0728e544ebf6bff8f756a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251663
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
2021-02-17 00:28:25 +00:00
Manoel Quirino Neto c276a0f613 Use webcam to submit photo
closes OUT-4122
flag=enable_webcam_submission

test plan:
  - Enable enable_webcam_submission ff
  - create an assignment with submission type "file uploads"
  - as a student, open the assignment > submit assignment
  - Assert Send File or Use Webcam button are displayed
  - Click in Send File
    Assert the legacy file upload is displayed
    Assert the input works (submit)
  - Click in Use Webcam
    Assert you can take picture using webcam
  - Click Add another file
    Assert you see Send File or Use Webcam
  - Click Submit assignment
    Assert you can download the webcam image and
    the file in the legacy input

Change-Id: I71d12a5de7d62c7b2774f9588da9ab086de7888d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254862
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
2021-02-03 14:56:47 +00:00
Jared Crystal 4ba605d903 differentiate Classic from New Quizzes in add to module modal
closes QUIZ-8082
flag=new_quizzes_modules_support

test plan:
 - with the FF enabled:
   - in the "add content to module" modal, under the "Quiz"
     dropdown, when New and Classic quizzes are mixed together,
     the classic quizzes should be identified as such with a
     "(classic)" suffix
   - if there are only classic quizzes displayed, there should
     be no "(classic)" suffix
 - with the FF disabled:
   - there should be no identifier for classic quizzes

Change-Id: I8218e7ff0149b1b7e8298399ef24a8159155ead0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257681
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
2021-02-02 00:02:29 +00:00
Jared Crystal 71c5be2aa3 add ability to add NQ from modules
closes QUIZ-8085
flag=new_quizzes_modules_support

test plan:
 - with the FF enabled:
 - on the modules index page, open the
   "add content to module" modal
 - select "Quiz" from the dropdown and click [ Create Quiz ]
 - if you have not opted for a particular engine yet
   you should be presented with the choice between Classic
   and New Quizzes (both should work)
 - if you have opted for your quiz engine choice to be saved,
   your choice should be used automatically, and you will
   not have the option here
 - with the FF disabled:
 - creating a quiz by clicking [ Create Quiz ] should always
   create a classic quiz, regardless of saved preference

Change-Id: Id53a95dd3e2f867167abbabefaf22e09b0bdfe89
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257075
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
2021-01-26 15:54:30 +00:00
Jared Crystal e939ce9b60 change creation language from "New" to "Create"
closes QUIZ-8084
flag=new_quizzes_modules_support

test plan:
 - with the FF enabled:
 - in the "add content to module" modal,
   when editing an assignment group, and
   when finding a QO question to add to a group
   [ New ... ] should now be [ Create ... ]
 - also in the modal, the helper language below the dropdown should
   be "Create" as well as the SR language when focusing the box
   containing the options
 - with the FF disabled, they should all still be [ New ... ]
 - no regressions when the module_dnd FF is enabled/disabled
   (Module File Upload Enhancements)

Change-Id: I3d3efe795dc7d1856aa37b8c7b38088533f678ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257008
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
2021-01-22 21:53:35 +00:00