Commit Graph

24163 Commits

Author SHA1 Message Date
Weston Dransfield 434b4d977c spec: Use consistent root account in account lookup specs
refs CNVS-59187
flag=none

Test Plan
specs pass

Change-Id: I6de8f77ac3d52a6120703a0d9ba5eee886ea6e06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328599
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2023-09-25 16:50:39 +00:00
Robin Kuss bdffe09fc3 spec: assign to custom selenium tests
Closes LF-801

Test Plan: passes Jenkins

Change-Id: Ifeb4480f948db0cec35564f175b894574c02245a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328373
Product-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-25 12:58:12 +00:00
Jackson Huang 13832c1b90 spec: fixes flacky speedgrader_comments_spec
this fixes the flacky spec that was not handling
the create draft comment modal from the speedgrader
comment section

closes EVAL-2664
flag=none

test plan:
- Make sure that docker-compose exec web bundle exec rspec
spec/selenium/grades/speedgrader/speedgrader_comments_spec.rb
passes without any errors

Change-Id: Iac2fcc3c966cd77160dc7c75b6849622f7121238
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326975
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-25 05:28:18 +00:00
Weston Dransfield b17b617473 Add variable expansion for global context ID
Closes QUIZ-12126
flag=none

Test Plan:
- Add the new variable expansion to a custom var in an installed
  LTI tool
- Launch the tool and validate the variable is populated with the
  global context ID

Change-Id: I4aa102e7f6e35968d8103be93ef7b843eb170f05
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327328
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Product-Review: Stephen Kacsmark <skacsmark@instructure.com>
2023-09-22 17:50:27 +00:00
Charley Kline 3c5e316883 Revert "Upgrade Canvas to InstUI version 8 (frd)"
Refs FOO-3862
flag=none
[pin-commit-multiple_root_accounts=9d1698853e352f7e023e196e80cc195215a2b98c]

This reverts commit 448f1eebef.

Reason for revert: downgrade to InstUI 7 per engineering leadership

Change-Id: I89c607d09c29885da77b4474b757c7f205e51f01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328102
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-22 01:35:06 +00:00
Caleb Guanzon f979089024 make todo_list work for discussion_create ff
flag=discussion_create
fixes VICE-3753

test plan:
- make sure studentplanner is enabled
in your account settings
- as a teacher create a discussion
- verify that you can add a TODO date
- save and publish
- verify that your todo date saves

Change-Id: I7e517a5c451f35727ade975c54890f62d7e0c98e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328265
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
2023-09-21 18:55:58 +00:00
Tucker McKnight cdab4b61d8 Update associated line item when changing an assignment's due date
fixes INTEROP-8201

flag = none

test plan:
- using the 1.3 test tool, create an LTI 1.3 assignment
- make a note of the ID of the line item that is created
  (might be easiest to do Lti::LineItem.last in a rails console)
- in the Canvas UI, edit the assignment's due date
- call the /api/lti/courses/:course_id/line_items/:line_item_id endpoint
- see that the end_date_time field matches the due date you gave the
  assignment

Change-Id: If94edb3d795860c6746d2367e4799541a43aae8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326864
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2023-09-21 15:32:38 +00:00
Evan Battaglia daa2025b46 LTI: variable substitution for adminable accounts
This adds a variable expansion which provides a list of subaccounts
(recursive) the launching user has admin rights too. This is needed by
Studio.

The code add in app/models/user.rb has been moved verbatim from MRA,
where it was previously written for another purposes. See corresponding
commit which removes it from there.

closes INTEROP-8207
flag=none

Test plan:
- have an account (not a root account) with at least one subaccount of
  its own.
- make a user an admin in the account by going into account settings ->
  admin.
- add a custom variable with the value "$Canvas.user.adminableAccounts"
  to an LTI.
- launch the LTI as the user
- look at the LTI custom variable (HTTP request params for LTI 1.1, in
  the JWT for LTI 1.3). You should see the account id you added the user
  as an admin for, and the ids of all of its subaccounts.

Change-Id: I222efbc44b727bf6a02c8ab8e77851a2938fb5ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327509
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-09-21 15:30:08 +00:00
Cody Cutrer 22b7677b3b switch from byebug to debug
It's the new default debugger in ruby 3.1. Rails switched to it in 7.0,
avoids issues with Zeitwerk, has a more modern interface based on
current IRB, supports Unix Domain Sockets for remote debugging,
promises even better future maintenance due to being part of Ruby,
etc.

Change-Id: Ieaa7872f1c0308b16ae180fdb16df5dd6caa87a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328241
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-09-20 23:48:39 +00:00
Caleb Guanzon 80f0f2f561 make allow liking and only graders can like work
flag=discussion_create
fixes VICE-3752

test plan:
- as a teacher or student, create a discussion,
click allow liking, save and publish
- verify that you can like discussion replies

- now create an allow liking discussion and also
check only graders can like, then save and publish
- verify only tas, teachers, and the like can like

- optional: (this takes a while to set up,
but is fully tested in selenium)
- - verify you do not see allow liking
checkbox in discussions created in homeroom courses

Change-Id: Ib309ab122d1602d550c00a3ff50f82efb8209150
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328037
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-09-20 16:47:38 +00:00
Kai Bjorkman d57e3d3101 remove visibility_feedback_student_grades_page feature flag
flag=visibility_feedback_student_grades_page
closes EVAL-3086

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

Test Plan:
    -specs pass

Change-Id: If2f48a57d0bca93ff970c4b5e820eb25ed55b1e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326572
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-09-20 15:43:08 +00:00
August Thornton 02ec47d5c1 guard from active duplicate merge data objects
Multiple user merge data objects with the same from_user_id will
conflict with one another. In this case it was within minutes apart.
This is a problem as the split_db_users method will only split the
first occurrence, and then the second merge data object will fail
(at least when triggered through the UI/API and specified user merge data
object is not passed in as an arg)

Uniq by last in first out (LIFO)

fixes FOO-3844
refs FOO-3838
flag = none

test plan:
- create two active user merge data objects with the same from_user_id
  and user_id combination
- run the split_db_users method and verify that the second merge data
  object does not get picked up
- user merges should fail with a message about the user already being
  merged with the same source / target user pair
  (look to the specs for how to do this)

Change-Id: I5ed59308dfa8f376757995df0a161353606a91e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327694
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2023-09-20 15:05:01 +00:00
juan.chavez bbcb044cba Course Pacing title for assignment overrides
closes LF-739

flag=none

test plan:
> Verify that the Course Pacing override title says
"Course Pacing" instead of "No Title".

Change-Id: Ic922df640229d6521538f9a4689a1bdceea977e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328057
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: Juan Chavez <juan.chavez@instructure.com>
2023-09-20 14:12:47 +00:00
Jeremy Stanley 933d7a539d smart search: handle deleted pages
test plan:
 - delete a page; its embeddings should be deleted
 - update a deleted page body; it should not have embeddings created
 - undelete the page; it should have embeddings recreated

flag=smart_search
closes ADV-36

Change-Id: Ib7ac7153e82e6a6508b73e748111ceba909f7cf1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328054
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-09-19 22:24:54 +00:00
Jeremy Stanley 3dac24f8ba smart search: send plain text to OpenAI
instead of HTML content, which the model may not be equipped
to understand

flag=smart_search
closes ADV-26

Change-Id: I8b485d6badb1a06fee8682dafd4b11129b86db6a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328053
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-09-19 22:24:40 +00:00
Tucker McKnight b816477a3b Remove developer_key_page_checkboxes feature flag
The flag has been on for all accounts for a few weeks now.

fixes INTEROP-8138

test plan:
- tests pass

Change-Id: Ibe4e2b0257f8274bdf7f92bb78460ebb5e959d83
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327727
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2023-09-19 22:13:17 +00:00
Jason Anderson f587677d78 Create Outcome Details Modal in LMGB
closes OUT-5859
flag=improved_lmgb

This ticket creates a modal that contains detailed
information for an outcome. This information includes
 - Outcome Title
 - Outcome Display Name
 - Outcome Friendly Description (If FF is enabled)
 - Outcome Description

The modal is accessed by selecting the dropdown
menu in the outcome column header and selecting the
"Outcome Description" option

Test Plan:
 - Automatic: Test are sufficient and pass in Jenkins
 - Manual:
   - Enable Improved LMGB FF
   - Enable Outcome Friendly Description FF (in Site Admin)
   - Create an outcome with title, display name, friendly
     name, and friendly description
   - Create an outcome with a title, but no display name,
     friendly name, or friendly description
   - Navigate to Improved LMGB and open the description modal
   - Check that all information is rendered correctly
     according to the screenshots given in the JIRA ticket
   - Check that the empty outcome displays the default modal
     information with a working link to the Outcomes
     Management page for the course
   - Disable Outcome Friendly Description FF
   - Check that "Friendly Description" is not rendered in the
     outcome description modal

Change-Id: Ibf452c5da510211fe390e48e792c37f4c872b46b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326939
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
2023-09-19 17:30:42 +00:00
Chris Soto a1ebaa3012 fix csv import override score
fix bug where a user cannot import a gradebook with a override score
and the custom gradebook statuses feature disabled.

closes EVAL-3513
flag=custom_gradebook_statuses

test plan:
- make sure custom_gradebook_statuses is OFF
- go to a course with final grade override scores enabled and displayed
  in a gradebook.
- click on the Export button in the gradebook and export entire
  gradebook
- in the csv you should see the override score column. make a slight
  modification to the score and save the csv
- go back to the gradebook and click on the Import button
- Import the csv you just modified.
- Verify that you can now successfully import the csv

Change-Id: Ib4ff77df3b50dfb8aa7ad759daf65eb989968819
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328084
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-09-19 17:11:05 +00:00
Weston Dransfield cdda54352f Allow global_id include in Accounts show API
Closes QUIZ-12125
flag=none

Test Plan:
Exercise the accounts show endpoint with and without
the new "global_id" includes query param.

Validate the global_id is included in the response
body when the include query param includes it

Validate the global_id is not included in the
response body otherwise

Example requests:

With the global_id in the includes query param:
```
/api/v1/accounts/self?includes[]=global_id
```

Without the global_id in the includes query param:
```
/api/v1/accounts/self
```

Change-Id: I985409460dba228bedf95f63eb6e2e354e26fae4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327327
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jorge Arteaga <jorge.arteaga@instructure.com>
2023-09-19 14:18:05 +00:00
Sarah Gerard 2f2b79602a Open tray when clicking "View Assign To"
closes LF-647
flag=differentiated_modules

test plan:
- turn the flag on
- have a module with an assignment override:
  in a rails console, find a module and run
  context_module.assignment_overrides.create!
- go to that module's course's module page
- that module should have the 'View Assign To' link in
  the module header
- click the 'View Assign To' link
- expect the new differentiated modules tray to open
- should open with the 'Assign To' tab selected
- tray should behave the same as it currently does when accessing it
  via the the module menu

Change-Id: Ide2eb6427d40451a0c8cc77403c6b9f223b35777
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328090
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-19 14:14:14 +00:00
Robin Kuss c06e6f6b99 spec: add module edit tray settings tests
Closes LF-756

Test Plan: passes jenkins

Change-Id: Ie065d86a99dc6fb0e9df402193bae566f1efe673
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328019
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: Robin Kuss <rkuss@instructure.com>
2023-09-19 13:47:26 +00:00
Sarah Gerard 7e796411d5 Add "View Assign To" indicator
when a module has assignment overrides, show the "View
Assign To" link

closes LF-646
flag=differentiated_modules

test plan:
- turn on the flag
- in a rails console, find a module and create an assignment override
- context_module.assignment_overrides.create!
- go to that module's course's module page
- that module should have the 'View Assign To' link in
  the module header
- turn off the flag
- ensure the 'View Assign To' link is no longer there
- turn the flag back on
- in a rails console, delete the assignment override for that module
- the 'View Assign To' link should no longer be on the module

Change-Id: Ie41a0fa10f385851849876523720cfc56f4bad59
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327895
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-19 12:04:08 +00:00
Isaac Moore 1dd961fb47 Remove workflow_state from notifications
It appears this is unused, and we only have active notifications anyway.

refs AE-238
flag=none

test plan:
- specs pass

Change-Id: I15e13bc2bee595ade68a68debdf6469d6fc2e559
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327919
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2023-09-18 23:38:06 +00:00
Cody Cutrer b76e8e9f93 bundle update oauth2
fixes AE-516

as originally done in https://gerrit.instructure.com/c/canvas-lms/+/325872,
but setting auth_schema to request_body, and finding the OIDC id_token
in the token if it's only there, otherwise in the token params

Change-Id: I3ff97e151d2f03acdb96c0febcd2815cceab5497
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328039
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-09-18 21:36:19 +00:00
Jason Gillett a7cc48b9a8 Add sis import id to enrollment graphql Type
flag=none
closes VICE-3693

Test Plan
1. Verify that the sis_import_id is exposed correctly
1a. Should match Enrollment.sis_batch_id from rails console.

Change-Id: Ia1af62aaf1788c825809f9a0234800ee846dd3e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327989
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2023-09-18 20:11:19 +00:00
Caleb Guanzon eb7d9af875 make isAnonymousAuthor creation work e2e
flag=react_discussions_post
flag=discussion_create
fixes VICE-3749

test plan:
- must have both feature flags turned on

- as a teacher, create a partially anonymous discussion
- verify you successfully create a partially anonymous discussion
and the topic post shows your real name

- as a student, when creating a partially anonymous discussion,
leave the "replying as" to the default setting (which is anonymous)
- save and publish
- verify you successfully create a partially anonymous discussion
and the topic post shows you as anonymous

- as a student, when creating a partially anonymous discussion,
change the "replying as" to your real name
- save and publish
- verify you successfully create a partially anonymous discussion
and the topic post shows your real name

Change-Id: Ie339e38ed32f2d89a353bd0b9907e318c53d098d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328003
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-09-18 20:06:22 +00:00
juan.chavez 3332d2bfcd Add validations for the Create Calendar Events modal
closes LF-691

flag=none

test plan:
- Open the calendar view.
- Open the modal for create an event.
> Verify that the submit button is disabled until
user inputs a text.
- Clear the title field.
> Verify that you can't submit and red border/messages
appear in the field.
- Enter a text in title field.
> Verify that when clearing the date input, it is
auto-filled by the current date.
> Verify that when putting a invalid text in date input,
you can't submit and red border/messages appear in the field.
- Fill title and date fields with valid values.
- Click Submit.
> Verify that you can submit now.

Note: This should work when editing too. You can also
test title or date independently. When date is invalid
the frequency picker will use the current date.

Change-Id: I539aecfbc6e929b0a5814a5e2baa5ed0430f4fb2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326871
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: Juan Chavez <juan.chavez@instructure.com>
2023-09-18 19:28:52 +00:00
Omar Gerardo Soto-Fortuño 47c9393c48 Persist available from and until on Discussion Create
closes VICE-3745
flag=discussion_create

test plan:
  - Specs pass.
  - Go to the Discussion Create page.
  - Set values for the fields available from
      and until.
  - Click on Save & Publish or save.
  - It should persist correctly.

qa risk: low

Change-Id: I9f97007c410418a12315a7bf5126cd1b61bd05ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327999
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: Jason Gillett <jason.gillett@instructure.com>
2023-09-18 16:49:53 +00:00
Xander Moffatt 4ceee54b0a fix: mark precreated upload attachments available
why:
* pre-creating the attachments before inst-fs
upload keeps them in the "deleted" state
* other code paths including submitting or non-instfs eventually mark
the attachments as "available"
* this one was overlooked and did not, making the file download broken

closes INTEROP-8230
flag=ags_scores_multiple_files

test plan:
* enable the ags_scores_multiple_files flag
* set up inst-fs for your local canvas, following
the inst-fs README
* with an LTI 1.3 tool present in a course
* create an assignment associated with the tool
* follow the instructions in doc/lti_manual/11_testing.md to make an AGS
call to the Score API
  * the test tool UI for the assignment now allows for AGS calls
  * or you can use an HTTP client of your choice
