Commit Graph

55538 Commits

Author SHA1 Message Date
Cody Cutrer 502aa068da rubocop: Layout/Multiline*LineBreaks
[skip-stages=Flakey]

Change-Id: I24912809267088bc19a4082c49bc5f78ca7b76bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317302
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-01 19:31:42 +00:00
Aaron Suggs a4a6612477 Prevent restoring some group discussions
If a teacher restores a group discussion while the
course discussion is still deleted, it leads to unexpected
product behavior.

Instead, teachers should leave the course discussion
undeleted, and delete specific group discussions.

This prevents group discussions from being restored if their
associated course discussion is deleted.

Test Plan:
  - Create a course with a group set and a group
  - Create a course discussion topic for that group set.
  - Delete the course discussion.
  - Notice that the GROUP discussion topic is not listed
    on the group undelete page.
  - If you try to make the API call to restore the group
    discussion, it gives a 403 Forbidden error.

closes VICE-3426
flag = none

Change-Id: I55832d243845571d73bdabee9481ebac40500ef8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317191
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jody Sailor
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-05-01 00:54:27 +00:00
Aaron Ogata 2a3e6b04af fallback to vault if encryption_key not in config
refs AE-61

Change-Id: I9e38c8a1ab15bcdc6924198a480c20b639dfb8a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317283
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>
2023-04-28 21:26:39 +00:00
Jackson Howe c543536fa5 Add account_calendar_subscription_type column
This column will be used to track whether admins want users to be
automatically subscribed to the account's calendar. Making it a string
column to allow for potential future subscription models. Using a
column instead of a setting since we'll make queries against this
column and don't want to load lots of accounts into memory.

Also adds a partial index as a postdeploy. The new app code that uses
this column is behind a feature flag and won't be used until after the
deploy is complete, so a postdeploy is fine here.

closes LS-3981
flag = none

Test plan:
 - Run migrations
 - In a rails console, create an account:
   `Account.create!(account_calendar_subscription_type: "auto")`
 - Run `Account.auto_subscribe_calendar`
 - Expect to see only the new account you just created
 - Run `Account.create!(account_calendar_subscription_type: "blah")`
 - Expect that to fail

Change-Id: Ic09e5b9af3fbe138075419a4279b9bd0b00859db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317173
Migration-Review: Cody Cutrer <cody@instructure.com>
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: Jackson Howe <jackson.howe@instructure.com>
2023-04-28 19:36:25 +00:00
Caleb Guanzon 319a82fc21 remove #course_hide_final_grades when rqd
flag=restrict_quantitative_data
fixes VICE-3482

test plan:
- turn rqd feature flag and course setting ON
- visit course settings page
- verify that you do not see the
Hide totals in student grades summary checkbox

Change-Id: Ib608a9630be352f3cb9523c89fe92af258cffa48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317272
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
2023-04-28 18:20:00 +00:00
Paul Gray 2f30413190 Fix LTI tool magnifying glass alignment
release = none

test plan:
Load the select content dialog (By doing a deep linking/content item
launch), and find a tool that has a magnifying glass, and make sure it's
aligned properly.

Change-Id: Ieb028244171a68413cba625a5a613bf3037d5838
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315444
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2023-04-28 16:44:26 +00:00
Yona Appletree ac34b669e1 RCE: Enable noImplicitAny for typescript
- Matches recent changes to canvas core tsconfig
- Enable noImplicitAny in packages/canvas-rce/package.json
- Remove canvas-rce pre-commit hook
- Add @ts-nocheck to files that have errors due to noImplicitAny

test plan:
  - existing tests pass

flag=none

Change-Id: I6540a42ba5089deaab851f113e5f665dcff2851e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317214
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-28 16:43:16 +00:00
Aaron Shafovaloff ce864bb5ff turn on noImplicitAny for typescript
also: remove tsconfig-strict.json

also: remove tsc precommit hook