* the body for the Score call should look like:
```
{
	"userId":"2", // replace this
	"timestamp":"2023-08-18T17:03:21Z",
	"activityProgress": "Completed",
	"gradingProgress": "FullyGraded",
	"scoreGiven": 5,
	"scoreMaximum": 5,
"https://canvas.instructure.com/lti/submission": {
		"content_items": [
      {
        "type": "file",
        "url": "https://example-files.online-
        convert.com/document/txt/example.txt",
        "title": "File the first",
        "media_type": "application/pdf"
      },
			{
        "type": "file",
        "url": "https://example-files.online-
        convert.com/document/txt/example.txt",
        "title": "File the second",
        "media_type": "application/pdf"
      }
    ]
	}
}
```
* Go to the assignment and to speedgrader
* click the Download button by each file
* the file should successfully download

Change-Id: I6d2c918fcf35eabe251e3664e1ab96838cd5900c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326964
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-09-15 18:07:31 +00:00
Cody Cutrer 9f04827d0e optimize AccessToken#used! for high concurrency
also, further reduce cross-region roundtrips

fixes AE-520

Change-Id: Icb6eda336b4407ea35e67794869a50916f406538
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327897
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: Cody Cutrer <cody@instructure.com>
2023-09-15 17:12:44 +00:00
Omar Gerardo Soto-Fortuño 0db12ffa97 Add delayed_post_at and lock_at to CreateDiscussionTopic mutation
refs VICE-3745
flag=discussion_create

test plan:
  - Specs pass.

qa risk: low

Change-Id: I4cebb30c260030c6a0c3d05dde0fd3eeeed0b1cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327838
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-09-15 14:21:42 +00:00
Steve McGee a4a2ec0beb provide for better error message on JSON.parse
why: when client credentials is attempting to decode a jwt and the body
that has been returned is not JSON (ie. html) we were just returning
the same error as if the jwt signature was bad which was not helpful.

fixes INTEROP-8220
flag=none

test plan:
there has been a change pushed since this ticket started that causes a
return of "JWT signature invalid" instead of the html we were getting
but that is still not quite right, so these steps will show the old,
current, and new output.

- Make sure your 1.3 dev key uses a public jwk url instead of a
  public jwk (http://lti13testtool.docker/credential_id/1/public_jwk).
- In the test tool run `dcr web rake jwt:access_token CLIENT_ID=<YOUR_DEV_KEY>`
  Current master branch should error with 400 and "JWS signature invalid".
- If you remove the `JSON::ParserError` from the rescue on
  asymmetric_client_credentials_provider.rb:72, it will return an HTML
  error page (as shown in this ticket).
- When you cherry-pick this current change it will error with 400 and
  "Invalid JSON" which is the true error.

Change-Id: I940e21e9e596f59736c99d972d0a7868715dad11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327388
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-09-14 22:36:34 +00:00
wilmercorrales 0a204d75ce Remove outcome from associated course
closes OUT-5896
flag=none

test plan:
- test are suficcient and pass in Jenkins

Change-Id: I65ed18d8b4cc3b3f45de5fecb7ff917696166de6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327695
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-09-14 21:27:08 +00:00
Jacob DeWar e69f04c14d Add aria-expanded to info button when previewing file
fixes LF-732
flag=none

Test Plan:
-Go to files, preview media
-Verify Info button has aria-expanded false
-Open info button (mouse, keyboard, screenreader)
-Verify Info button has aria-expanded true

Change-Id: I0d283192acaf96dc8da3ffa65d26fa1c3dbd6177
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327821
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-09-14 19:52:02 +00:00
Caleb Guanzon 50f6332097 fix bug with teachers and allow_student_anonymous
flag=react_discussions_post
flag=discussion_create
refs VICE-3749

previous commit missed a not sign
this commit fixes it
along with adding a sad path
and a happy path test

test plan:
- bundle exec rails c
- get a course
- @course.allow_student_anonymous_discussion_topics = false
- @course.save!

- as a teacher, verify that you can create an
anonymous discussion in the new discussion create page

- as a student, verify that you do not see anonymous
options on discussion create,
and you cannot create an anonymous discussion via graphql
(feel free to not test this as the spec does this)

Change-Id: Iecc74b2dfc32d67dd794d2c59ff50c7b4368cb0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327790
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-09-14 19:07:52 +00:00
Drake Harper dd47435475 Use legacy submission comment tray
closes VICE-3747
flag=student_grade_summary_upgrade

Test Plan:
- turn on update student grade summary ff
- create a submission comment
- go to student grade summary page
- submission comment tray on student grade summary
   page matches legacy

Change-Id: I610cf77e0d127b6c973511a80eb80f99192033b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327139
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2023-09-14 18:56:16 +00:00
Aaron Shafovaloff 448f1eebef Upgrade Canvas to InstUI version 8 (frd)
Refs FOO-3190
Refs FOO-3708
flag=none
[fsc-max-nodes=30] [fsc-timeout=60]
[pin-commit-multiple_root_accounts=03b5f961bbaa28af3d43b0a6a2ab072654cc6468]

Uprevs InstUI and addresses all post-uprev tasks. Also now that
InstUI is fully TypeScript, a bunch of type errors appeared
which needed to be addressed.

NOTE:

This is an amalgam of g/314136 and g/326557 which will get abandoned
once this passes Jenkins and is merged.

It builds against the commit of MRA that will have to merge
concurrently with this.

Still to do: theme -> themeOverride which is a separate commit
off of this one that is ready to go.

Test plan:
* cross your fingers
* (this will need some extensive review before merging)

Change-Id: I860c3dc04d34237e32aeaa138f6c377a016ceeae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-14 14:34:45 +00:00
Weston Dransfield 3360e060d9 Allow global_id include in Courses show API
Closes QUIZ-12124
flag=none

Test Plan:
- Make a request to fetch an active course without the
  global_id include:
  ```
  /api/v1/courses/:id/?include[]=lti_context_id
  ```
- Validate the response does not include a global_id
  field
- Make a request to fetch an active course with the
  global_id included:
  ```
  /api/v1/courses/:id/include[]=global_id
  ```
- Validate global_id of the course is included in the
  new global_id property of the response body

Change-Id: Ica8bfc830c52b3515821d5eb3820d83eb1fc93a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327316
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2023-09-14 13:35:41 +00:00
Martin Yosifov c068430774 Fix new quiz with items not unique id issue
closes OUT-5895
flag=outcome_alignment_summary_with_new_quizzes

Test plan:
- Start Canvas, Outcomes-Service, Quiz LTI and Quiz API
- Create course with course outcome and add account outcome
- Enable "New Quizzes included on Outcome Alignment Summary Tab FF"
- Create new quiz, add quiz item and align course outcome to both
the quiz item and the quiz
- Create item bank with bank item, align account outcome to bank
item and add the item bank to the new quiz
- Click on Alignment Summary tab and verify that course outcome
displays Alignments: 2 and account outcome Alignments: 1
- Expand description of account outcome and verify that it
displays the alignment to the bank item
- Expand description of course outcome and verify that it
displays the alignment to the quiz item

Change-Id: Iec246d88dc21fd55b051f0c43c3c9816e92cb5f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327646
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Dave Wenzlick <david.wenzlick@instructure.com>
QA-Review: Dave Wenzlick <david.wenzlick@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-09-13 23:04:32 +00:00
Caleb Guanzon 892f18609f make anonymous discussion creation work
refs VICE-3749
flag=react_discussions_post
flag=discussion_create

IN FOLLOW_UP COMMITS:
- add is_author_anonymous e2e functionality
- add e2e tests

NOTE:
- i found that we returned a 500 when creating a discussion
in a group context instead of 400 in our REST API
this commit fixes that issue (see new controller tests)
- i also deleted redundant env vars

TEST PLAN:
- turn on discussion_create and react_discussions_post
feature flags
- as a teacher create a fully anonymous discussion
- verify it saves and works as fully anonymous

- now, create a partially anonymous discussion
- verify it saves and works as partially anonymous

- create a non-anonymous discussion
- verify it saves and works as a non-anonymous discussion

LEGACY TEST PLAN:
- use rest api to test what is in the controller tests
or just code review the controller tests

Change-Id: Ida859c47c0c0d862f008278f56fb3f381ca7824d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327459
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-09-13 22:38:40 +00:00
Chrystal Langston 966c194e50 Fix default calculation method for new decaying average
When the new decaying average FF and Account Mastery scales is
enabled, the default calculation method was being stored as
weighted_average. This is incorrect and should be saved as
standard_decaying_average.

closes OUT-5897
flag=outcomes_new_decaying_average_calculation

test plan:
- tests pass in Jenkins

Change-Id: I172e320b95d462fafba943313fac17f2261a03c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327650
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Anderson <jason.anderson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-09-13 19:18:01 +00:00
Evan Battaglia ef153f9c14 Hack around rails routing "constraints" deficiency
closes INTEROP-6659
flag=none

As detailed in https://github.com/rails/rails/issues/43466, the default
behavior for parameters in a route path is:
1. disallow dots, slashes, and question marks when parsing the request
  URL, so that we don't greedily include these characters (particularly
  slashes) in the parameter:
  - example: we don't want "/courses/123/enrollments" to be matched by
    route "/courses/:course_id" (with "123/enrollments" being
    picked up as course_id); it will only be matched by
    "/courses/:course_id/enrollments")
  - example: if the request URL "/courses/123.txt/enrollments", the
    parsing stops at the "." character, so course_id will be 123 and
    rails will parse "txt" as the "format"
2. no constraints are enforced when constructing a path/url with a helper.
  The helper will escape these special characters in the parameter
  - example: courses_path(course_id: "a/b") will be "/courses/a%2Fb"

In our API routes we want to allow dots in the parameter, so
we use the "constraints" option when creating a route. This lets us
override that default regex (the one which disallows dots, slashes, and
question marks) with one that just disallows slashes and question marks.
Using "constraints" has the following effects:
1. rails uses the regex given to parse the request URL.
  - example: we use a regex (ID_REGEX) conceptually similar to just
    "[^/?]+" (it also disallows ids ending in '.json', but that's
    irrelevant) so a route "/courses/:course_id" would:
      - match "/course/123.txt" with "123.txt" being the course_id
      - would not match "/course/123/foo" (would not greedily get
        "123/foo" as course_id)
2. however, using constraints also has the unwanted effect of erroring
   whenever we try to use a rails helper to construct the routing with a
   rails helper.
  - example: courses_path(course_id: "a/b") now errors, saying "a/b"
    does not meet our constraints regex. We want it to return
    "/courses/a%2Fb", as this is a working path with "a/b" as the
    course_id.

As detailed in [this comment](https://github.com/rails/rails/issues/43466#issuecomment-1694140836),
`constraints` is used in two places, corresponding to the effects listed
in (1) and (2) above. This commit overrides the `requirements` method,
buried deep in an ActionDispatch (rails routing) object hierarchy, to
disable effect 2 (the checking of constraints when constructing paths
using helpers). The request URL parsing (effect 1) is unaffected.

The usage of the `constraints` for the two effects can be seen in
actionpack-7.0.7.2/lib/action_dispatch/routing/route_set.rb:163:

  ast.requirements = @requirements
  @path = Journey::Path::Pattern.new(ast, @requirements, JOINED_SEPARATORS, @anchor)

In this commit I am effectively removing our ID_REGEX constraint from
the @requirements passed in to Journey::Path::Pattern.new().

I explored some other avenues such as modifying the route immediately
after creating it with the ID_REGEX constraint in `route()`, but the
call to super() doesn't return the latest route, so to get at the route
I have to do something like `instance_variable_get(:@set).routes.last`

Test plan:
- check enrollments API endpoint works when given a SIS ID with an
  (escaped) slash. You can also try question marks (escaped) and dots
  (unescaped). Example (sis_course_id "a/b?c.d"):
    /api/v1/courses/sis_course_id:a%2Fb%3Fc.d/enrollments
- check another endpoint where id is the last path prefix -- that it
  parses correctly the escaped slash, and you can generate a url with a
  slash
  - for parsing, you can check the above URL minus "/enrollments"
  - for generating: from a rails console, you can use something like
      Rails.application.routes.url_helpers
        .api_v1_audit_course_for_course_path \
        course_id: "sis_course_id:#{Course.last.sis_source_id}"
    You can also go to the returns URL to make sure it works

Change-Id: Ifaade757636065a43d078067f4ff04bd25dde383
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326718
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-13 18:56:21 +00:00
Jason Gillett 75d5900d20 Allow requireInitialPost to be set
flag=discussion_create
closes VICE-3751

Test Plan
1. Create a new discussion topic with the
1a "must respond before viewing other reply" option
2. Verify that the newly created discussion topic respects the option

Note, editing the newly created topic won't accurately show this setting

Change-Id: I64a76352b5ec04faf14c35a97e2c860dc326776b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327487
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2023-09-13 15:44:36 +00:00
Cody Cutrer c32ccde352 bundle update rubocop
and apply Rails/SelectMap and Rails/RedundantActiveRecordAllMethod

the offenses in User were manually fixed to maintain sharding
correctness

[skip-stages=Flakey]
[skip-crystalball]

Change-Id: I96f877ee8474655bd62a149f3aa54b312d38a5e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327334
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-09-13 13:31:05 +00:00
August Thornton 1966a6eec0 Add ability for SIS Import to support temporary enrollments
closes FOO-3326
flag=temporary_enrollments

test plan:
- create an enrollments sis csv file with a temporary enrollment
- import the file and process the data (ensure jobs are running)
- verify that the enrollment is created with the correct
  temporary_enrollment value

Change-Id: I8fbbd4860394f5a96989fb5d0136175e4aa47795
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327516
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2023-09-12 23:51:09 +00:00
rohan.chugh 38c543916e make points based assignments use 1 decimal
fix a bug for points-based assignments where they were being rounded
incorrectly due to score_to_grade giving a score with 2 decimal
points of precision when only one should be supported for points
based grading. now the score_to_grade method will incorporate the
points-based grading scheme's scaling factor when calculating the
raw score out of 100 so that it stays at 1 decimal place of precision
when being converted to points.

closes EVAL-3318

flag=points_based_grading_schemes

test plan:
- enable points based grading schemes
- create a course to use a points based grading scheme that
  uses whole numbers. the default one works well
- create an assignment that uses letter grade for the grading type
  and choose the same points scheme, and set the assignment points
  to the highest number of points allowed in the scheme
  (4 if using default scheme)
- grade the assignment with a letter using the drop down in the
  traditional gradebook, leaving all other assignments
  ungraded
- look at the assignments subtotal and the total grade text
- verify that for the numerical grade, it shows 0.1 less than
  the next higher scheme's lower bound (i.e. if you chose a
  B, it should show 2.9)
- verify that it does this for all of the values B, C, and D, and
  for A it gives them a 4 or the highest points possible
- go to the student grades page and verify that the total grade
  is the same as the total grade in the traditional gradebook

Change-Id: I6577eecbc3e0135c86302afc8edde039f6444ff6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325518
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-09-12 19:36:58 +00:00
Jackson Howe 280e5a0d6d Create ModuleAssignmentOverrides#index
List overrides that apply to a module, including the ids and names of
students/sections that are targeted by the override.

closes LF-651
flag = differentiated_modules

Test plan:
 - In a course, create a module
 - Create some assignment overrides for the module targeting both
   sections and students (see
   module_assignment_overrides_controller_spec lines 29-34)
 - GET
   /api/v1/courses/:course_id/modules/:module_id/assignment_overrides
 - Expect a list of overrides with section/student names and IDs
 - Make the request as a student
 - Expect unauthorized
 - Make a request with bad course or module IDs
 - Expect 404
 - Disable the flag and make the request
 - Expect 404

Change-Id: Ifdc812812734dcf58c573775cbb92ad21e4131c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327379
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-09-12 18:54:40 +00:00
Samuel Lee df97f48229 disable grade input when assignment in closed gp
disable grade input in the enhanced individual gradebook when an
assignment is in a closed grading period