test plan:
  - existing tests pass

flag=none

Change-Id: Ia2b30d9d77fdb55159de4fe16f3ee1826f43aad5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317197
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-27 21:34:07 +00:00
Jacob Burroughs bc4e39c8d2 Exact pin outcomes-ui
closes GH-2193
closes GH-2138

Change-Id: Icf573b8662b305ff887ef246264479eb36b89410
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317190
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-27 20:31:21 +00:00
Aaron Ogata dea48dac16 use vault for lti secrets
refs AE-55

Change-Id: I11da6b3d62e70393b86fd01a0c1305a7971ba09f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317174
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-04-27 19:58:48 +00:00
Yona Appletree 871c8b253a Fix test that fails sometimes due to hard coded timezone
Closes MAT-1340
flag=none

QA Risk: low

Test plan:
- Automated tests pass

Change-Id: I8748670ad6fe7f4647198285eb001cd95480ea9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316779
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: Yona Appletree <yona.appletree@instructure.com>
2023-04-27 19:40:14 +00:00
Yona Appletree e115c330ca Type safety and prop cleanup for RCE components
Closes MAT-453
flag=none

QA Risk Low

Test plan:
- automated tests pass

Change-Id: I615b91dd03fb865bf5b4390702d320e2b88feb39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316757
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-04-27 19:39:52 +00:00
Caleb Guanzon 928b63ba8c remove Hide grade dist graphs checkbox when course is rqd
flag=restrict_quantitative_data
fixes VICE-3478

test plan:
- as a teacher or admin
- follow the steps as outlined in
the newly created selenium tests

Change-Id: I11bcb461e2af3d6813a6a39fcfbb7015b75b9753
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jody Sailor
QA-Review: Drake Harper <drake.harper@instructure.com>
2023-04-27 19:24:29 +00:00
Ed Schiebel 80874dd213 Update duplicated items when bulk publishing 1 module
from the post-batch-publish fetch results.

closes LS-3993
flag=module_publish_menu

test plan:
  - have a module with stuff in it
  - have a 2nd module with sone of the same stuff in it
  - pub/unpub one of the modules + items
  > expect the items duplicated in the other module to
    be updated with the correct publish state

Change-Id: I022f6335c988950b08b961b0c1a5c5ce178dd763
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317175
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-04-27 19:14:29 +00:00
Aaron Shafovaloff e9671c9620 Speed up use of Intl formatters
test plan:
  - existing tests pass

flag=none

refs EVAL-3093

Change-Id: I627a409014be9afb073b26b7c70f16ba4977738d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-04-27 18:42:06 +00:00
Jason Gillett 78e88659ba Restore all options on assignment create/edit with RQD
Since the original commit that hid these options were in coffee script
And those files have since been decaffeinated, a simple revert won't work.

closes VICE-3503
flag=restrict_quantitative_data

Test Plan
1. Act as  a teacher in a course with RQD on
2. Create a new assignment
3. Verify that all display grade as options appear
4. edit an assignment
5. Verify that all display grade as options appear

Change-Id: Id5b4157c7ce4109a44e8f66549ecef84bde2adc2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317166
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
2023-04-27 18:41:44 +00:00
Jason Gillett a66550fcdf Create optimistic response for read and star on inbox
closes VICE-3466
flag=react_inbox

Test Plan
1. go to react inbox
2. set network throttle to slow
3. Star conversations
4. The star state should set before network request finishes
5. If network request fails, the original state should return
6. do steps 3-5 for marking conversation unread
7. Reset network throttle to no throttle.

Change-Id: I3bd9d8b4aaec49e50c484e45f37bce3da38ec769
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317061
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-27 18:40:33 +00:00
Aaron Shafovaloff 5bf16b69cd speed up tsc precommit hook
Change-Id: I8349b95ba2ca7d1788687c6075001314fe935932
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317162
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-27 18:08:47 +00:00
Jackson Howe a99d060bd9 Add auto_subscribe_account_calendars flag
flag = auto_subscribe_account_calendars
closes LS-3979