closes EVAL-3361
flag=enhanced_individual_gradebook

test plan:
- create a grading period set with one grading period that is in the
  past and one that is currently active
- have two assignments with one due date lying in the past grading
  period and one lying inside the active grading period
- as a teacher, not administrator, go the individual enhanced gradebook
  and select the assignment that is in the past grading period
- verify that the main grade input is disabled, the submission details
  grade input and button are disabled
- verify that in the assignment information section, the default grade
  and curve grade buttons are disabled and have a message associated
  with each
- change the assignment to be in the active grading period and see that
  the buttons and inputs are all enabled
- as an administrator, or root account, verify that regardless if the
  assignment is in the past or active grading period, the buttons and
  inputs are all enabled

Change-Id: I6a9257979d0af0b04d888e4215fc25291b712b30
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325708
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Rohan Chugh <rohan.chugh@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-09-12 17:33:37 +00:00
Samuel Lee 28929d9a45 fix concluded observers unable to view grades
fix where observers with concluded enrollments are unable to view
grades of linked students who are also concluded

closes EVAL-3319
flag=none

test plan:
- have a course with an enrolled student and an observer linked to that
  student
- conclude the enrollment for both the observer and the student
- go to Prior Enrollments and act as the observer
- go to the grades page and see that it does not give the unauthorized
  error and instead shows the grades page for the student

Change-Id: If6bd9e250f2bb02f4d1449f65803bd6a2e1f40ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325927
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jackson Huang <jackson.huang@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2023-09-12 16:37:37 +00:00
Jason Gillett 6cb3a53bf5 Display course settings page correctly when RQD is on
flag=restrict_quantitative_data
fixes VICE-3776

Test Plan
1. go to course settings and turn on RQD
2. Refresh the page
3. Verify that each course settings tab appears correctly

Change-Id: I588a3c9b6536b9d45ef32ede0b6ba81c20730571
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327455
Reviewed-by: Caleb Guanzon <cguanzon@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-09-12 16:17:22 +00:00
Aaron Shafovaloff 29ad03c5fe Harden SpeedGrader with TypeScript
Test plan:
  - Build passes

flag=none

Change-Id: Ic3ad7b7d27659741197e37169158ff4806a1dbeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327246
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-12 16:07:52 +00:00
Sarah Gerard 93579d0628 Add "Course" set_type to assignment overrides
closes LF-666
flag=none

test plan:
- in a rails console, find an assignment
- ensure that when the set_type is "Course", unassign_item
  cannot be true
- run assignment.assignment_overrides.
  create!(set: assignment.context, unassign_item: "true")
- the override should fail to create
- ensure that the "Course" set_type can otherwise be created
- assignment.assignment_overrides.create!(set: assignment.context)

Change-Id: Ica363c4ee387bc383d61ab882d6bd5ac7e26d4bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327131
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-12 15:44:33 +00:00
Matheus ff00a37ff3 Support recurring calendar events in course migrations
fixes LF-720
flag=none

Test Plan:
- Create several recurring course calendar events
- Export the course and import it into another
- Check that the recurring events made it correctly
  to the destination course
- Try the same with Blueprint Syncs and Course copies
- Ensure the recurring events are properly linked in
  their destinations

Change-Id: I16297906bcabc7c23620f6cf4467baecb37f9615
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327058
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-09-12 13:59:52 +00:00
Martin Yosifov 44dcc1ed30 Add Pagination Support for Alignment Summary calls to OS API
closes OUT-5873
flag=outcome_alignment_summary_with_new_quizzes

Test plan:
- Start Canvas, Outcomes-Service, Quiz LTI and Quiz API
- Create course and enable "New Quizzes included on
Outcome Alignment Summary Tab FF"
- Add or Create at least 26 outcomes in the course
- Create new quiz and align all outcomes to the quiz
- Select Alignment Summary Tab and verify that that it
displays all aligned outcomes (scroll down until all
outcomes are loaded)
- Expand the outcome description of random set of aligned
outcomes and verify that it displays the new quiz alignment
- Filter outcomes "With Alignments", search for outcomes,
expand the descriptions of a random set of outcomes returned
from search and verify that it displays the new quiz alignment

Note: OS API returns up to 25 results per page; that's why
we need 26 outcomes to verify that AS supports pagination

Change-Id: I80d8bb5c173eae0be986b4aae1d82aa056775b04
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326973
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-09-11 18:07:59 +00:00
Jared Crystal ae086f61d2 backfill NQ tool configs with anonymous_grading variable
closes QUIZ-12096
flag = none

test plan:
 - existing NQ tools receive the anonymous_grading field in the config

Change-Id: I9cdaa81d28cfe27ce81245732a08864404216e61
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327048
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Jared Crystal <jcrystal@instructure.com>
2023-09-11 17:09:42 +00:00
Drake Harper 028a3289df Add custom status name to submission type
refs VICE-3777
flag=student_grade_summary_upgrade

Test Plan:
- create a custom status
- assign a submission to the new status
- query the submission in gql with the customGradeStatus field
> should show name of custom status

Sample Query:
query MyQuery {
  legacyNode(_id: "1019", type: Course) {
    ... on Course {
      id
      name
      _id
      assignmentsConnection {
        nodes {
          _id
          name
          submissionsConnection {
            nodes {
              _id
              id
              customGradeStatus
            }
          }
        }
      }
    }
  }
}

Change-Id: I4658a23aa666b57e376e8957ac65426034c15672
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327273
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2023-09-11 16:22:45 +00:00
Cody Cutrer 12a2c3784f bundle update rubocop-rspec
[skip-stages=Flakey]
[skip-crystalball]

and apply updated copys (RSpec/Eq and RSpec/MetadataStyle, and one
instance that the split RSpec/SpecFilePathSuffix caught)

Change-Id: I3872458f35b791f1ce3f8108a2aaf4fff2cfd612
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327204
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-09-11 15:59:30 +00:00
Jason Gillett 9a351454a3 Default to plain text if incoming html is too long
There are cases where an incoming reply to a canvas message
has html that is too long when the plain text content is not too long.

Submission and inbox messages do NOT use the HTML at all
Discussion entry replies can use it, but if it is nil, then it defaults to
use the plaintext over the html.

example in discussion entry reply_from
    if opts[:html]
      message = opts[:html].strip
    else
      message = opts[:text].strip
      message = format_message(message).first
    end

This should allow our users to send messages even if they have an
email signature that contains lots of html

refs VICE-3773
flag=none

Test Plan
1. Verify specs
2. Once deployed to an environment with email setup do:
2a. Send a message that contains html that is longer than 64kb
2b verify the message sent in canvas but only with plaintext contents

Change-Id: If1d90e8e63c9d333f005827839b5d2aaa0a1d4cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327236
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-09-11 15:42:10 +00:00
Chawn Neal c42517b74a Increase discussion per_page and fix pagination
flag=none
fixes VICE-3690

Test Plan:
- Create a course.
- Create 1000 discussion topics for it.
- go to the discussion topics index.
-- look at the network request.
-- you should see 10.
in a request it will have 100.

Notes:
- increase discussion per page from 50 to 100.
- now per page propogates on BE and FE.