Test plan: specs pass

Change-Id: Iaf29690ad88c555b20364469a1b6dc710d451177
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317143
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>
2023-04-27 17:33:09 +00:00
Jackson Howe b647585fb5 Remove account_calendar_events flag
flag = none
closes LS-3980

Test plan:
Spot check these areas to make sure they still work:
 - Edit account calendar visibility as an admin
 - Change account calendar granular permissions in account permissions
 - Add account calendar events in the calendar as an admin
 - Subscribe to and view account calendars as a student

Change-Id: I9a5a3fa85f5557720f43a5e26c3abf5218127259
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317141
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>
2023-04-27 17:32:59 +00:00
Xander Moffatt 7e5e0f8e4a change beta/test LTI 1.1 launch urls on the fly
why:
* overwriting the urls during the beta refresh is expensive, slow,
often causes the beta refresh to take too long, and doesn't account
for many situations like rich content links or content items that
don't directly match the tool's url
* instead, use the same tool config to mutate the urls at launch time
for 1.1 tools
* this doesn't apply to 1.3 tools, which should use the
canvas_environment parameter of the login request to achieve similar
results

closes INTEROP-8005
flag=none

test plan
* install a LTI 1.1 test tool (https://lti-1p1-test-tool.vercel.app/) is
easiest
* modify it in the Rails console to include a domain or launch_url
override:
```
t.settings[:environments] = {
  domain: "https://lti-1p1-test-tool-git-master-xandroxygen.vercel.app/"
}
t.save!
```
* create some content from this tool - assignments that launch it,
rich content items - you can check the ticket comments for some examples
of the current behavior in beta and things to test
* mock your local canvas to be "beta":
  * create a test_cluster.yml file in the config folder
  * add `test_cluster_name: 'beta'` to that file
  * in a rails console, run `Setting.set("allow_tc_access_", "true")`
  * restart your canvas `dc restart`
* launch the 1.1 test tool - it should be launching to the overridden
domain
* launch some of the content you created - it should also be launching
to the new domain

Change-Id: I21f1164799a68016921d34d3924ca621589235ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314470
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-04-27 15:57:51 +00:00
Aaron Shafovaloff 867c59dd8c replace $.toSentence with Intl.ListFormat
test plan:
  - test secondary info display in gradebook
    - properly shows lists of section or group names
  - note that TotalGradeCellFormatterSpec.js (uses Intl.ListFormat)
    also passes

closes EVAL-3093

flag=none

Change-Id: Ief7ffaa831cebc4540c6f962f4792978042f7023
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317100
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-27 15:42:15 +00:00
Drake Harper 11f988889e Add grade_for_student method to Assignment model
refs VICE-3502
flag=restrict_quantitative_data

Test Plan:
- specs pass
- in a rails console
- get an assignment
- get a user
- call assignment.grade_for_student(user)
- should return the grade for the user

Change-Id: I4ba2c43fe24fe14bd897c242eb426d6ae1e56769
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317045
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
2023-04-27 15:32:28 +00:00
Aaron Shafovaloff 6d88ff833c remove need for html-escape from enhance_user_content.js
test plan:
  - existing tests pass

flag=none

refs EVAL-3088

Change-Id: I8cff040afa5f820b913813136ba6cdaa92dd0d57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317074
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-27 15:26:18 +00:00
Matheus 09b72d68b4 Remove spacer for mobile blueprint sidebar trigger's abscence
closes LS-3884
flag=none

Test-plan:
- Create a blueprint course
- Check that it displays the BP sidebar
  trigger and sidebar correctly
- Access it in a mobile or with a mobile viewport
- Check that the normal BP sidebar trigger is hidden
- Check that the mobile header has a new BP trigger
- Activate it and check that the sidebar opens up
- Check that the new trigger does not show up in
  normal or child courses's mobile header and that
  there is no extra space where the trigger would be

Change-Id: Ic40d45e48a3a42cf494111513c01828233cf882d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317059
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>
2023-04-27 15:01:05 +00:00
Aaron Shafovaloff 480d9a4fa6 remove html-escape from slickgrid.long_text_editor
test plan:
  - existing tests pass

flag=none

refs EVAL-3089

Change-Id: I8d0666fc52c8cdcf67f4cbcc294da3860ce50304
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317077
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-27 15:00:36 +00:00
Aaron Shafovaloff b8ab0d98fe remove $.underscore from instructure_misc_helpers
also removes redundant str-underscore.js

test plan:
  - new specs pass

flag=none

refs EVAL-3087

Change-Id: I2c1beb4183be2ed733899d23bee87efae62b90cd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317112
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-27 14:55:38 +00:00
Jason Gillett 4186bc34ff Consolidate onStar logic to match onRead handling
We had duplicate onStar Logic within the CanvasInbox and its child
ConversationListContainer. This patchset removes the duplicate logic
and consolidates it in the same way that the onRead mutation is handled.

refs VICE-3466
flag=react_inbox

Test Plan
1. Verify that onStar functionality still works correctly

Change-Id: Idd80527c2b2ab19ab6dd4b14cc2fd13d67b85d8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317033
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-27 14:38:03 +00:00
Aaron Shafovaloff e570fbe97f remove need for html-escape in media_comment_thumbnail.js
test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: Ic59d0002423772396ea3315294dc3b6ce36a9b75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317068
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-27 14:23:42 +00:00
Jonathan Guardado 3e477b0c81 Don't enable the continue button when canceling jobs
fixes LS-3963
flag=module_publish_menu

test plan:
- Make some changes and publish them, while publishing click the
Stop button
- Expect the jobs to be canceled and the modal to close without
enabling the continue button
- Repeat the process using the unpublish option

Change-Id: I7f1fcb6967665b457010ee188624052fb6c52a17
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316941
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
2023-04-27 00:35:21 +00:00
Aaron Shafovaloff 3ffa985bcc remove need for html-escape in instructure_helper.js
test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: If3ed9bee9f0b10b554a9fdf80415e88e3e77f97a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317067
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-26 23:25:38 +00:00
Aaron Shafovaloff 548ba8ae52 remove need for html-escape in doc_previews.js
test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: I331a742462ebeefc6a501cc492dc92f95589e371
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317066
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-26 23:25:05 +00:00
Aaron Shafovaloff 891e8927ed remove use of html-escape in instructure_equation/plugin.ts
was needlessly used

test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: I3e41220f24232b347cdb141a0e1f4dbd65f41acc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317070
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-26 23:19:08 +00:00
Chris Soto 6290b0051f classic quiz what-if scores
when entering a what-if score for a classic quiz that requires grading
(pending_review status), the total does not update if the "Calculate
based only on graded assignments" button is checked.

fixes EVAL-3042
flag=none

test plan:
- as a teacher, create a classic quiz with an essay question
- as a student, take the quiz
- as the student, view the grades page
  - make sure the "Calculate based only on graded assignments" box is
    checked
- verify that the total score percentage and points do not factor the
  score/points for the ungraded quiz assignment.
- as the student, you should see the rocket icon next to the assignment
- as the student, modify the score for the assignment
- verify that the total score updates to reflect the changes for the
  entered score. Verify that both the percentage and the points are
  updated.
- as the student, revert the score back to the original score.
- verify that the total score percentage and points both go back to the
  original values.
- as the student, refresh the page and verify that the total score
  percentage and points do not factor the points for the ungraded quiz
  assignment.

Change-Id: I8a847d19b9c250e634cec2dc194cd917d352a683
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316770
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-04-26 22:41:57 +00:00
Kai Bjorkman f2a653864f create hide_zero_point_quizzes_option FF
flag=hide_zero_point_quizzes_option
closes EVAL-3044

Test Plan:
    -specs pass

Change-Id: I721c8fa735622c128930333ea269dcd715515643
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317035
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-04-26 22:31:04 +00:00
James Logan 0aeea8a807 Allows NQ to sync published state during BPS
Does two things:
1. Allows passing of `skip_downstream_changes` via the
   assignment update api. This allows us to make changes
   blueprint child assignments without excluding them
   from future blueprint syncs. This is necessary because
   we update the workflow state during the initial BPS.
2. Skips downstream changes when marking NQ assignments
   as `duplicating` during the initial BPS.

refs QUIZ-9465

Test Plan:
- Specs pass
- Run the test plan from the coresponding LTI PS:
  https://gerrit.instructure.com/c/quiz_lti/+/314701

Change-Id: If7dd580046c370d94fc1c7f6fa7b998c500225dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314703
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: James Logan <james.logan@instructure.com>
2023-04-26 21:36:32 +00:00
August Thornton b3d35ebfa4 remove manual access token html template ref to notifications
the notifications url gets added via the layout template partial
and is only included in one of our manual access token creation
templates, so I'm just going to remove it from the html template,
to be consistent with the others.

fixes FOO-3480
refs FOO-3412
flag = none

test plan:
 • have a multi-sharded canvas setup using MRA
 • have a user with an active email communication channel that
   has been created on a shard different than your default shard
   (where the siteadmin account resides)
 • log in as the user and navigate to their user settings page
 • create a new access token using the |+ New Access Token| button
 • check the notifications sent to the user and note that the link
   on the text “Manage User Settings” points to the correct host
   of that user's home account, instead of the primary root account
   on the default shard
 • verify in the html template we no longer include the link
   "Update your notification settings"
 • re-generating access tokens should behave similarly

Change-Id: Ib764f315c154baf1fb1a043c2f66baab6adfb804
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316964
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2023-04-26 20:19:21 +00:00
Drake Harper 0c3baa9f7b Add grading standard type and field to course type
refs VICE-3502
flag=restrict_quantitative_data

Test Plan:
- grading standards should be queryable on a course
   - use the sample query below to test in /graphiql

Sample Query:
query MyQuery {
  legacyNode(_id: "1", type: Course) {
    ... on Course {
      gradingStandard {
        title
        data {
          baseValue
          letterGrade
        }
      }
    }
  }
}

Change-Id: I04174a3b4ea3b26069aafd4384239375b2275610
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317037
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2023-04-26 19:36:42 +00:00
Yona Appletree 428b086c87 Rename some js -> ts before other changes
Refs MAT-453
flag=none

QA Risk Very Low

Test plan:
- automated tests pass

Change-Id: I3af4310a11edac2efa49504c049b24244475f221
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316975
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-04-26 18:04:24 +00:00
Jacob Burroughs 27815b53dd Support arbitrary pandata events token prefixes
fixes AE-215

Change-Id: I07fb70a025487c4e3652287c9684ded11898576a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317028
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-04-26 16:43:47 +00:00
Jason Gillett 7dc159c38e Hide points possible from legacy discussions RQD
closes: VICE-3459
flag=restrict_qualitative_data

Test Plan:
1. Create a graded discussion
2. enable RQD
3. as a teacher view discussion
4. points possible should be visible
5. View as a student
6. Points possible should not be visible

Change-Id: I0498c659096aadce8e6e3ce921c4252a743a3c4a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316613
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
2023-04-26 16:43:41 +00:00
Aaron Shafovaloff ea54d5cc3e move obj-select package to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: I9f00ddb761c0ae6c46d7079d07fe11f48c604dd1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316705
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-26 16:32:13 +00:00
Aaron Shafovaloff fb484eac8b move jquery-tree to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: Ifc493c2b45a67f2f8208e36521d322aa9ca5af08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316708
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-26 16:29:04 +00:00
Aaron Shafovaloff e07e739eaa expose lodash-underscore types
removing the IIFE from lodash-underscore exposed the types

lodash is preferred, but this provides types for existing code.

bonus: flattenObjects was moved to a shared utility function
  it is only used once

test plan:
  - existing tests pass

flag=none

Change-Id: I7ec207f15a326bdefe75897f5c627dbd3d0d0c7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316677
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-26 16:26:25 +00:00
Ed Schiebel 314b157af9 Update the green bar on pub/unpub'd module items
when you toggle a single module item's publish state, the green bar
at the item's left edge is not updated.

closes LS-3962
flag=module_publish_menu

test plan:
  - have couple modules with items. have at least 1 item
    in multiple modules
  - click on the pub/unpub button for a single item
  > expect the green bar to be there if the item gets published
    and not if unpublished
  > if the item is in >1 module, expect them all to have the
    right green bar state
  - try publishing/unpublishing a whole module + items
  > expect the green bars to reflect the published state
  > expect items in >1 module to have the right state in all
    modules
  - try publishing/unpublishing all modules + items
  > expect the green bars to reflect the published state

  > expect the greeen bars to still work correctly on the assignments
    and quizzes pages

Change-Id: I2bcd0e760e5a9e53f4036b71c15b8b6a1aad6f31
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317021
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>
2023-04-26 16:24:25 +00:00
Caleb Guanzon 38def74778 do not show late policy tooltip when rqd
flag=restrict_quantitative_data
flag=assignments_2_student
fixes VICE-3441

test plan:
- have both feature flags ON
- as a teacher go to /courses/:course_id/grades
- click the cog menu
- go to late policy
- set your automatic late deductions
- create an assignment due yesterday and publish
- submit the assignment as a student
- grade the student
- as the student who is quantitative data restricted
- visit your assignment page
- verify that the hovering on the top right of the page
that shows grade does not trigger a tooltip

Change-Id: I8562234ff522a55c800e99c6a8cb1fb1b80de43f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316926
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2023-04-26 16:11:06 +00:00
Jason Gillett 68e809c318 Update initial inbox menu
flag=react_inbox
closes VICE-3427

Test Plan
1. Open the React inbox
2. Click into the Addressbook
3. Verify that the initial menu is Courses and Users
4. Do the same verification in compose modal

Change-Id: I4464bdcb5d8dc76923bf6a037d35348a7bd3795c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316950
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-26 15:56:17 +00:00
Jason Gillett 29002a5a71 Allow teachers to edit a student post with an attachment
closes VICE-3410
flag=react_discussions_post

Test Plan
1. Create a discussion
2. Create an entry as a student with an attachment
3. As a teacher edit the entry message
4. the edit should be successful.

Change-Id: I75569b5f89c4ad765dc2b2381c1e4f094af28bfd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316947
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-04-26 15:50:53 +00:00
Ed Schiebel 30b97decd9 Have bulk publish modal text unique to skipping items or not
closes LS-3961
flag=module_publish_menu

test plan:
  - from Publish All, select modules + items
  > expect the note in the modal to talk about modules and items
  - from Publish All, select modules only
  > expect the note in the modal to talk about modules only

Change-Id: Id54c98377dd192f4d54c64295844ed506af85f4c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317016
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>
2023-04-26 15:25:24 +00:00
Aaron Shafovaloff 970faf4f9b fix: student group filter breaks gradebook
the cause was special characters and the non-standard use of React.

test plan:
  - turn on enhanced_gradebook_filters
  - create a student group with special characters (e.g. <, >, &)
  - attempt to filter by it in the gradebook
  - the filter navbar should not disappear

fixes EVAL-3032

flag=enhanced_gradebook_filters

Change-Id: I377edba4d97c29f80e800165fa1b059c07a2b7b0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316905
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-26 13:51:49 +00:00