Change-Id: Ib018a9b0652839f2b7a7dc93a48b015852185b28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327189
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-11 15:35:59 +00:00
Jackson Howe ed313fcaf9 Compare IDs properly for account contexts in planner
In the planner, we test if a user has access to an account context
by getting a list of the account IDs they're requesting and a list of
account calendar IDs they have access to. If an account ID appears
in the first but not the second, we run additional permission checks
(which most non-admin users won't pass). However, the IDs that the
user passes are transposed into local or global IDs relative to the
user's shard, while the account calendar IDs were previously relative
to the domain root account. Thus, if a user was requesting access
to a calendar on a different shard than the domain root account (but
also on the same shard as the user themself), we'd be comparing
local to global IDs and the check would fail. This commit transposes
the enabled account calendar IDs to be relative to the user's shard
to enable proper comparison of IDs.

flag = none
closes LF-570

Test plan:
 (Requires trust setup)
 - Enable the root account calendar on shard A
 - Enroll a shard A user in a course on shard A and in a course on
   shard B
 - Visit the calendar as that user on shard B's domain
 - Subscribe to shard's A root account calendar
 - Expect no errors (specifically, the planner items request should
   return a 2xx response)

Change-Id: I2fb572e342633805fa0d017041eb5f032f247eef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327180
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-09-08 20:17:06 +00:00
Jonathan Featherstone 169de2e776 Add initial smart search implementation
still very much a prototype

test plan:
 - install pgvector extension
   (i.e. `brew install pgvector` or your operating system's
    package manager)
 - run db migrations and verify the "vector" extension
   gets enabled
 - set up OpenAI API key via `bin/rails credentials:edit`
   and add
    smart_search:
      openai_api_token: <...>
 - enable the smart_search feature flag in an account
 - in a course under that account, create some wiki pages
   with nontrivial content
 - as a user who can see those pages, using the magnifying
   glass that appears in the global nav, search for things
   (by ideas and concepts rather than just keywords)
 - it should find results

limitations:
 - lots, please refer to the ADV-22 epic for next steps

flag=smart_search
closes ADV-21

Change-Id: I4a6cf4bc98cb144707df156baf143c3f9b70acdf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325880
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2023-09-08 18:52:53 +00:00
Aaron Shafovaloff b8b77a2638 Prepare for InstUI 8 upgrade
refs FOO-3190

flag=none

Test plan:
  build passes

Change-Id: I565239c71d769a3b8359221422a972780306c04c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327200
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-09-08 15:56:48 +00:00
Samuel Lee 6cb51e912c add pagination and search bar to peer review page
add pagination and search bar to peer review page in the teacher view
in order to fix page timeout when there are many peer reviews

closes EVAL-2762
flag=none

test plan:
- have a course with over 10 students and a peer review assignment
- as the teacher go to the assignment peer review page
- see that there are only 10 students on each page and the pagination
  works
- use the search bar and enter search keywords
- see that page displays names relevant to the search keyword

Change-Id: Iaf6e2c81b8699fb4291b1ac6713b3004bc278f80
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326958
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-09-08 13:28:41 +00:00
Cody Cutrer 2039924c66 use helper methods for check constraints on old migrations
not that we really need to change, but it serves as an example for future
migrations

Change-Id: Ie1a1975311c81b0c145c17af46e57e604a01eca5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327026
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2023-09-07 23:01:00 +00:00
Isaac Moore 188863119f Read pandata secrets from Vault
refs AE-76
flag=none

test plan:
- secrets are read from Vault
- URL is read from Consul

Change-Id: Ie8fc4da260a36cab6446fcc15ab951a18df1c106
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326917
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2023-09-07 21:07:31 +00:00
Jason Gillett c540daa56c Set LiveEvent context for graphql
flag=react_discussions_post
closes VICE-3706

Test Plan
1. Create a new discussion Entry
2. Verify that the discussion_entry_created event contains context info
2a. IF you don't want to set up liveEvents to QA:
2b. You can put a byebug on post_event in live_events.rb
2c. create a new discussion entry on react discussions
2d. Verify that the materialized_context contains the course context


Change-Id: I41c5170d3a75a1c93641e0dd027bdddba44b2d48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327017
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-07 15:52:30 +00:00
August Thornton 0d69d6f422 add account user search filtering for temporary enrollments
This change adds the ability to filter the user search results by
temporary enrollment recipients and providers, or both. Later we will
identify the temporary enrollments in the search results by adding a
temporary enrollment icon to the user list rows. This will come in the
form of a provider or recipient specific icon.

closes FOO-3327
flag=temporary_enrollments

test plan:
 • head on over to /accounts/self/users
 • with the temporary enrollments FF enabled, you should see new
   filter option checkboxes for temporary enrollments recipients and
   providers
 • in order for the temporary enrollments filters to work, you must
   also have some temporary enrollment recipients and providers to
   test with
 • the filtering will work in conjunction with the existing search
   filters, so you can filter by temporary enrollments and other
   filters at the same time
 • with the feature flag disabled, you shouldn't see the filter
   checkboxes for temporary enrollment recipients and providers

Change-Id: I1da0cda2a8968982a3401efaf9f5bd4122463830
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327057
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2023-09-06 22:33:52 +00:00
Mysti Lilla 83d23cf666 Fix selenium specs for syllabus edit button
fixes LF-731
flag=none

Test plan
- Specs pass

Change-Id: I5e0e5a2ddd0ae1703312d8ef9fb521717d7d6485
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327060
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2023-09-06 22:11:26 +00:00
Mysti Lilla 69c44d299e Ensure home page links with query params migrate
fixes LF-656
flag=none

Test plan
- Set up a course with a page (or other rich content)
- Using the link insertion tray, insert a link to the
  home page
- Copy the course
- Verify that the home page link you made points to
  the new course after the course copy
- If you want, you can also export the course and
  make sure that the link is a $CANVAS_COURSE_REFERENCE$
  token and not a regular URL

Change-Id: Iffa27ea35b37e44bc33276baecb739d68b15b998
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326795
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: Mysti Lilla <mysti@instructure.com>
2023-09-06 20:05:09 +00:00
Jackson Howe 0a43833574 Add context_module_id to assignment_override_students
flag = none
closes LF-650

Test plan:
 - Run the migration
 - In a rails console, find a module and run:
   `ao = context_module.assignment_overrides.create!
    ao.assignment_override_students.create!(user: <a student>,
    context_module: context_module)`
 - Expect an AssignmentOverrideStudent to be created with a
   reference to the module and the assignment override
 - In psql, run `\d assignment_override_students` and observe that
   the column is created along with the unique index and foreign key

Change-Id: I36d5d4250df09a67a2a27152bf6abc1c43d9f181
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326702
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2023-09-06 19:20:01 +00:00
Jackson Howe dc31f3d2f1 Add context_module_id to assignment_overrides
Also updates the check constraint to allow AssignmentOverride to
have an assignment, a quiz, or a module. Changes the original
migration which created this check constraint to a predeploy to
match this migration (so that the 2 migrations are run in
chronological order on fresh databases).

flag = none
closes LF-649

Test plan:
 - Run the migration
 - In a rails console, find a module and run:
   `context_module.assignment_overrides.create!`
 - Expect an AssignmentOverride to be created with a
   context_module_id pointing to the module
 - In psql, run `\d assignment_overrides` and observe that the
   column was created, the index was created, the foreign key
   exists, and the check constraint also checks for a
   context_module_id

Change-Id: I93195e28d082411ac43ed715f8eab5b42bd0094c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326620
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2023-09-06 19:19:55 +00:00
Jackson Howe 066e923ada Skip failing syllabus specs
created LF-731 to fix

Change-Id: I6f756f5f631f08f9fbd9d2d856ae9301e6805634
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327042
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-06 18:23:56 +00:00
Jacob Burroughs 02ade49370 Fix assorted attachment garbage collector bugs
Change-Id: Ia2cdaaf9159d19fb7827e4a59bc2327d393429d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327038
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-09-06 18:10:13 +00:00
Mysti Lilla 1de1c2dbff Change syllabus edit to button with aria-expanded
fixes LF-661
flag=none

Test plan
- Go to the syllabus page in a course
- Check the edit button and ensure it's actually
  a button (and is read as such in a screenreader)
- Verify it reads something ("collapsed" in Safari)
  to let you know the edit portion is not visible

Change-Id: I13236217018652bf807e135e984285a3236c8eb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326798
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: Daniel Sasaki <dsasaki@instructure.com>
2023-09-06 16:43:07 +00:00
Cody Cutrer 17b739ed86 use a distinct error message for too recent of successful login
refs AE-483

Change-Id: Icdc0c36a30e56f5d7fb6bdb4cff8460cf03beeec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326797
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-09-06 15:23:01 +00:00
Cody Cutrer 129ee390de fix federated attributes when email is provided, but it's empty
Change-Id: I6f6d3d6d1078a9c05ebf1ea0b4395ae96417884f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326700
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-09-06 15:22:12 +00:00
Ed Schiebel 3ebcb96a72 Update calendar series natural language to handle leap day
closes LF-721
flag=calendar_series

test plan:
  - click the + to create a new event
  - set the date to a leap day (e.g. Feb 29, 2024
  - open the frequency picker
  > expect to see "Annually on Feb 29"
  - click on custom  and save
  > expect to see "Annually on Feb 29, 5 times"
  - submit
  - when the api completes, click on one of the events
    you just created
  > expect the natural lang description to be correct
  - click on one of the events and edit
  - change the title and save
  > expect the title to change on all events
    (you can click on the month-year link at the top
    of the calendar and type in a month-year
    (eg. February 2028) to go there)

Change-Id: Ibd184e10597cf014ffa0ee877ae1911250330923
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327007
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-09-06 13:31:00 +00:00
Jackson Howe 1a96e8626e Remove account_calendars_planner_support flag
flag = none
closes LF-713

Test plan:
 (This is just regression testing the feature)
 - Set up some account calendar events in the next week
 - Go to the planner and make sure the events appear

Change-Id: Ida4d01ad72d4e0c67a55e6a67cc0ba6384d01464
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326918
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-09-05 21:04:58 +00:00
Jackson Howe ead77d28c7 Remove auto_subscribe_account_calendars flag
closes LF-714
flag = none

Test plan:
 (This is just regression testing the auto subscription feature)
 - Go to account calendar settings and make sure you can flip between
   manual and auto subscription type
 - Visit the calendar and expect to see events for auto subscribed
   calendars, even if the user hasn't previously subscribed

Change-Id: I4a1d7188b15c6722457c77c1347668003aabb6c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326785
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-09-05 21:04:21 +00:00
Jason Perry e4bf3c72a7 Handle duplicate lti_context_ids safely
Fixes FOO-3768
flag=none

Test Plan:
  * Have a cross-shard version of a existing user that still has the
    old lti_context_id. (see ticket for context)
  * The new user does not have an LTI context id, create one
  * If the existing user was deleted, it's lti_context_id is nullified
  * Otherwise, the new user gets a new randomize (not hashed global_id)
    LTI context ID.

Change-Id: Ibf5a35828051ace4101fe7bfade96f9085e39ab5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326878
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jason Perry <jason.perry@instructure.com>
Product-Review: Jason Perry <jason.perry@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-05 18:44:33 +00:00
jake.oeding ed4d54f869 skip autosave tests to save the postmerge builds
created another ticket (LF-716) to clean this up

Change-Id: I0a739ce2e1c08b67dbc551d33a15d58a5852537a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326934
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-09-05 18:09:09 +00:00
Robin Kuss af9a4ae7b0 add more calendar recurrent event tests
Closes LF-605

Test Plan: passes Jenkins

Change-Id: Icfadcbe84b81ff3c9bac899789f7117ac736ff8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326644
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2023-09-05 16:00:14 +00:00
Kai Bjorkman 249ae5937c identify dropped assignments in enhanced srgb
closes EVAL-3359
flag=enhanced_individual_gradebook

test plan:
    - create a course with a student and a teacher
    - create at least three assignments
    - put them in one assignment group
    - create rules to drop certain assignments(maybe try a couple
    different combos)
    - go to the traditional gradebook and grade some of those
    submissions and ensure some of the cells are labeled as dropped and
    note which assignments are dropped for that student
    - go to the enhanced srgb and ensure that the when selecting the
    same assignments and that student, that the grading results shows
    a message reading: 'This grade is currently dropped for this
    student.'
    - ensure when switching between student and assignments that the
    message is hidden and displayed appropriately

Change-Id: I686be76a1de96c45cdc1cbe46f646a4b2dc289d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-09-05 15:42:09 +00:00
Steve Kacsmark 2e4272aba1 Deprecate third part imports feature flag for now
flags = new_quizzes_third_party_imports

Test Plan:
  - Flag no longer appears.

Change-Id: I978c6872cd5f91b4b35e6cbf30b9f1a2e00b6d08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326456
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ferenc Marcsó <ferenc.marcso@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
2023-09-05 15:11:50 +00:00
Jason Gillett 6e3ce2f950 Add willPublish condition to announcement create page
If the delay posting at is in the future, the button should say 'save'
if the delay posting at is unchecked or in the past, the button should say 'publish;

fixes VICE-3704
flag=none

Test Plan
1. Create a delayed announcement
2. Verify that when you delay the announcement it changes the submit button from
2a publish to save
3. Edit the announcement
4. verify that on edit, the submit button says "save" if it is delayed
5. uncheck the delayed_post_at checkbox
6. verify that the submit button says "publish"

Change-Id: I224178247669becd392df538caabad6e0d69ea36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326455
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: Sam Garza <sam.garza@instructure.com>
2023-09-05 15:11:10 +00:00
Ed Schiebel 0c46439c18 Fix 3 recurring event bugs
These started out as 3 separate commits, but the fixes
were intertwined and keeping them separate and stacked
on one another was proving to be too much of a hassle.
It should all work after this.

closes LF-629 LF-634 LF-632
flag=calendar_series

LF-629 "Update calendar correctly when editing recurring events"

Fixing this uncovered the same bug in the monthly view,
but it was just less noticable.

test plan:
  - create a recurring event
  - in an of the calendar views
  - edit the title one of the events
  - save any of the this, all, following options
  > expect the events in the calendar to display the new title
  - edit the start time of an event, save all and following
  > expect the events in the calendar to show the start time
  - try editing other stuff and expect it to work too

  - edit an event in a series and shorten the series length
  - save All Events
  > expect the deleted events to be gone from the calendar
  > expect them to be gone from the mini calendar

  - change the title of 1 event and save "this event"
  > expect just the 1 event to be updated
  - change the title of the last event and save "this and following"
  > expect just the 1 event to be updated

LF-634 "Stop FrequencyPicker changing when date on new event changes"

The root cause was not using the local state value for rrule, but
keying off the event.

test plan for 634
  - in the calendar click on a date to create a new event
  - in the modal, change the frequency
  - then change the date
  > expect the freq picker to change to reflect the new day
    of the week
  > unless it's a custom freq, in which case it remains the same
  > this should work for weekly, monthly, and yearly frequencies

LF-632 "Update series events when changing calendars" test plan for
  - have a teacher with a published course
  - create an event series
  - pick an event in the middle and change its calendar.
    change just this event
  - click on that event again, edit, submit, and choose all following
  > expect all or all following events to reflect the new calendar
  - click on each event
  > expect the data in the popup to be correct
  - switch to a different view
  > expect the changes to the events to be reflected there too

Change-Id: Ie6ed678cf60922cd4660a3e75262b542d3e64a4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326203
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-04 23:16:07 +00:00
Ed Schiebel d49e4d267e Return all events when an update splits a series
Some updates cause a series to be split in 2. The existing code
neglected to return the updated front half when that happened.

closes LF-702
flag=calendar_series

test plan:
  - create a series of events
  - change the start time of one in the middls and update
    this and all following
  > expect the edited event and those after to have the correct
    description of the series
  > expect the other events before the edited one to have an
    updated description of the series

Change-Id: I374d43cd973704a6cedfbf47ac0a19a7b948b15a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326719
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-09-01 17:02:45 +00:00
Samuel Lee dddc22a439 refactor incomplete/complete select dropdown code
refactor the incomplete/complete select dropdown code into its own
component, which is associated with EVAL-3357

closes EVAL-3437
flag=individual_gradebook_enhancements

test plan:
1. the tests pass in GradingResults.test.tsx file
2. the grading functions work as intended
  - incomplete/complete dropdown grading for the submission details
    modal and main grade input
  - the text input grading for the submission details modal and main
    grade input

Change-Id: I35861e2d487c0c6b0bf08898773f75df0ad67d70
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Jackson Huang <jackson.huang@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-09-01 16:20:06 +00:00
Jeremy Stanley 2da36abe93 don't treat form data as sis import
test plan:
 - do a sis import using form data to provide AP  parameters
   but omit `attachment`
 - you should get a 400 error with a "missing parameter" message
   rather than an unsuccessful sis import that tried to
   interpret the form itself as a sis batch

flag=none
closes FOO-3738

Change-Id: Ida7bc6e2bbde9e8db42965b94eda14cc00f900f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326466
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-08-31 20:28:28 +00:00
Jackson Howe 8cde5cdbba Support search_term param on sections list api
closes LF-644
flag = none

Test plan:
 - Create/find a course with a few sections
 - GET /api/v1/courses/:course_id/sections
 - Expect to see all the sections
 - Add ?search_term=<term> param
 - Expect to see only sections whose name matches the term

Change-Id: I9598666bab193f277ab3c82236f471f58b7449ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326601
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-08-31 19:59:25 +00:00
Robin Kuss 2121560c8a spec: add initial selective release tray tests
This is a starting point for selective module release tests.

There are already a lot of module selectors available.  I'm
creating new ones where it makes sense and using the old ones
if they are already available in the interest of re-use and time.

Closes LF-703

Test Plan: passes jenkins

Change-Id: I239382f5af6d5493a19c9f74b991a21c2a2a2ec9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326669
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-31 18:02:34 +00:00
Mysti Lilla 50351871d6 Remove verifiers from course files preview
fixes LF-614
flag=none

Test plan
- It's probably best to have a file previewer
  set up in your Canvas to test this.
  Not sure how to do it without. There's a dev
  preview server you can use.  Let me know.

- In a course, upload a pdf or docx documet
- In a user's files, upload a pdf or docx document
- Somewhere in rich content in the course link
  both documents
- Verify that with the default preview style
  (Preview in overlay) you can see the document
  preview for both the user file and the course
  file
- Verify that as the course file, the download
  link does not give you the file verifier

- You might also want to verify that the other
  style of preview (Preview inline) is working
  similarly

Change-Id: I0bb667f554af314d0ecc2d33190cd8ec277e17c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326102
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-08-31 16:06:37 +00:00
Chris Soto effcffdf15 add override status to process_bulk_update
this commit adds the ability to save override statuses to the
process_bulk_update method used by the gradebook import process.

closes EVAL-3442
flag=custom_gradebook_statuses

test plan:
- setup a course with final grade overrides, a couple custom grade
  statuses, and assign a final grade override to a student
- using a tool like Postman, make a PUT request to endpoint:
  http://canvas.docker/api/v1/courses/<id>/update_final_grade_overrides
  - You need to include the "Cookie" and "X-Csrf-Token" headers to the
    request. You can find these from existing canvas api request in the
    browser's network tab.
- add the following payload substituting the custom grade status and
  student id with valid ids
  {
    "override_scores": [
      {
          "override_status_id": <id as string>,
          "student_id": <id as string>
      }
    ]
  }
- verify in the gradebook grid that the override status color is set in
  the grid for the student's override grade cell
- add the following payload to test changing the override status and
  override score
  {
    "override_scores": [
      {
          "override_score": 100,
          "override_status_id": <different id as string>,
          "student_id": <id as string>
      }
    ]
  }
- verify in the gradebook grid that the override status color is set in
  the grid for the student's override grade cell and the override score
  is set to 100

Change-Id: Ifa8413f4e7df689e2b8ffd6771d5dba53b22d7c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326554
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Rohan Chugh <rohan.chugh@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-30 22:36:05 +00:00
rohan.chugh b2dbfa076b add custom statuses to gradebook imports - FE 1/2
allows the front end importer to recognize that there are
custom statuses for overrides that have changed from the current
import, showing which rows/columns changed. this is part 1/2, as
the next commit will add the last part which is saving those changes

closes EVAL-3441

flag=custom_gradebook_statuses

test plan:
- CANNOT BE QA'd UNTIL g/326378 IS MERGED
- go to a course with grading periods and for the gradebook filter,
  select "All Grading Periods"
- add a custom status to a final grade override using the tray
- export the entire gradebook
- open a CSV editor and change the custom status you added to
  something else and add another status for another student
    - MAKE SURE THAT BOTH STUDENTS WHO WERE CHANGED ARE USERS WITH
      LOGINS (otherwise they are not gradable students and the importer
      does not recognize them)
- use the importer to import the CSV you just edited
- it should recognize the changes and show the columns and rows
  that changed
- now do the same but for a single grading period, using the option
  to export the current gradebook view instead of entire gradebook
- it should recognize the changes and show the columns and rows
  that changed
- note: "applying" the changes or saving them will not work until
  the next commit is merged

Change-Id: I081b05d63ac0a75d08ae23acb79388fcbf58ca4b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326452
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-30 22:35:39 +00:00
rohan.chugh 685406a1df add custom statuses saving on imports - FE 2/2
added save functionality to the custom statuses on the import
gradebook. this formats the body to be sent to the bulk update api
for final grade overrides, which is being implemented in a separate
ticket.

closes EVAL-3447

flag=custom_gradebook_statuses

test plan:
- wait for other dependent commits to be merged or cherry pick them
  into this commit to fully test feature
- export a gradebook with a custom status on a final grade override
- change that custom status in the csv file to another valid
  custom status
- import that gradebook csv
- the changes should be highlighted (from another commit) and
  the custom status should be updated to the new value
- press save and view the network request that is sent to the update
  final grades endpoint
- it should include the fields "override_status_id" and have the
  matching id for the custom status that the override was changed to
- do the same for a course with grading periods and for a specific
  grading period
- the request should have the grading period id in the body
- if the last commit of this feature has been merged, then it should
  update the final grade override status in the traditional gradebook

Change-Id: I665bd75a25fb4b0c44c48db4a93fdf5354788d81
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326596
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-30 22:16:33 +00:00
Chris Soto f70e687293 add custom status to import backend
this commit adds the ability for the backend to recognize custom
statuses in the gradebook import and save them to the database for the
use of the front end.

closes EVAL-3432
flag=custom_gradebook_statuses

test plan:
- setup a course with custom statuses on a final grade override
- import the gradebook with a column called "Override Status"
  - make a change to a grade as well
- View the network request for endpoint
  http://canvas.docker/courses/<courseId>/gradebook_upload/data
- Verify that the request contains a key in the students array called
  override_statuses
- The override statuses should contain the current (old) grade status,
  the new grade status, the grading period id, and the student id
- Add another import with the same custom status name as the old one
- Verify that the override_statuses key does not exist.
- Add one more import with no "Override Status" column
- Verify that the override_statuses key does not exist.

Change-Id: I86c35f16aaff300e9b4d2e549c6d773d3238f8b0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326378
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Rohan Chugh <rohan.chugh@instructure.com>
QA-Review: Rohan Chugh <rohan.chugh@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-30 22:10:33 +00:00
rohan.chugh 0a35dfefd4 add custom statuses to gradebook filters
allow users to filter traditional gradebook by submissions that have
a custom status applied to them

closes EVAL-3434

flag=custom_gradebook_statuses
flag=enhanced_gradebook_filters

test plan:
- create custom statuses in the domain root account under the
  "grading" tab after clicking site admin -> <domain root account
  name>
- assign custom statuses to submissions in the gradebook
- verify all the custom statuses you created are listed in the filter
  dropdown under the status section
- filter the gradebook by the custom statuses (apply filters ->
  status -> <custom status name>)
- ensure that only the rows and columns that are necessary show up
  in the gradebook (i.e. if an assignment has no submissions with
  the custom status applied to them, the assignment column should not
  show, and if a student has no submissions with the custom status
  applied to them, the student row should not show)
- repeat for any other statuses you created

Change-Id: Ie6e5a1c7302f301fc217cb56d6568d85b5bc8348
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325877
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-30 19:08:38 +00:00
Cody Cutrer 571ad0a8b9 remove (direct) dependency on hashery
our only use is for a hash that preserves insertion order, and Ruby's
Hash has done that for a _long_ time

Change-Id: Ia4e05b7022d75eea774be037f803d292b6ddacaa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326470
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-30 19:02:57 +00:00
Drake Harper 41c6241d79 Add score statistic field to assignment
refs VICE-3731
flag=student_grade_summary_upgrade

Test Plan:
- go to student grade summary page with
   network inspector open
- inspect graphql request
- legacyNode > assignmentsConnection > nodes
- pick an assignment
> scoreStatistics field should show on assignment

Change-Id: If8156a8da2512325c2a3da6fb6a73003a90cccf7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326241
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-08-30 17:57:39 +00:00
Xander Moffatt d518a0835a prefer original client id for finding LTI tool
why:
* to avoid a weird situation where two LTI 1.3 developer keys
have the same domain/url and a tool for the wrong key is installed
in a closer context than the tool for the right key

closes INTEROP-8182
flag=lti_find_external_tool_prefer_original_client_id

test plan:
* follow instructions in the ticket:
* install two developer keys with the same domain
* install both tools from both keys in a course
* create some content using the first one, like an assignment
* then delete the first tool
* install a tool from the first key in the course's root account
* launch that content you created
* without this change it will launch using the second tool/client_id
* with this change and with the flag disabled it will do the same
* with this change and with the flag enabled it will correctly
launch using the first tool/client id

Change-Id: I31b8ad93b72eac7ba8847847cb76f15fc99ada07
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325870
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: Xander Moffatt <xmoffatt@instructure.com>
2023-08-30 16:51:40 +00:00
Isaac Moore fbaf55e924 Fix local S3 uploads not working with Vault roles
refs AE-57
flag=none

test plan:
- local uploads work with Vault roles for S3
- local uploads work with static creds for S3

Change-Id: I0c367f21f214b2f7614385798524af7b202acce0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326460
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2023-08-30 16:04:47 +00:00
Aaron Shafovaloff 7268bda358 Rewrite MessageStudentsSpec from QUnit to Jest
Test plan
  - Build passes

flag=none

Refs FOO-3190

Change-Id: I42ccc5346d9adf302d63b3c47f00133ca8a48dd7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326550
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-08-30 15:43:40 +00:00
Samuel Lee 45b7169144 anonymous grading setting cannot be removed
anonymous grading cannot be disabled when editing an existing
anonymous assignment

closes EVAL-3449
flag=anonymous_marking

test plan:
- create an anonymous assignment
- edit the anonymous assignment and verify that the anonymous grading
  checkbox can be toggled off

Change-Id: Ie2028614a2e2f8e135e4cafc2be5c8a5e511ccb6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326551
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
2023-08-30 15:37:01 +00:00
Drake Harper c72cecaf29 Calculate grades through FE calculator
closes VICE-3692
flag=restrict_quantitative_data

Test Plan:
- all specs pass
- navigate to student grade summary page
- assignment group, grading period, and final grades
   show as expected

Change-Id: Ib7cb799c1a17dbc53274198094ff30343d661872
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325993
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-08-30 15:20:56 +00:00
Xander Moffatt cc9ad5f774 data fixup: repair LineItems from bad course copy
why:
* a bug in the assignment importer assumed that all migrations were BP
syncs and caused a NoMethodError on nil, which skipped the rest of
the importer
* this meant that the default line item for each assignment never got
updated with the correct data from the source assignment's line item,
and subsequent line items were never created

refs LF-467
closes INTEROP-8168
flag=none

test plan:
* reproducing the bug now that it's been patched involves changing
some code in app/models/importers/assignment_importer.rb:
  * replace line 510 with `if true`
  * remove the safe access modifier `&.` from
  `migration.master_course_subscription&.content_tag_for` on line 554
* in a course with the 1.3 test tool installed, create an assignment
for the 1.3 test tool
  * pass back some values for the resourceId, tag, scoreMaximum, and
  label (or modify the Lti::LineItem in a rails console after creation)
* modify the assignment in a rails console to have "been updated" during
the period in which this bug was present in prod (7/5 - 7/10)
  * `assignment.update!(updated_at: Date.parse("2023-07-06"))`
* create a new course and import the first course to it
* the created Lti::LineItem for the new assignment in the new course
should not have the same values for resource_id, tag, score_maximum,
and label
* in a rails console, run the data fixup and reload the affected
Lti::LineItem:
```
DataFixup::RepairLineItemsFromBrokenContentMigrations.run(1)
```
  * alternately, run migrations if you haven't already
* the affected Lti::LineItem should now have the same values as its
source line item

Change-Id: I6d64a3cccf768fb54bda62180bf5dc1c06fa5223
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322632
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-08-29 23:43:18 +00:00
Samuel Lee 7a9e505621 add complete/incomplete dropdown to enhanced srgb
add complete/incomplete dropdown for pass fail assignments in the
main grading results section of the enhanced screen reader gradebook as
well as in the submission details modal. Also fix string interpolation
error when assignment has not been graded yet and it is a pass fail
assignment.

closes EVAL-3357
flag=individual_gradebook_enhancements

test plan:
- skipped selenium test in srgb_grading_spec.rb for this ticket passes
- have a course with a student, teacher, and a pass-fail assignment
- as the student, submit the assignment
- as the teacher, go to the enhanced screen reader gradebook and select
  the student and assignment
- see that there is a dropdown with the 'Ungraded' option selected and
  the score has a dash because it is has not been graded yet
- from the dropdown, click on the 'Complete' option and see that the
  grade changes to the maximum possible value for the assignment
- click on the 'Ungraded' option again and see that the grade resets to
  ungraded
- click on the 'Incomplete' option and see that the grade changes to 0
- click on the 'Excused' option and see that the grade changes to
  excused
- follow the same steps but in the submission details modal

Change-Id: I6481e81fee3e9c881ee924f701528cde8c0e423d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324780
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Ravi Koll <ravi.koll@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-29 22:17:53 +00:00
Alexander Youngblood c6221ffa34 Use course query to fetch sections/group categories
closes VICE-2465
flag=discussion_create

Test plan:
1. Open discussion create page in local environment
2. See that your sections + group categories
appear in their respective dropdowns (Post To
and Group Discussion)

Change-Id: Ida191d8146fd1760bff0532456ac6afd98cdcbbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325524
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-08-29 20:37:51 +00:00
juan.chavez 5d8ff541a5 Validate data on edit calendar event page
flag=none

closes LF-563

test plan:
- Create/Edit event using More Options view.
- Clean title and date inputs.
- Click Submit button.
> Verify that error boxes appear in both fields.
> Verify that no redirection happened.
- Input a valid title and date.
> Verify that you are able to save the changes.

Change-Id: Id975f518be40aa943ff41cbbfb88c4dbab513715
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326384
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: Juan Chavez <juan.chavez@instructure.com>
2023-08-29 19:02:33 +00:00
Jason Gillett 341ee9cd01 Sort Submission comments correctly
There are a couple places where a submission comment
can be created where the last_comment_at does not update.
I'm not sure where those places are.

We should sort by the last submission comment not
the submission created_at date in those cases.

flag = react_inbox
closes VICE-3687

Test Plan
1. Create submission comments
2. verify that they are sorted with newest comments at the top

Change-Id: I5fd52c9030be79ba2da012b64f38718aa39185cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326358
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
2023-08-29 18:40:28 +00:00
Jeremy Stanley d3bd17ff32 only count words on submitted files
we will only ever look at Attachment#word_count in SpeedGrader
but we are currently running a delayed job to count words on
_every_ Attachment. that's a lot of unnecessary work,
especially since things like course imports sometimes come
through with content type "text/plain" so we end up running
our word count regex over a common cartrige package 🤦

test plan:
 - make sure jobs are running
 - upload a file to course files
 - it shouldn't set word_count on it
 - submit a file to an assignment as a student
 - it should get a word_count

flag=none
closes EVAL-3396

Change-Id: I304635aecc9e3aad1a86cbf0b09dba7633a1b131
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326319
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-08-29 18:24:03 +00:00
Angela Gomba db5235502f Update Calculation of QB Alignments in Course Alignment Stats
Note: This also contains text changes on the Alignment
Summary Page. See ticket for more details and discussion.

closes OUT-5754
flag=none

Test Plan:
- Rspec, jest, and selenium tests are sufficient
- Jenkins Passes

Change-Id: If12ec35e84232671e77020fef6b7ce48a026e909
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325744
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-08-29 16:01:38 +00:00
August Thornton 5945d2aafa add ability to fetch temporary enrollment recipients and providers
Temp Enrollment API index
GET /api/v1/users/:user_id/enrollments

Temporary Enrollment Recipients:
temporary_enrollment_recipients boolean

Returns only recipient temporary enrollments with an
active_or_pending_by_date enrollment state

Temporary Enrollment Providers:
temporary_enrollment_providers boolean

Returns only provider temporary enrollments with an
active_or_pending_by_date enrollment state

Note: enrollments are joined on courses that have a workflow state of
available, claimed, or created

closes FOO-3330
flag=temporary_enrollments

Test plan:
 • Enable the temporary enrollments feature flag
 • Exercise the list enrollments API endpoint:
    • GET /api/v1/users/:user_id/enrollments
    • /doc/api/enrollments.html#method.enrollments_api.index
 • See associated JIRA (FOO-3330) for more details regarding request
   specifications and assumptions

Change-Id: I36c4dabd595f77767575b0431e3890ca83e65d5e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326351
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-08-29 15:28:55 +00:00
Jason Perry cade6a02b0 Make visible tokens unique
This fixes an issue where access tokens are duplicated for users with
multiple accounts (e.g. in a consortium).

Fixes FOO-3716
flag=none

Test Plan:
1. Create a centrally managed consortium
2. Add a user to multiple accounts in the consortium
3. Create a token for the user
4. Verify that the token is not repeated on the page for each consortium

Change-Id: I5f39596b34b71969294913cd3e09df04074dea76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326308
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Jason Perry <jason.perry@instructure.com>
2023-08-29 14:47:54 +00:00
Omar Gerardo Soto-Fortuño 4d24693a3c Create allRootEntries on DiscussionEntryType
closes VICE-3198
flag=none

test plan:
  - Specs pass.
  - Run this query on a root entry:
query {
  legacyNode(_id: "5", type: DiscussionEntry) {
    ... on DiscussionEntry {
      _id
      allRootEntries {
        _id
        parentId
        message
      }
    }
  }
}
    It should return all the root entries if it is
    a root entry.
  - Run the query on not a root entry, allRootEntries
      should return null.

qa risk: low

Change-Id: I7f3e3c11f1a3084c7cee8612e8e7c348a53b3c37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326305
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-08-29 14:00:35 +00:00
Chris Soto aaaaa65057 add final grade customs status to sis export
this commit adds a new custom status column to the sis export csv file
for final grades when the feature flag is ON & the course has final
grade overrides enabled.

closes EVAL-3431
flag=custom_gradebook_statuses

test plan:
- Enable final grade overrides for a course
- Go to the gradebook grid and apply the "All Grading Periods" filter
- Change the final grade override score for a student
- Assign a custom status label to the final grade override via the
  final grade override tray
- go to http://canvas.docker/plugins/grade_export
- enable the plugin
- check the option for "Include final grade overrides"
- In the "Endpoint to publish to:" field, you will need to set up a HTTP
  server to receive the POST request.  You can use a tool like
  http://ptsv3.com/ to retrieve the POST request.
- Once, the changes are applied navigate to
  /courses/<courseId>/settings#tab-grade-publishing
- Click on the "(Re)Sync grades to SIS" button
- After a few seconds the POST request should be received by the HTTP
  server and you should see a column for custom_grade_status, with the
  custom status name in the csv exported row for the students with the
  statuses applied to their final grade override.

Change-Id: I95ce80d6057b5345ea834bc03b8ecdf8fe5813da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325936
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-29 00:26:16 +00:00
Matheus 49502e9573 Make the header for embedded unauthorized render an h3
fixes LF-618
flag=none

Test plan:
- Access a page you have no access to
- Check that the unauthorized message
  appears with the usual H1 (only one
  in the page).
- Access a page which you do have acces
  to, with a media you don't.
- Check that the unauthorized message
  inside the iframe uses an H3 and not
  an H1.

Change-Id: I0fc9bebf786eaef9f93b9d3dc73b18d8211c315c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326323
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-08-28 21:39:42 +00:00
Jeremy Stanley ea2d5977a3 prevent unsubmitted submissions from blocking consortium move
occasionally when we try to move a consortium user back to
a home account she previously moved out of, unsubmitted
submissions block moving real ones and blow everything up
with a constraint violation. this PS hard-deletes deleted
or unsubmitted submissions that would block the move

also:
 - fix the check for existing submissions in move_submissions
   to look on the submission's (enrollment's) shard instead
   of the user's
 - postpone the SubmissionLifeCycleManager until we're done
   moving submissions around

test plan:
 - mostly specs (I was not able to reproduce the problem
   organically and I suspect it's a race condition possibly
   exacerbated by our queueing SubmissionLifecycleManager
   jobs prematurely)

flag=none
fixes FOO-3735

Change-Id: If7b472fcefbdc6ede90e126c1e2f12718aa9591a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326101
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: Jeremy Stanley <jeremy@instructure.com>
2023-08-28 21:26:17 +00:00
juan.chavez 004df3bc92 Show course end date in custom recurrence modal
closes LF-600

flag=calendar_series

test plan:
- Click custom frequency.
> If we selected a course calendar, verify that the
course end date is showed in the custom recurrence modal.
> Test this in calendar view and create/edit event page.

Change-Id: Iba70529ba9407a1bc5cb83f4fe95e423bcbe04b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325761
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: Juan Chavez <juan.chavez@instructure.com>
2023-08-28 18:37:44 +00:00
jonathan 2b48cedfa4 Encrypt autosaved RCE content.
- Add a ENV.forage_cache_key to be used as a global key for
encrypting content.
- Add EncryptedForage util in the RCE package to encrypt content
in localforage using crypto-es

closes LF-216
flag = none

Test plan:
- Create a Wiki page.
- Go to the RCE and add some content
- Open the console and go to:
Application tab -> Local Storage -> canvas.docker
- Expect to see the rceautosaved key
- Confirm the content is encrypted
- Refresh the page
- Expect the content to be decrypted and displayed correctly in the
RCE

Change-Id: Ibcfe7c1a56f125ba92a8fd3a2038c26dd7a4e39e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322913
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
2023-08-28 17:02:43 +00:00
Cody Cutrer eed5b38eee remove unused LinkedIn gem
Change-Id: I797580b2b9e9e65831984db8c5946cfa4e590a55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326106
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-28 15:59:01 +00:00
Xander Moffatt d38c119c4b standardize use of CET.from_content_tag
why:
* to avoid inconsistencies in the way that tools are found
for content tags and assignments

refs INTEROP-8182
flag=none
[pin-commit-instructure_misc_plugin=0e59ae0b57c3d10345560797d9ff838a734ecbdf]

ignoring FSC since it's trying to run both the line items and scores
controller specs, and those are pretty slow. it was still timing out
even after 60 min. +1ed by devx
[ignore-stage-results=Flakey Spec Catcher]

test plan:
* launching a tool from any/all of these places still works:
  * an assignment
  * a module item
  * an assignment (with A2 on as a student)
  * sessionless launch for a module item
* specs

Change-Id: I6eccdd56d3ed97a9089fe979a0ba72ffa5d0de55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325732
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: Xander Moffatt <xmoffatt@instructure.com>
2023-08-28 15:43:53 +00:00
Aaron Ogata 6104d981f0 bump inst-jobs & switchman-inst-jobs
refs AE-437

Change-Id: I80d0e5b47386ce97645903b5ab937923b4791137
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326229
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-08-28 14:58:14 +00:00
Jacob DeWar 84fe5f95c5 Allow media owners to edit captions
closes LF-579
flag=granular_permissions_manage_course_content

Test Plan:

-Enable course content granular permissions flag
-Remove manage_course_content_add permission from TA
-Remove manage_course_content_delete permission from TA
-Have a course with a TA
-As TA, upload new media file
-Insert and save media in an RCE (ex: Pages)
-Delete the attachment associated with media object
*Do this in console, or possibly just through Files UI
-As TA, attempt to add and delete captions
*Verify this works as normal

Change-Id: I7ee0b02dfcb64060c416f8025783ddde696875e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326063
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-08-28 14:57:17 +00:00
Kai Bjorkman b7e63912b3 disable grade input when moderated assignment has unposted grades
closes EVAL-3355
flag=enhanced_individual_gradebook

test plan:
- create a moderated assignment
- Go to the enhanced individual gradebook and select that assignment and
and student with the dropdowns
- verify that the grade input and excuse checkbox is disabled
- verify that default grade button and submission details grade input is
disabled
- verify that all grade inputs are enabled when the assignment is posted

Change-Id: I8cd0429c0be08f70bed0c5544ee79e9050b2d0ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325316
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-25 19:34:58 +00:00
Eric Saupe 2d4fbd9712 Redirect media_attachments_iframe if flag is off
fixes LF-597
flag=media_links_use_attachment_id

test plan:
- With the media_links_use_attachment_id flag insert a video in the RCE
and save the content
- Verify the URL for the video is /media_attachments_iframe/:attachment_id
and that the video loads correctly
- Turn off the flag and refresh the page
- Verify the URL for the video is /media_attachments_iframe/:attachment_id
- Verify there was a redirect to /media_objects_iframe/:media_object_id
- Verify the video still loads
- Alternatively, you can copy the iframe URL and paste it into a new tab and
see the redirect

Change-Id: Ia5c1f0d9854e71adaf95665831889c8f88e889d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325854
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2023-08-25 16:31:28 +00:00
Jacob Burroughs ae9263d4db Introduce the concept of impaired SMS regions
If an SMS region is impaired, 2fa for that region will be sent to
the user's primary email in addition to their selected OTP
communication channel and a notification will be shown in the UI.

Change-Id: I9cfc25bb71f72b91790865e568916af65cfe4291
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326218
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-08-25 15:52:32 +00:00
Samuel Lee 7a50056e04 remove unposted anonymous assignments in srgb
remove unposted anonymous assignments from the select assignment
dropdown in the content selection of the enhanced screen reader
gradebook

closes EVAL-3354
flag=individual_gradebook_enhancements
flag=anonymous_marking

test plan:
- skipped selenium test in srgb_anonymous_moderated_spec.rb for this
  ticket passes
- have a course with a student, teacher, and an anonymous assignment
- as the student, submit the assignment
- as the teacher, go to the enhanced screen reader gradebook
- do not select the student yet but click on the select an assignment
  dropdown
- see that all the assignments are there regardless of anonymous status
- select the anonymous assignment and scroll to the Assignment
  Information section.
- see that the Message students who button is not present
- now select the student and click on the select an assignment dropdown
- see that the anonymous assignment is not listed in the dropdown
- post the grade for the anonymous assignment
- go back to the enhanced screen reader gradebook and see that the
  assignment is now listed in the dropdown

Change-Id: Ief61a3fe2682e11b36a4226a8246b25f1bad1799
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325317
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-24 18:56:05 +00:00
August Thornton a277e6228a add temporary enrollment reader attribute
fixes FOO-3766
refs FOO-3337
flag=temporary_enrollments

test plan:
 • create a temporary enrollment via api (FF flag needs to be on)
 • or use rails console to create a temporary enrollment
 • verify that calling temporary_enrollment? on the enrollment
   returns true, and one that does not have an associated
   temporary_enrollment_source_user_id returns false

Change-Id: I358b5c5098b8cc34b8e193b38332da93e39b33f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326079
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2023-08-24 17:58:44 +00:00
Kai Bjorkman c8342ad41f next/previous button focus management in enhanced srgb
flag=enhanced_individual_gradebook
closes EVAL-3363

Test Plan:
- have a course with a few assignments and students
- go to the enhanced individual gradebook
- using tab, navigate to the next/previous buttons
- verify that if you select either the previous or next until you
hit the beginning or end of the list, the focus switches to the
opposite button
- ensure this works for both assignment and student next/previous
buttons

Change-Id: I311ce6826a4ff6c68693c4d57584836207225a94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325640
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-24 17:19:12 +00:00
Drake Harper 4abc9d3631 Create grading period group type
refs VICE-3692
flag=restrict_quantitative_data

Test Plan:
- able to query relevantGradingPeriodGroup on course type

Sample Query:
query MyQuery {
  legacyNode(_id: "1", type: Course) {
    ... on Course {
      id
      relevantGradingPeriodGroup {
        _id
        title
        gradingPeriodsConnection {
          nodes {
            _id
            title
          }
        }
      }
    }
  }
}

Change-Id: Ifac8249d642ff840ece0d2c049f1fadc801e990c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325989
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-08-24 16:07:56 +00:00
Caleb Guanzon b5fb4f3cc2 respect attach permissions in DiscussionEntry mutations
flag=react_discussions_post
fixes VICE-3623
fixes VICE-3703

test plan:
- in your course, turn redesign ON
- in you course, turn the setting
"Let students attach files to discussions" to ON
- as a student, capture the network request as you
reply with an attachment via the UI

- now as a teacher, turn the
"Let students attach files to discussions" setting to OFF
- as a student visit /graphiql
- for the mutation pane, use
```
mutation MyMutation {
  __typename
  createDiscussionEntry(input: {discussionTopicId: "5", message: "the setting has been turned off", fileId: "20"}) {
    discussionEntry {
      _id
      attachment {
        _id
      }
    }
    errors {
      attribute
      message
    }
  }
}
```

- run it
- verify that you get
```
{
  "data": {
    "__typename": "Mutation",
    "createDiscussionEntry": {
      "discussionEntry": null,
      "errors": [
        {
          "attribute": "message",
          "message": "Insufficient attach permissions"
        }
      ]
    }
  }
}
```
as a response

Change-Id: Ib390bba1be00a8d8d7f5fcc5f77f9f08351b4442
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325832
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-24 16:07:23 +00:00
Spencer Olson 15f9441a12 fix spelling: assocation -> association
refs EVAL-3436
flag=none

Test Plan:
- specs pass

Change-Id: I2c899fb2576cd82aeecac5b08917759cabf5e665
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326052
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
2023-08-24 14:43:03 +00:00
Jacob Burroughs efaac42207 Greatly improve attachment garbage collector performance
refs AE-441

Change-Id: If0b0cbc8a684020780e0d66d0d955b911d57fec5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325931
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2023-08-23 22:16:10 +00:00
Ed Schiebel cb2452b7ae Update rrules when series gets split
Some updates for "this and all following" will creat a new series,
splitting the original into two. The 2 new series need to have
their rrules updated to reflect their new state.

Note: not all of this works in the agenda view. This will be
      addressed in Lf-629

closes LF-601 LF-557
flag=calendar_series

test plan:
  - create a series of events and a non-recurring event
  - select an event in the middle and update its start time
  - update this event and all following
  > expect the selected event and all following to be updated
  - click on each of the updated events
  > expect the natural language description of the series schedule
    should reflect the new series (in particular, the number
    if events should reflect what what updated)
  - click on each of the events that were not updated
  > expect the description of the series schedule to reflect
    the events that didn't get updated

  - repeat but delete this and all following from the middle
    of the series
  > expect the events remaining to describe the schedule of the
    remaining events

  - edit and delete the non-recurring event
  > expect it to work

Change-Id: I23cb74318c4f756d99d55b000e3ac9a681b340b9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325746
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-08-23 20:58:13 +00:00
Spencer Olson 7ef91c51c4 add custom status to gradebook exports
closes EVAL-3244
flag=custom_gradebook_statuses

Test Plan:
1. Enable "Custom Status Labels for Submissions and Final Grades".
2. In a course that has Final Grade Override enabled, go to Gradebook and
   give a few final grade overrides, some with custom statuses applied,
   and others without custom statuses.
3. Export the Gradebook. Verify there is a "Custom Status" column that
   shows the correct status for each override (which should be blank for
   students without final grade overrides, and blank for students with
   final grade overrides but without custom statuses associated with
   those overrides).
4. Make a grade change in the CSV and then import the CSV. Verify the
   import works.
5. Disable "Custom Status Labels for Submissions and Final Grades".
6. Export the Gradebook. Verify there is no longer a "Custom Status"
   column.
7. Make a grade change in the CSV and then import the CSV. Verify the
   import works.

Change-Id: I7d65b561ecd9ea342d9ea283eb562c5ea3e4d2ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325632
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Rohan Chugh <rohan.chugh@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-08-23 20:56:59 +00:00
Sarah Gerard 2a861145b7 Fix mislinks on duplicate page titles for bp courses
closes LF-521
flag=none

test plan:
- create a bp course with page1 and page2
- in page2, add a link to page1
- create a second course with a page called page1
- associate and sync the two courses
- page2 in the associated course should correctly link
  to the original page1 from the bp course

Change-Id: I985357abc67ea13f7a71d34245caadfcd15832a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324322
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-08-23 20:32:44 +00:00
Aaron Shafovaloff 4101f38e11 Prepare for InstUI upgrade
Test plan
  - Build passes

flag=none

Refs FOO-3190

Change-Id: I719cf17c01bd791a1052e14d43b76327c1cda9e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325941
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-08-23 19:07:06 +00:00
August Thornton 8746276011 add temporary enrollment named scopes
This will allow for querying various states of temporary enrollments
using the named scopes on the Enrollment model.

Temporary enrollments will be created by default in an "active"
state for users that are already registered, otherwise will be created
in an "invited" state for "pre-registered" users.

Allow for temporary_enrollment_source_user_id to be included in the
api enrollment json response if the flag is enabled.

closes FOO-3678
closes FOO-3679
flag=temporary_enrollments

Test plan:
 • Enable the temporary enrollments feature flag
 • Exercise the enrollments API endpoint:
    • /doc/api/enrollments.html#method.enrollments_api.create
 • See associated JIRA (FOO-3681) for more details regarding request
   specifications and assumptions
 • In Rails console query the data via the new named scopes
 • These scopes will be helpful in various actions within the
   new api controller for temporary enrollments

Change-Id: If96aa141b7b55cb8ccf6bb8ff48e66e6edd317bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325763
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-08-23 18:35:06 +00:00
Derek Williams a91c376da2 skip quota check for group assignment submission file uploads
While group assignment submission uploads were not counted towards
the quota, the quota was still being checked prior to upload. This
change skips the quota check for group assignment submission uploads.

fixes EVAL-3385
flag=none

test plan:
- create a group assignment
- as a student, attempt to submit a file to the assignment that is
  larger than the quota
- verify that the file is uploaded successfully

Change-Id: Ie3e281c06cdd2ba33df75e0a82364557beccbeb3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325715
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
2023-08-23 18:30:13 +00:00
Nayeel Imtiaz 184b5421d2 Fix data returned in setFriendlyDescription graphql mutation
closes OUT-4891
flag=none

Test plan:
- Create outcome with description
and non-empty friendly description.
- Open dev tools and go to the networks tab
- Edit the friendly description so it
is now empty.
- Find the graphql event near the bottom where the
operation names equals "SetOutcomeFriendlyDescription".
- Verify the description field in both the payload column
and response column are both "".

Change-Id: Ifdd1ada8d4131e9d09bbb08abafd9d15140d1692
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325772
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-08-23 18:24:42 +00:00
Jason Perry f782f1fc78 Resolve an issue that allows 2FA to be bypassed
When a user has 2FA enabled _and_ a checked "remember me" when logging
in, it's possible to skip the OTP check by failing the first attempt
which subsequently uses the "remember me" cookie to log in on a second
page load.

This commit fixes the issue by ensuring that the "remember me" cookie
(pseudonym_credentials) is cleared when a user fails the OTP check by
navigation to another page besides the OTP page.

Fixes FOO-3696
flag=none

Test Plan:

1. Enable 2FA for a user
2. Log in as that user, checking "remember me"
3. After being redirected to the OTP page, navigate to another page,
   e.g., /courses
4. You should be redirected to the login page again.
5. Navigate to another page again. Before this change you would be
   logged in without having to enter the OTP code. After this change
    you should be redirected to the logging page again with a clean
    session.

Change-Id: I7a0f10b5fe37734a35d4396af542ae52e625b6f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325716
QA-Review: Jason Perry <jason.perry@instructure.com>
Product-Review: Jason Perry <jason.perry@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2023-08-23 16:48:10 +00:00
Jeremy Stanley 4029ac103d fix failure when diffed sis batch column types change
if a diffed csv import changes the column definitions, our
intended behavior is to skip diffing for that type. this was
broken in FOO-3574 but only because the variable name changed :(
for the warning text and there was no test coverage of that code path

test plan:
 - column header changes should bypass diffing and run a full
   import of the type(s) that were changed
 - the entire import should not fail

flag=none
fixes FOO-3749

Change-Id: I6ed9a27cf63d6ff1176e549002f650b19d472386
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-08-23 15:52:03 +00:00
Cody Cutrer 2aeaf9e3e6 skip flakey CalendarNavigator specs
refs LF-626

Change-Id: I5c4b23a57e273f11b905d33616954ef858f14b2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325907
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: James Butters <jbutters@instructure.com>
2023-08-23 15:05:25 +00:00
Ed Schiebel b9a187457d Delegate recurring event update to backbone
The UpdateCalendarEVentdialog was doing the fetch to update
the selected set of events from the series. This bypassed
Backbone's model.save, and was missing some event parameters.
Let's just delegate the update to the model and have the modal
simply responsible for getting the user's selecteion.

I also improved error handling in the calendar. I'd prefer
this change to have been in its own commit, but the two
updates were too intertwined for that to be practical.

Some jest tests were replaced getByRole with use getByTestId
to solve tests running afoul of the time limit.

closes LF-602 LF-603
flag=calendar_series

test plan:
  - create an event series, include a start time but no end time
  - click on the event in the calendar, then More Options in the modal
  - change the description and click Update Event
  - select All Events or All following
  > expect the event time to remain the same, and it does not become
    a multi-day event

  - in the devtools console, set
    ENV.environment='production'
    this will stop the defaut $.ajaxJSON error alert from popping up
  - update an event using more options, and do something bad
    (or edit calendar_events_api_controller.rb#update to return
     an error)
  > expect an error message

  - edit an event from the pop-up modal
  > expect the Submit button to have a spinner and be
    non-responsive while the update is in-flight
  > expect the More Options button to be
    non-responsive while the update is in-flight
  > expect a tool tip telling you it's working
  - next time, click the 'x' to close the modal
  > expect all the events being updated to be dimmed
    and non-responsive to clicks

Change-Id: I487caf17862ea56fe3f6d79b5ad059e235a7bfdd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325401
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-08-23 14:17:41 +00:00
Cody Cutrer 9f6688b4b8 rework google_drive for currently maintained upstream gems
google-api-client is deprecated and unmaintained; need to use
the service specific gem. this gets us on the latest APIs, and
importantly unblocks us on updating other common dependencies
(most notably a step towards updating faraday, but also retriable)

Change-Id: I646da7dc68b8c5f6068142608c19771dafbef127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325392
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-22 23:34:10 +00:00
Cody Cutrer 15a2ddbe41 remove submit-assignment-from-google-docs/drive code
it was disabled a year ago due to a broken API. the Google Drive LTI
is the way to do this now. this commit removes now unused related code
from the view, controllers, and the google_drive library

Change-Id: Ieccef46036c847f27e98dc8297da10d04b6721f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325750
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-08-22 23:30:39 +00:00
Robin Kuss 834589cbdd spec: skip test for ajax timeout
Refs LF-578

Test Plan: passes jenkins

Change-Id: I5e765508cc3279b44b0bd695bfcfe642f85edbd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325841
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2023-08-22 20:20:23 +00:00
Kai Bjorkman aeafffaa35 split name setting inherites to sub-accounts
closes EVAL-3386
flag=gradebook_show_first_last_names

Test Plan:
- create a sub-account of the root account
- set the siteadmin gradebook_show_first_last_names flag to true
- enable the allow_gradebook_show_first_last_names account setting in
the root account
- ensure the sub account has the setting enabled as well
- disable the allow_gradebook_show_first_last_names account setting in
the root account
- ensure the sub account has the setting disabled as well
- ensure the sub account can enable the setting to differ from the root
account and that it is saved
- ensure the setting is now available in the a course gradebook within
the sub account

Change-Id: I9be1d9f4bcf0c1aacae541725328c076c98fdfd5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325102
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: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-22 20:00:07 +00:00
Kai Bjorkman 354079d784 proxy submission in enhanced srgb
flag=enhanced_individual_gradebook
flag=proxy_file_uploads
closes EVAL-3362

Test Plan:
    - turn OFF the proxy_file_uploads FF
    - create an assignment with a file upload submission type as an
    option and one without
    - go to the enhanced individual gradebook and select the file upload
    assignment and a student
    - ensure the 'submit for student' button is NOT displayed in the
    grading section
    - turn ON the proxy_file_uploads FF
    - go to the enhanced individual gradebook and select the file upload
    assignment and a student
    - ensure the 'submit for student' button is displayed in the grading
    section
    - click that button and submit a file with the modal
    - ensure the modal is closed after the submission is made
    - ensure that the proxy submitter is identified in the grading
    section and the submission time is updated
    - select the assignment without file uploads as an option
    - ensure the 'submit for student' button is NOT displayed in the
    grading section

Change-Id: Idc245964bb73593ff654128a4886d20cd6d3b635
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325492
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
2023-08-22 19:56:40 +00:00
Drake Harper 035fd065d1 Add isLast to grading period type
refs VICE-3692
flag=restrict_quantitative_data

Test Plan:
- query isLast on grading period type

Sample Query:
query MyQuery {
  legacyNode(_id: "<GRADING_PERIOD_ID>", type: GradingPeriod) {
    ... on GradingPeriod {
      id
      last
    }
  }
}

Change-Id: Ica069f5a1f97cddb810af67f2d3313bdd862dd98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325737
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-22 18:45:35 +00:00
Jason Gillett bb95558a9a Update submission_sidebar to display RQD score
closes VICE-3722
flag=restrict_quantitative_data

Test Plan
1. Enter a grade for a student in RQD course
2. As student open the assignment
3. On the side of the assignment, there is submission info
4. Verify that the submission info is accurately restricted

Change-Id: Ifc9b1999790a6b2b1eb73b83a01ac5057472f230
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325821
QA-Review: Drake Harper <drake.harper@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-22 18:45:12 +00:00
Chris Soto 2ffcc73315 fix submission comment tray attempt 0 to 1
currently, if a student had not submitted for an assignment and a
teacher/student leaves a comment, the comments will post under Attempt
0. Once a student submits, the next comments will post under Attempt 1,
2, 3, etc.

fixes EVAL-2997
flag=none

test plan:
- create a new assignment
- as a teacher (not siteadmin user) or as a student, leave some comments
- verify when opening the submission comments tray in the Student
  Grades page that the comments are posted under Attempt 1.
- as the student, submit the assignment
- leave more comments. You should now see the pre-attempt comments and
  the post-attempt comments under Attempt 1.
- as the student, submit the assignment again.
- leave another comment.
- verify that the comment is posted under Attempt 2.

Change-Id: Id4459f41a30e7638408cdca640034728ed5e8ddc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325476
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-22 16:52:53 +00:00
Derek Williams 4f3317ccd8 bring ab_guid to assignments
closes EVAL-3393
closes EVAL-3394
closes EVAL-3395

flag=none

[fsc-timeout=100]

test plan:
- all tests pass
- create an assignment with an ab_guid
- using the assignments api, verify that the ab_guid is returned in the
    show response when `?include[]=ab_guid is passed`
- using the assignments api, verify that the ab_guid is returned in the
    index response when `?include[]=ab_guid is passed`
- using the assignments api, verify that you are able to update the
    ab_guid

Change-Id: Ic4e8d78a6b4dfb112168ec68bd7f6e117a8030f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324884
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-08-22 16:35:07 +00:00
Roberto Noguera e748efc22e Add filter to hide unassessed outcomes
Hackweek project
closes OUT-5833
flag=none

test plan:

- selenium tests pass

Change-Id: Icc19ca6196bed3464bdccdaf504a11ead742f909
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324892
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-08-22 16:00:58 +00:00
James Butters 4b5a6ac539 crystalball run full rspec suite with gem updates
When updating gems we want to ensure a full
suite of specs is run.
flag = none

Change-Id: Ic2d12e2cc7f464021120837cac1ed78609417109
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325788
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2023-08-22 14:46:49 +00:00
Cody Cutrer 18eca0dd8e remove SauceLabs integration
it was never used

Change-Id: I8bc00ba58d3ff911c857c63a4d13d1595c157a4f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325537
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-21 23:37:08 +00:00
Spencer Olson 6df97f68f1 fix gradebook exports for courses with grading periods
closes EVAL-3418
flag=none

Fixes two bugs dealing with grading periods and gradebook exports:

1. A bug where exports for the "Entire Gradebook" in a course with grading
   periods would always exclude the totals columns (the totals columns
   should be conditionally shown/hidden based on the "Display Totals for
   All Grading Periods" option).

2. A bug where an error would be thrown (in development) when exporting
   the "Entire Gradebook" in a course with grading periods that has the
   final grade override enabled and has at least one hidden assignment.

Test Plan:
1. In a course that uses Grading Periods, has the Final Grade Override
   enabled, has at least one manually posted assignment that has not
   yet posted to students, and has the "Display Totals for All Grading
   Periods" option deselected on the Grading Period Set, go to the
   Gradebook.
2. Filter by a Grading Period.
3. Export the entire gradebook.
4. Notice you don't get an error. The CSV should not have columns for the
   totals or final grade override.
5. Enable the "Display Totals for All Grading Periods" option on the
   Grading Period Set.
6. Go back to Gradebook, filter by a Grading Period, and export the
   entire gradebook. Notice you don't get an error. The CSV should have
   columns for the totals and the final grade override.

Change-Id: I86f5856b89c03aeeaa52c07bb9ae0de274604096
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325239
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-21 22:18:43 +00:00
Jared Crystal c18c61dae0 fix New Quizzes redirect from modules
fixes QUIZ-11500
flag=none

test plan:
 - when acting as a user WITHOUT the
   "Assignments and Quizzes - edit" permission:
    - from the modules page, links to NQ should navigate to
      the launch itself (/assignments/:id) rather than the
      assignment edit page (/assignments/:id/edit) (which
      they cannot view)
    - this should match the behavior of the links from the
      Quizzes and Assignments pages
 - when acting as a user WITH the
   "Assignments and Quizzes - edit" permission:
    - from the modules page, links to NQ should navigate to
      the assignment edit page (/assignments/:id/edit)
    - this should match the behavior of the links from the
      Quizzes and Assignments pages

Change-Id: I4ec9f2cb6693ebade6f5dbb4fc4a0644700a576c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325598
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Griffin Zody <griffin.zody@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Griffin Zody <griffin.zody@instructure.com>
Product-Review: Stephen Kacsmark <skacsmark@instructure.com>
2023-08-21 20:42:59 +00:00
Chawn Neal 38b8c28d4d Filter deactivated admins for context_code
fixes VICE-3634
flag=none

Test Plan:
1) spec passes.
 - you can copy setup data in console for easy
 testing also.
2) New AC is that we return correct context code.
- In particular it now filters deactivated admins.

Notes:
The ticket AC has changed.

Change-Id: I3e211f817f5e9d32f46ed0e6894d5f5e118bdfd2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325244
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-21 17:37:10 +00:00
Caleb Guanzon 1d00f766cb check for canAttach on DiscussionRedesign UI
flag=react_discussions_post
refs VICE-3623

this is fix # 2 of 3
fix # 1 is merged
fix # 3 will be a future commit
that will be applied to
graphql

test plan:
- turn on Announcements/Discussions Redesign
- in course settings click more options
and allow students to attach replies to
discussions
- save
- create and publish and announcement in the course
- as a student, reply to the announcement with an attachment
- as a teacher turn OFF allowing students to add attachments to
discussion replies
- as a student, verify that when you edit your reply,
all you can do is delete your attachment, but you cannot add
- reply to the topic and reply to any reply in any view
- verify you cannot attach
- verify teachers can still attach

Change-Id: Ie0d1c86d0111faff49db8a9d8bb9ef5dc3cf481c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325624
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2023-08-21 17:15:28 +00:00
Jason Gillett 7cfe07a1c1 Remove RQD speed grader additions
flag=restrict_quantitative_data
closes VICE-3719

Test Plan
1. Speed grader should function normally even when RQD is on.

Change-Id: I25016852fdde4fe1b6a9b89a84a2f3b24f56bb25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325535
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-08-21 15:46:52 +00:00
Jason Gillett 79eb564f73 Allow RCE to be clicked in mobile view
flag=split_screen_view
closes VICE-3624

Test Plan
1. Go to splitscreen discussion
2. Set to mobile view
3. Reply to an entry
4. Click on the RCE
5. the RCE should not close

Change-Id: If9fa2e3e608944837eda4ece7ae0a7b049f9f6a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325649
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-21 15:32:32 +00:00
Cody Cutrer 89bd2b4044 bundle update stormbreaker/axe-core
Change-Id: Ie1ee579eba82fcd224ab0e6b823001f341af362d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325614
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-21 13:26:56 +00:00
Cody Cutrer 0e326a43fd bundle update ddtrace
Change-Id: Ic0189a8f1d42f64c7440621c01d904a86db6748a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325660
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-21 13:22:49 +00:00
Jeremy Stanley 753fa76e1b add :view_admin_analytics permission
and default it on for account roles that enable :view_analytics
and :view_all_grades

test plan:
 *before running the included datafix migration or
 enabling the "Admin Analytics - view permission" feature flag*
  - check out the analytics plugin to gems/plugins/analytics
    (we just need it for the :view_analytics permission;
    no need to get it working or anything)
  - set up some custom roles that enable/disable various
    permutations of :view_analytics and :view_all_grades
 *run migrations*
  - the "Admin Analytics - view and export" permission still
    does not appear because the feature flag is off
 *turn on the feature flag*
  - the permission appears
  - custom roles that granted :view_analytics and :view_all_grades
    enable the permission
  - custom roles that disabled one or both disable the permission

flag=admin_analytics_view_permission
closes FOO-3701

Change-Id: Ib006293eb3b8e5dea7aeb38a4a5f5307eec3537f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325131
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: Jeremy Stanley <jeremy@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-08-18 21:42:36 +00:00
Cody Cutrer a1711e4a24 bundle update puma
Change-Id: I8e2eb53d938bc9215e9758c2bcb78c7f71f247eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325584
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-18 20:20:47 +00:00
Spencer Olson 035ced1e17 clear sis_source_id when duplicating an assignment
closes EVAL-3308
flag=none

Sets the unique-by-root-account sis_source_id to nil when creating a
duplicate assignment in order to prevent the unique index from throwing
an error and to allow the duplicate to be saved.

In addition, adds a model-level uniqueness validation for sis_source_id
so that these types of validation errors are caught at the application
level, not at the DB.

Test Plan:
1. Create an assignment.

2. Through API give a sis_assignment_id to the assignment. Using
   https://canvas.instructure.com
      /doc/api/assignments.html#method.assignments_api.update

   assignment[sis_assignment_id]=value

3. Navigate back to the assignments index page and attempt to duplicate
   the assignment. Verify the duplication completes and no errors are
   shown. The duplicate assignment should have a null
   sis_source_id/sis_assignment_id.

Change-Id: Ic3ede54b1d915c6df64c4e4ca40b72b59e53eebd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325022
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Knapp <eknapp@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-08-18 19:33:04 +00:00
Caleb Guanzon a737ace29d use DiscussionEntry policy to determine CAN_ATTACH_ENTRIES in UI
flag=none
refs VICE-3623

note:
- discussions redesign will be handled in a future commit
- this only handles creating replies via
the UI

test plan:
- TURN OFF Announcements/Discussions Redesign
- follow the steps performed in this video:
https://instructure.slack.com/archives/GPXHJGASH/p1692295177682399?thread_ts=1692293711.447409&cid=GPXHJGASH

Change-Id: Ib5a409c6bab21ded5506dc0f27583d76c9b45ece
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325391
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-08-18 18:40:47 +00:00
Aaron Shafovaloff 159d647d9e Move xhr utils to ui/shared
also: isolate filter-console-messages package

test plan:
  - build passes

flag=none

Change-Id: I32942fe42b65489fc23c3ef53955803efc572473
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325418
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-08-18 18:08:12 +00:00
Xander Moffatt e75d27eb6c forward postMessages from RCE iframe
why:
* LTI tools expect to be able to send window.postMessages to their
direct parent window, which isn't possible in the active RCE that wraps
the editor box in an iframe
* forward all messages sent to the RCE iframe to Canvas and back
* this means some message types won't work in this context since they
rely on finding the tool iframe
* there is also some strange behavior in Firefox (possibly a bug) where
when sending a postMessage from the RCE frame to Canvas, the event's
`source` is actually the Canvas window object, not the RCE frame,
so account for that by explicitly looking for the RCE frame
* not sure how else to handle this bug
* this does not yet allow for sending messages to the OIDC Auth endpoint
via a sibling forwarder iframe, but that's a separate issue

closes INTEROP-8194
flag=none

test plan:
* install the lti 1.3 test tool locally
* edit an assignment or a page to pull up an active RCE window
* add a content item from the test tool and include
`{"width":600,"height":600}` in the "iframe" box in the tool before
sending back the content item
* this should render an iframe inside the editor that launches the tool
* open the dev tools console
* scroll to the bottom of the tool's frame to the postMessage section
* deselect the "send to storage target" checkbox
* send this message: `{"subject":"toggleCourseNavigationMenu"}`
* the left course nav should collapse
* the console should log "message received" from the test tool
* this should work in all browsers (although rendering an LTI tool in
local canvas in Chrome doesn't work)

Change-Id: Ia219e8bd9d46ea3a061811458588af6dd8be8603
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325031
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-08-18 16:13:49 +00:00
Jeremy Stanley c552c86241 bundle update pdf-reader
fixes EVAL-3397

Change-Id: I42918e7ed0d00019e96da74425e2bf3bb80355bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325517
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-08-18 13:26:20 +00:00
Cody Cutrer 7b0800c452 bundle update rubocop-performance
[skip-stages=Flakey]
[skip-crystalball]

mostly Performance/MapMethodChain

Change-Id: Icfb4fe6a0368813e9f4c9946a98a794b4a4ff7ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325298
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-17 23:05:06 +00:00
Cody Cutrer 33b5bede0a bundle update net-ldap
Change-Id: I95ebf6df7b6ab83d59880cc9c5275534284855cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325490
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-17 19:38:09 +00:00
Spencer Olson 2b88a0abb3 remove section from gradebook settings on soft-delete
closes EVAL-3004
flag=enhanced_gradebook_filters

Test Plan:
1. Create a course that has multiple sections, with no students enrolled in
   one of the sections (Section A).
2. Go to the Gradebook. Notice all students are shown. Filter by Section A
   and notice no students are shown.
3. Go to /courses/:id/settings#tab-sections and delete any section other
   than Section A.
4. Go back to the Gradebook. Notice no students are shown and Section A is
   still selected as the section filter.
5. Go to /courses/:id/settings#tab-sections and delete Section A.
6. Go back to the Gradebook. Notice all students are shown and Section A is
   not an option in the gradebook filters.

Change-Id: Idf76b7d998d177f895acb7ae30b495dbbaf1a608
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324988
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Rohan Chugh <rohan.chugh@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-08-17 18:30:39 +00:00
Mysti Lilla 33ca0aae43 Prevent captions crashing migrations from missing files
fixes LF-587
flag=none

Test plan
- In a course upload a media file
- Add captions to the media file
- Export the media file
- Open the export package and get
  rid of the media file itself
  from the export, then zip
  it back up
- Import the file into a course
- Verify it doesn't crash the import

Change-Id: I3505dcf733b77cd960223b286cfdea00f59ade7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325422
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: Mysti Lilla <mysti@instructure.com>
2023-08-17 17:29:29 +00:00
James Logan d750d91081 Fix resource maps when permanent_page_links is on
closes LF-596
flag = none

Test Plan:
- Turn on permanent_page_links in your local siteadmin
- Turn on Asset Map version 2 in your local siteadmin
- Tail your canvas live events.
- Create a course with a wikipage
- Copy the course
- Observe that the content_migration_completed live event
  is created and has a resource_map_url
- Download the resource map. It should contain data showing
  the ids/urls for the source/destination wikipages.

Change-Id: I29dbac8943201f724544d565dacd04b2b7dc9fd2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325285
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: James Logan <james.logan@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-17 12:06:05 +00:00
Spencer Olson 9e2b3f757e allow viewing deactivated students in speedgrader
closes EVAL-3330
flag=none

Allows teachers to view deactivated students for differentiated assignments
in SpeedGrader, so long as the "view inactive" option is selected
in Gradebook. Previously, if an assignment was differentiated, students
would only be shown in SpeedGrader if the students themselves had the
ability to view the assignment. This meant deactivated students wouldn't be
shown — even if teachers had the option selected in Gradebook to view
inactive students — because deactivated students can't view the assignment.

Test Plan:
1. Create an assignment and assign it to specific students

2. De-activate the enrollment of the students assigned.

3. Navigate to the Gradebook and enable the display of inactive
   enrollments.

4. Observe that the inactive student can be graded there.

5. Navigate back to the assignment in question.

6. Open SpeedGrader to view the submissions.

7. Verify you can see the deactivated students in SpeedGrader, and you
   don't get an error message like “Sorry, there are either no active
   students in the course or none are able to be graded by you”.

Change-Id: I793da6daa652abf41162fa8a9b11f437be05127f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324998
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-16 22:35:08 +00:00
Samuel Lee c1e91c8f3e add late penalty and final grade to enhanced srgb
add late penalty and final grade labels to the grading results section
of the enhanced screen reader gradebook

closes EVAL-3358
flag=individual_gradebook_enhancements

test plan:
- skipped selenium test in srgb_grading_spec.rb for this ticket passes
- have a course with a late assignment, with a certain late penalty,
  such as 10 percent a day
- go to a student in the course and submit the assignment
- as a teacher, go to the enhanced screen reader gradebook and select
  the student and the assignment
- see that there is a late penalty and final grade label as well as
  0 for the late penalty and '-' for the final grade
- grade the student and see that there is a late penalty value based
  on the late penalty set
- the final grade value should reflect the entered grade with the late
  penalty deduction
- confirm that the grade in the grade input box is the user entered
  grade

Change-Id: I8c108ee1c76ea5236651a2633efa5dcc41013b9b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324598
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-16 22:20:34 +00:00
Jackson Huang 663b58f0d9 Enable a2 view for lti
flag=none
closes EVAL-2546
refs INTEROP-8128

test plan
- create an external tools assignment with a2
enabled with multiple attempts
- as a student submit the assignment multiple times
- go to the lti assignment and you should be able to see the
tool

Change-Id: I4f9c1f0d138f372f88fbaae03d7cd55727c3fe00
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320840
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-16 20:49:03 +00:00
Matheus c10f09ebe9 Create course_creation_accounts endpoint
This buils on top of manageable_accounts and includes
student and teacher enrollments for cases where those
result in more accounts where on can create courses.

refs LF-33
closes LF-532
flag=none

test plan:
- Hit /api/v1/accounts_to_create_courses_in
- Check the results is properly paginated
- Check that the resultset has all accounts
  you'd get from manageable_accounts
- Check that in addition to those you have
  accounts where student/teacehrs can create
  courses in (if you have enrollments there).

Change-Id: Id0924f56f6ea8ca0f987d63dac538c3e7386337b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315698
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-08-16 20:36:31 +00:00
jake.oeding 968555913a modify progress management in course paces
closes LF-502
flag=course_paces
qa risk: low

test plan:
-smoke test the course pacing page by
 updating some paces and navigating away, coming
 back to the page, etc.
-normal user workflow should be the same as before

Change-Id: Ie1f814b81d85677945a863a5c3824b07fc0f8d85
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325120
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-08-16 20:04:46 +00:00
Ed Schiebel 94755bc1fb Get correct date when editing existing event
closes LF-564
flag=none

test plan:
  - with your user in various timezones
  - create an event in the calendar
  - consider making the start/end time near midnight (try them both)
  - edit the event and choose more options
  > expect the date and time fields in the edit page to be correct
  - edit the event, changed the date, choose more options
  > expect the new date to be in the edit page
  - load 0/users/:user_id/calendar_events/new directly, not from
    the calendar
  > expect the date to be today (I'm not sure what would happen here
    if wallclock time was near midnight and your user is in a
    different timezone than your browser)

  > always expect the date to be formatted like Aug 14, 2023

Change-Id: If33da20f985ed0feca0bcb73b2f5a35fed5eefd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325112
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-08-16 18:08:13 +00:00
Kai Bjorkman 26e2328f13 show last name first in enhanced srgb
flag=enhanced_individual_gradebook
closes EVAL-3356

test plan:
- go to enhanced srgb
- verify that the names are last name, first
- verify that the names are sorted by last name

Change-Id: If9fd0a233d97cc2c5ee3a8de6fb849fde3cf7b03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324446
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Jody Sailor
2023-08-16 16:39:40 +00:00
Chris Soto c9aeea6cf9 enhanced gradebook lock down query param routing
currently the new enhanced individual gradebook is able to be accessed
with the FF off if the user knows to navigate to the gradebook url with
the query param ?version=individual_enhanced. This commit adds a check
on the backend during the routing that will now direct the user to the
traditional gradebook grid if the FF is off.

closes EVAL-3419

flag=individual_gradebook_enhancements

test plan:
- navigate to /courses/<course_id>/gradebook?version=individual_enhanced
  and verify that you are directed to traditional gradebook

Change-Id: Ief0c905ffd919a0ea87a3c7643a07fff3ab9ac67
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Rohan Chugh <rohan.chugh@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-16 15:35:53 +00:00
Derek Williams 05a574d908 show 'use this rubric for grading' option when adding to assignment
this option would only show if you checked then unchecked the option
'remove points from rubric'

fixes EVAL-3231
flag=none

test plan:
- create an external tool assignment
- from the assignment show page, click the '+ Rubric' button
- notice 'use this rubric for assignment grading' shows up as an option
- save the rubric with the option checked
- ensure the resulting dialog has actual values (not NaN)

Change-Id: I7eda43c2b267b41fd341efe49c40d63fc243d76b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320909
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-16 15:30:31 +00:00
Chris Soto e3dd4c4033 todo list return active or pending peer reviews
todo list was returning all peer reviews with no restrictions to review
user enrollment status. this change now returns only active or pending
peer reviews based on the user's enrollment status. the logic for
determining active or pending enrollment status was taken from the
existing active_or_pending method in the enrollment model.

fixes EVAL-3277
flag=non

test plan:
- you will probably need to refresh your local redis cache
- set up a peer review assignment with an end date
- assign a student 2 reviews to complete
- as each student submit the assignment
- as the student needing to review, go to the course home page and view
  the todo list. you should have the peer review assignment with 2 peer
  reviews to complete.
- as a teacher, make one of the reviewee students inactive
- as the student needing to review, go to the course home page and view
  the todo list. you should now have the peer review assignment with 1
  peer review to complete.
- click on the peer review url. it should navigate you to the peer
  review page for that submission.

Change-Id: I638441e4dfa993b0652cae6d1fe92948505dcb9d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-16 15:27:48 +00:00
Ed Schiebel cc28d0b423 Correctly update calendar when editing an event
If you change the calendar of an event in a series, it is not
correctly updated on the selected events. This fixes that.

closes LF-571
flag=calendar_series

test plan:
  - create an event series
  - pick one and edit it
  - change the calendar (and any other stuff)
  - Submit and choose All Events
  > expect the calendar to be updated in all the events of the series
  - repeat but update only this event
  - repeat and update this and following
  - make other edits and expect it to work as expected

Change-Id: Iae3013c4621db3fed2197b3b23fd4d64f34b0ee1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325265
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-08-16 14:40:34 +00:00
Cody Cutrer 15ec75cf72 bundle update twilio-ruby
Change-Id: Ie725fc2227c014741c7ecb10f311b075996ac144
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325309
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-16 12:22:00 +00:00
Michael Hulse 0ded50ee87 update check for temporary_enrollments to use root account
When testing the temporary_enrollments feature flag, I noticed
that the feature check was not using the root account. This
caused the feature check to fail when the feature was enabled
on the root account but not on the current (sub) account. This
fixes the feature check to use the root account.

refs FOO-3071
flag=none

test plan:

1. create sub-account
2. create two users on account (a.k.a. user1/user2)
3. from root account: settings > features > turn on temp enrollment
4. enable permissions: User - Temporary Enrollments
5. create course add user1 as teacher
6. add module/assignment and publish everything
7. cURL this:

curl --location 'http://<canvas>/api/v1/courses/1/enrollments' \
--header 'Authorization: Bearer <token>' \
--form 'enrollment[start_at]="2023-08-14T00:00:00Z"' \
--form 'enrollment[end_at]="2024-08-14T00:00:00Z"' \
--form 'enrollment[user_id]="2"' \
--form 'enrollment[type]="TeacherEnrollment"' \
--form 'enrollment[enrollment_state]="active"' \
--form 'enrollment[course_section_id]="1"' \
--form 'enrollment[temporary_enrollment_source_user_id]="1"'

Where temporary_enrollment_source_user_id would be the already
enrolled user id, and user_id would the recipient user id of the
temporary enrollment

8. expect enrollments.temporary_enrollment_source_user_id for user_id
   to equal the already enrolled user id
9. also, expect newly-included specs pass

Change-Id: Ib800822e10e4b3819a305edf10f81f82bcb499bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325210
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-15 20:42:46 +00:00
rohan.chugh 4d2c6522d5 add custom status pills for final grade overrides
add custom status pills to the student grades page (grade summary
page) if there is a custom status for a final grade override

closes EVAL-3403

flag=custom_gradebook_statuses

test plan:
- add a custom status to a final grade override through the
  traditional gradebooks for a course with grading periods for
  a specific grading period and also for the "all grading periods"
  filter
- go to that student's grade summary page (student grades page) and
  verify that a custom status pill exists in the final grade row
  for the grading period that the custom status was added for, and
  does not exist for a grading period that it wasn't added for

Change-Id: I46648be4fb6f225663eb3dc5b25ee02495fdba22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325109
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Jody Sailor
2023-08-15 19:02:27 +00:00
Sarah Gerard af7d698fee Clean up stuck progresses
looks for progresses for course_pace_publish that
are in a queued state and have a delayed_job_id where
the DelayedJob for that id does not exist and set them to failed

Fixes LF-506
flag=none

test plan:
- if you don't have some already, make some course pacings, thus
  making progresses for publishing the pacings
- in a rails console, find some completed progresses for
  course_pace_publish:
  Progress.where(tag: "course_pace_publish", workflow_state: "completed")
- set some of those progresses to "queued"
  Progress.find(id).update_attribute(:workflow_state, "queued")
- run the migration
- the progresses that were set to queued should now have a
  workflow_state of "failed"

Change-Id: I599b224cad9bf84b12b3e39c75c988a7c0289aaf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324928
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-08-15 18:21:36 +00:00
rohan.chugh b2d4fc4c5d update group search to filter on backend
modifies the REST API endpoint that the student view groups page uses
to fetch groups to add a filter query param. this param filters
groups by group name or the names of the users of the group.

closes EVAL-3254
refs EVAL-3253

flag=none

test plan:
- go to a canvas course that has a large number of groups (e.g. 100+)
- go to the people tab of the course
- click on student view at the top right
- go to the groups section on the people page of the student view
- search for a group name or a user's name that is in the group
- ensure that only one request is made to find those filtered groups
- ensure that the groups that are returned are filtered by the search
  term
- enter another search term
- ensure that only one request is made to find those filtered groups
- ensure that the groups that are returned are filtered by the search
  term and NOT the previous search term

Change-Id: Iaa62024aaef7f1db50d5cf7029bc590cf31c396b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324188
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-08-15 18:13:46 +00:00
Cameron Ray 0cb51a3a65 Improve the recursive nature of grading standards
refs EVAL-3367
flag=default_account_grading_scheme

Test plan
 - Tests pass

Change-Id: I2837dc95a307e43b7e35fee6f63258436e6ce6f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324664
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-08-15 18:04:08 +00:00
Kai Bjorkman bf8aa1ecb7 readable and internationalized submission types
flag=enhanced_individual_gradebook
closes EVAL-3373

test plan:
- go to a course with a student and assignment with mulitple submission
types and one with a single submission type
- go to the enhanced individual gradebook
- click on the student's name
- click on the assignment name
- verify that the submission type is in readable format with
comma's for multiple and only one submission type

Change-Id: Id720e73510c4a7960221419cad62ea69abaf416b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324445
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-15 16:58:47 +00:00
James Butters c0ef47ebb7 prepend cystalball diff with gems/plugins
plugin builds are not getting accurate predictions,
override some of crystalball's methods to fit the way
Canvas-LMS handles plugins.

fixes: DE-1596
flag = none
[force-crystalball]

Change-Id: Ib347737f9e7f65660830ce0ffaaa6b3bc0a27f86
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324830
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2023-08-15 16:26:39 +00:00
Robin Kuss d0f49225ae spec: add update recurrent events tests
Closes LF-479

Test Plan: passes Jenkins

Change-Id: Ida6e6431b0a504f217e084559fbfd32f528a7d16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325224
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2023-08-15 16:14:32 +00:00
Samuel Lee 6174011297 fix no submission found for dual enrollment
fix no submission found when an user has both a teacher and observer
role.

fixes MBL-16850
flag=none

test plan:
- have a course with a teacher, student, and an assignment
- add an observer role to the teacher and link the student
- as a student, submit the assignment
- as a teacher, grade the assignment
- perform a GET request for the following route:
    api/v1/courses/<Course #>/assignment_groups?
    include%5B%5D=assignments
    &include%5B%5D=discussion_topic
    &include%5B%5D=submission
    &include%5B%5D=all_dates
    &include%5B%5D=overrides
    &include%5B%5D=observed_users
    &override_assignment_dates=true
- confirm that there is a submission object in the submission array
  for that assignment

Change-Id: Iae1573220d97e4a67efa0639141df885067d2654
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322437
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Rohan Chugh <rohan.chugh@instructure.com>
Product-Review: Jody Sailor
2023-08-15 14:11:12 +00:00
Derek Williams 03fc0421fc add anonymous_grading field to 'assignment_updated' live event
closes EVAL-3392
flag=anonymous_marking

test plan:
- update an assignment to emit a live event
- ensure `anonymous_grading` field is present in the live event

Change-Id: I8cecb06064cbd0b9dcd142e85eb636edbe893161
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324779
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-08-15 13:07:28 +00:00
rohan.chugh 34c285935e add support for custom statuses to speedgrader
allow custom statuses to be set and viewed in speedgrader

closes EVAL-3347
closes EVAL-3400
closes EVAL-3401

flag=custom_gradebook_statuses

test plan:
- create a custom status in the gradebook from the domain root
  account
- go to a course that has two students and an assignment that has
  1 or 0 submissions for one of the two students, and 2+ submissions
  for the other student
- go to the speedgrader for that assignment
- click the edit button on the status and ensure that the custom
  statuses are available options
- choose a custom status and refresh the page
- if the student has 1 or 0 submissions, the status should appear as
  a pill in the speedgrader, otherwise the name should be appended
  to the dropdown option for that submission (the dropdown only
  appears if there are multiple submissions)
- ensure that the submission has the same status in the traditional
 gradebook

Change-Id: I2dc2d51d6f7dacd95ccfb8dc4b6aba84cc32bc34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324643
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-08-14 16:41:25 +00:00
Cody Cutrer 9e763ac3f9 bundle update multipart-post
requires moving the legacy multipart vendored gem out of a
conflicting namespace

Change-Id: Ib56a7b3cb4e372514b23c82cbbb59a5599462092
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324948
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2023-08-14 16:37:46 +00:00