refs VICE-4460
flag=none
test plan:
1.create a discussion with discussion redesign feature flag off
2.add threaded replies to it
3.run migration
4.verify that the discussion type is threaded
Change-Id: Idc66d016d9b6530d55a71d8da6e3efda35967528
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353715
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Daniel Matyas Vincze <daniel.vincze@instructure.com>
Product-Review: Tamás Balogh <tamas.balogh@instructure.com>
QA-Review: Ádám Molnár <adam.molnar@instructure.com>
QA-Review: Roland Beres <roland.beres@instructure.com>
closes EVAL-4367
flag=none
Test Plan:
- Create an assignment using a points-based grading scheme
- Grade three students
- Go into a rails console and manually change the `grade` and
`published_grade` (without triggering callbacks) for one of the
students to a different value.
Submission.find_by(
user_id: <student id>,
assignment_id: <assignment id>
).update_columns(grade: "new grade", published_grade: "new grade")
- Run migrations and notice the `grade` and `published_grade` for the
student you modified were updated to the correct value, and the
`grade` and `published_grade` for the other students were not
modified.
Change-Id: I0959dc1c083d15a790cc5742bf1e61b7ffa2cffc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352977
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Migration-Review: Spencer Olson <solson@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
refs ADV-170
flag=none
Test plan:
- PreReqs:
- A DeveloperKey with multiple scopes, including the deprecated one
`http://canvas.instructure.com/lti/page_content/show`
- Run the migration
- Verify the scope has been updated to the new value
`https://canvas.instructure.com/lti/page_content/show`
- Verify other scopes are unchanged
- Verify scopes in associated Tool Configurations are udpated to the new
value, other scopes should be unchanged
- Verify `lti.getPageContent` works (Assignments, Pages)
- The migration can be re-run to aid in testing
`rake db:migrate:redo VERSION=20240717133836`
- Create a DeverloperKey using the deprecated scope
`http://canvas.instructure.com/lti/page_content/show`
- After saving, the DeveloperKey should have the correct scope
`https://canvas.instructure.com/lti/page_content/show`
Change-Id: Ia899144fe906a07fd73fc3912e7b460438f74efd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352927
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
why:
- So that the state of our newer data model is in sync with what's
actually in the database.
closes INTEROP-8502
flag=none
test-plan:
- Have an API dev key and an LTI 1.3 dev key installed at the root account
and site admin level. Ensure that the LTI 1.3 keys have an already existing
Lti::RegistrationAccountBinding. If they were created semi-recently,
there should already be an active record hook that did it for you.
If they don't, create some new keys or create bindings for them
manually in the Rails console.
- Run the migration.
- Nothing in your database should have changed.
- Now delete the Lti::RegistrationAccountBinding associated with the LTI
1.3 keys.
- Run the migration again. The bindings should have been (re)created.
- Ensure that no such binding was created for the API key.
Change-Id: If57d299e550366131f2229101585ffa82609de69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352646
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
This allows date details API
to accept a page url or id
for its parameters
This also requires a postdeploy migration which
updates the developer key scopes
for the modified routes.
Fixes LX-1907
flag=selective_release_optimized_tray
Test plan:
- New specs pass
- Go to assign to for a page with > 100 overrides
- Ensure it correctly loads all overrides
Change-Id: I517c9acf122d83d7ecb6aa1ac018c1b4a5ac48a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353071
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
this commit builds the backend for the new rubric import feature. using
the api endpoint "upload", users can create multiple rubrics via csv
which will show up on the Rubrics page of the account or course. with the
new migration, RubricImports are stored in the RubricImport table and
each Rubric is associated with a rubric_import_id. this commit also
handles errors and includes tests.
closes EVAL-4361
closes EVAL-4362
flag=rubric_imports_exports
test plan:
- create a test csv file with the following headers:
- "Rubric Name"
- "Criteria Name"
- "Criteria Description"
- "Criteria Enable Range" (if feature flag is enabled)
- "Rating Name"
- "Rating Description"
- "Rating Points"
- repeat "Rating Name", "Rating Description", and "Rating Points" in the
same row to add multiple ratings to a criteria
- send in a POST request with the following url:
http://canvas.docker/api/v1/accounts/1/rubrics/upload
- check the Rubrics page under your account to see your new rubrics
- verify that sending incorrectly formatted rubrics will not add the
rubrics to rubric builder page
- RubricImport model will show the errors in the error_data attribute
Change-Id: I342c2ae840bd3f5e8470c7d5b43617c9b6d70308
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352960
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Chris Soto <christopher.soto@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Chris Soto <christopher.soto@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
On the Rails (application) side, specifically within the WebConference
model, the belongs_to :user association remains defined and we
don't validate the presence of the user_id attribute. If the column is
null, the foreign key constraint does not enforce a match in the
referenced table's primary key column; in this case the users table.
closes FOO-4313
flag = none
test plan:
- run migrations
- ensure that the user_id column in the web_conferences table is nullable
Change-Id: Icf3b6f51dd34456521977024ef363c7e9da3c2a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353081
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
closes VICE-4428
flag=none
Test plan:
- create some archived conversations that is unsubscribed
- run migration
- check subscribed status
Change-Id: Id105499e732fd4b336988ef4914189796ce71102
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352737
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Roland Beres <roland.beres@instructure.com>
QA-Review: Dora Csolakov <dora.csolakov@instructure.com>
Product-Review: Tamás Balogh <tamas.balogh@instructure.com>
closes OUT-6494
flag=inbox_settings
This completes part 2 of changing the datatype of the
inbox_settings snapshot on the ConversationMessage model
The old column will be removed in a postdeploy migration
Test Plan:
- Jenkins Tests pass
Change-Id: I173ff11e264e52f6a2cc6505f175b7b3b0e2fcf4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/351204
Migration-Review: Cody Cutrer <cody@instructure.com>
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>
fixes INTEROP-8501
flag = lti_registrations_page
test plan:
- Create some LTI developer keys in the UI, or use the developer
keys from existing LTI tools that you have installed
- Make note of their IDs
- Find those developer keys in the rails console and manually
delete their lti_registration association
- DeveloperKey.find(<id>).update(lti_registration: nil, skip_lti_sync: true)
- Enable the lti_registrations_page feature flag
- Go to the Settings > Apps page, and see that your LTI tools do not
snow up there
- Make sure the jobs container is running
- Run rake db:migrate
- Refresh the Settings > Apps page; the LTI tools should show up now
Change-Id: I4729f620f2b49981b652d99c8b961bd927364d9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352890
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
This commit adds a new column to the lti_ims_registrations table to
store the registration URL for the registration.
This is used to store the URL that was used to register the tool for
historical context, and so that it can be used to update the
registration in the future.
Test plan:
1. Install a tool using the dynamic registration flow
2. Run:
```
Lti::IMS::Registration.last
```
in a rails console and verify that the registration_url field is
populated
closes INTEROP-8735
flag=none
Change-Id: Ic55f665d88e9bce76f56b0e48c89d75e55e5fcf0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352798
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
closes OUT-6493
flag=inbox_settings
This is part one of changing the column type
for the inbox_settings snapshot on the ConversationMessage
model. It adds the new column and adjusts code to use
new column
Test Plan:
- Jenkins passes
Change-Id: I60376b49b70d5f83ad0a381ba45eb8f8e786cf0b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/351199
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Change-Id: I91835f332f081dc70c4c15edcf1f142bc237f17c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/351589
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>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
why
* the Discover page needs to be able to send the unified tool ID
that it gets from LearnPlatform's API along with the initial
Dynamic Registration URL
* this gets saved on the Lti::IMS::Registration and included
on any ContextExternalTools deployed from the registration
closes INTEROP-8687
flag=lti_registrations_page
test plan:
* have a DR-capable tool installed, like YALTT or the vercel tool
* put the tool's DR url in the call to `openDynamicRegistrationWizard`
in `ProductDetail.tsx`
* alternately, set that url in the registrations controller for
`temp_dr_url` OR set it in the `lti_discover_page_dyn_reg_url` Setting
(and restart web container to pick up Setting change)
* put a string in the `unifiedToolId` variable in the same file
* make sure the lti_registrations_page + lti_registrations_discover_page
flags are enabled
* go to Account -> Apps, click on Discover, choose an app, click
Configure on the top right of the app's screen
* the DR modal will open - fill it out. some of it isn't complete but it
will still create a Developer Key and IMS Registration
* check `Lti::IMS::Registration.last` in the console - it should have a
unified_tool_id set
* install a tool from that client id in the account or a course
* check `ContextExternalTool.last` in the console - it should have
a unified_tool_id set
* repeating the process _without_ sending a unifiedToolId
to the DR wizard should save `unified_tool_id: nil` on the IMS
Registration model
Change-Id: I323d22cafd0d34afb5b233f208b26ee7bba07f6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/351494
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Test Plan:
1. Update a MediaObject to have auto_caption_status of 'Complete':
MediaObject.take.update_columns(auto_caption_status: 'Complete')
2. Run the UpdateAutoCaptionStatusConstraint migration and verify
it succeeds and nulls out the auto_caption_status on the record from
the first step.
Change-Id: Ib9b0903c8b1f1018a32404168ac1ec083029a9c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/351015
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: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
sleeps were causing workers to sit around and do nothing
for long periods of time. This was causing the workers to
not be able to process other jobs in the queue.
flag=speedgrader_studio_media_capture
test plan:
- specs pass
Change-Id: Ia7e99592d666c2f770514624cc8ab4eaef215756
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350664
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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: Cody Cutrer <cody@instructure.com>
closes VICE-4374
flag=none
Test plan:
- Create some collaborations (in rails c its easy)
- Run the migration, see root account id is backfilled
- Create new collaboration through API, see the root_account_id properly filled
Change-Id: I8d467133c3db4b51d7e5eb5ad5c49704bd420f4b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350425
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Daniel Matyas Vincze <daniel.vincze@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
closes OUT-6287
flag=inbox_settings
This is the backend implementation for the Inbox OOO Auto
Response. It also includes adding the "Enable Inbox Auto
Response" setting to the SiteAdmin settings.
Test Plan:
Automatic:
- Tests are sufficient
Manual:
- Run Migrations (This patchset adds a couple of columns)
- Enable "QW Inbox Settings" Site Admin FF
- In your settings at the "Account" level:
- "Enable Inbox Signature Block" is checked
- "Enable Inbox Auto Response" is checked
- Save your settings
- Go to a course and go to "People" page
- Act as a user in the course
- Navigate to Inbox
- Select the Inbox Settings:
- Response On
- Start Date -> Today
- End Date -> Tomorrow
- Subject and Message is up to you :)
- Save Settings
- Stop acting as that user
- Act as another user in that course
- Go to Inbox and message the first user
- Refresh the Inbox page and verify that the inbox
has a new message from the first user with the
OOO message
- Send another message to that user and verify
that the OOO response is NOT sent a second time
- Stop acting as the second user and act as the
first user again
- Go to Inbox and edit settings
- Edit the subject or message of the Auto Response
- Act as the second user and send a message
- Verify that the OOO response is sent to the user
(because user 1 updated their settings)
Change-Id: Ic5cb436ee3d9df179289bdb102d2ec7b80b8d3cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344465
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Also better Claude 3 support by
- passing discussion content as XML format
- prompt is regenerated with their tooling
refs ADV-49
flag = discussion_summary
Test plan:
1. enable the feature flag
2. summarize a discussion
3. regenerate the summary with user input
4. validate the output matches the topics and areas of interest
5. regenerate the summary with user input that's
not valid for the discussion, like
"tell me about pancakes"
6. validate the refusal
Change-Id: I3d29be07170af071e4707fd68d4ca070f3362f87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349892
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Attila Toth <attila.toth@instructure.com>
QA-Review: Richard Zana <rzana@instructure.com>
Product-Review: Richard Zana <rzana@instructure.com>
It will be used for sending unified_tool_id during LTI launch event.
closes INTEROP-8638
flag=none
test plan:
- tests pass
Change-Id: Id4ec2aa1e52ec25198afdee6585211a98f4e0bd1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350034
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Csaba Csuzdi <csaba.csuzdi@instructure.com>
Product-Review: Csaba Csuzdi <csaba.csuzdi@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
It will be used for sending unified_tool_id during LTI launch event.
closes INTEROP-8637
test plan:
- tests pass
Change-Id: Id31c519633ee91dd02fdf3ca577517cdd0489299
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350040
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Bence Árpási <bence.arpasi@instructure.com>
Product-Review: Bence Árpási <bence.arpasi@instructure.com>
this is to be a mechanism for tracking the status of auto caption
creation and error handling. This is the back end implementation
only.
closes EVAL-4250
flag=speedgrader_studio_media_capture
test plan:
- tests pass
Change-Id: I1fcc75203874063e02f6432c425c49f92613cc5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349437
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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>
why:
* Registrations can be bound to Accounts cross-shard, like
enabling a registration inherited from Site Admin
* the RegistrationAccountBinding model always lives on the
shard of the account, so the registration is the possibly
cross-shard reference
refs INTEROP-8517
flag=none
test plan
* run rake db:migrate with no errors
* create an Lti::Registration on one shard - easiest way is to edit
an existing LTI-type DeveloperKey
* in a second shard, create a binding for that registration
```
Lti::RegistrationAccountBinding.create! account_id: 1, registration_id: 10000000000011
```
(replacing the ids with the local account and global registration ids)
* this should suceed. without this migration, it will fail
Change-Id: If935827c8a1b22a3a962ab9671eb10521048b670
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349706
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
refs ADV-49
flag = discussion_summary
[fsc-timeout=45]
Test plan:
1. enable the discussion_summary flag
2. summarize the discussion
3. check if the summary is presented based on your language preferences
3. modify your language preferences
4. reopen the discussion
5. check if the summary is presented based on your language preferences
Change-Id: I28e96b03002ed3321ce95aa56db06e8ce517225f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349531
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Richard Zana <rzana@instructure.com>
Product-Review: Richard Zana <rzana@instructure.com>
closes AE-280
[skip-stages=Flakey]
also vastly simplified the EventStream gem that no longer has to deal
with Cassandra
a pre-deploy migration is added that will migrate data from Cassandra
back to Postgres if you're currently using Cassandra. this means the
actual Cassandra gem dependencies can't be removed until that migration
is squashed
Change-Id: I0246ad9c058416e373ed4118a378bd640ace9c98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349182
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
closes OUT-6342
flag=none
Test plan:
- Run migrations and rebuild css
docker-compose run --rm web bin/rails db:migrate
docker-compose run --rm web yarn brandable_css
- Go to Account -> Settings, check Enable Name
Pronunciation then click Update Settings button
- Go to Account -> Profile, click on the 3 dots, select
edit profile, enter custom name pronunciation longer
than 255 chars and click Save Profile button
- Verify that "Name pronunciation is too long" error
is displayed above the pronunciation input field
- Edit name pronunciation to be less than 255 chars and
click Save Profile button
- Verify that profile displays the custom name pronunciation
and that the view matches the figma design linked in ticket
- Go to Account -> Settings, uncheck Users can edit their
name and click Update Settings button
- Create user, act as user, repeat the above steps and
verify that workflow is similar except that the edit
view matches the alternative design linked in ticket
Change-Id: I9b40d06f73666fbdfb77261c10a65bfdce7c8184
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346833
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Anderson <jason.anderson@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jason Anderson <jason.anderson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
why: An existing DeveloperKey can be updated, or a new one can be
created, from the existing DeveloperKey UI or from other sources.
We want to keep the LIME page in sync with the existing state of
the world until we cut over to using it, so a corresponding
Lti::Registration needs to be created and kept in sync for each
LTI 1.3 DeveloperKey.
closes: INTEROP-8576
flag=none
[pin-commit-multiple_root_accounts=a1383c040391503c889e28fffc50f66961e981cb]
test plan:
would be easiest to start with no Lti::Registrations locally
- when you update the name of an existing Developer Key you should be
able to check in a rails console for a new registration to have been
created.
- then update that same developer key name again and you should now be
able to check in a rails console that the previously created
registration has been updated
Change-Id: Ifd1dde6670c1e2e12ca9d67f48cd07251dfde8d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346498
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
This commit adds a partial index to the `updated_at` column of
the `asset_user_accesses` table, specifically for entries where
`context_type` equals 'Group'.
After deployment, we’ll monitor the partial index’s performance
to assess PostgreSQL’s indexing behavior; if necessary, we’ll
revert to a full index and remove the existing ad-hoc index.
closes FOO-4061
flag=none
test Plan:
- verify the migration executes without blocking deployments
and that the index is created concurrently
- test specific slow-running queries (as identified in the Jira
ticket) to ensure they perform significantly faster with the
new index, and note the expected performance improvements observed
during testing
- Monitor overall system performance to ensure no negative
impacts, particularly on OCPS’s reports and the AssetUserAccesses
workload
Change-Id: I4c71acfbe066e6f3ea59cdb87ca3c0c35683bddc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347356
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
test plan:
- set up Microsoft authentication in an account
- use tid+oid as the login attribute
- have a pseudonym linked to the microsoft auth provider
that uses sub as its unique_id
- set settings["old_login_attribute"] = "sub" on the
auth provider
- log in via microsoft
- you should be prompted to retrieve a verification code
from your email
- that email should come (use /users/X/messages locally)
- if you enter a bad verification code, you should be
notified of this and be allowed to try again
- if you enter the correct verification code, your login
will complete
- log out and back in, and you should not have to
go through this verification flow again
flag=none
closes AE-966
Change-Id: I57fc088f4a106a6507f82413cb4f65e3905ccb7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346696
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: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
There's a unique index on assignment_override_students on
wiki_page_id+user_id (and similar indexes for discussion_topic_id
and attachment_id). The assignment override code is set up to keep
soft-deleted records of anyone who's had an AOS on an assignment for
auditing, so we need to allow multiple AOS records with the same
object+user_id combination on other object too, as long as the record
is soft-deleted.
This commit removes the old index and adds an index for the foreign key
and a unique index where the workflow_state='active', so that we still
only will ever have 1 AOS per active object+user combo. This is also
consistent with how the existing unique index on assignment_id+user_id
works.
closes LF-1560
flag = differentiated_modules
Test plan:
- Run migrations
- Create a wiki page
- Open "Assign to" and add a single student, save
- Open the tray again, remove the student, and add everyone, save
- Open the tray again, remove everyone, and add the same student back
- Expect saving to work without error
- Repeat with an ungraded discussion
Change-Id: I29d93ea786f50beaf119bf345c3520a7cfdb4b3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346807
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: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Additionally, mark registrations as soft deletable.
why:
- previously, we were validating that application type, grant_types,
response_types, and token_endpoint_auth_method are all the same for
every dynamic registration request. We don't need to store these
fields.
- We were previously hard deleting IMS Registrations, which could cause
some unexpected headaches.
closes INTEROP-8503
test-plan:
- Pull the commit down.
- Run the migrations and ensure all is well.
- Ensure that Lti::IMS::Registrations are soft deletable:
```ruby
reg = Lti::IMS::Registration.first
reg.destroy
reg.reload.workflow_state == "deleted"
reg.update!(workflow_state: "active")
```
- Run through the dynamic reg process and ensure that all goes smoothly.
- Revert all of the migrations and ensure that all is well.
Change-Id: I2e92ce36d3b719e072bb78e3a79d6940e7131fbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346408
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
refs VICE-4038
flag=discussion_checkpoints
Test plan:
- Specs pass.
- As a student in the course, set the Due Date
notification policy to immediately.
- As a teacher, create a Discussion with Checkpoints
using the Discussion Create/Edit.
- Student should receive this new notification.
Change-Id: I56c4928e5f79b667079f5c7087c5e8110b2385be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345778
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
also includes some work toward making the embeddings model
upgradeable
test plan:
- have a course where the smart search feature is
turned off
- populate it with content
- turn the feature on
- go to the search page
- you should see a progress indicator while indexing happens,
then search should work
flag=smart_search
closes ADV-72
closes ADV-88
Change-Id: I5b2d7e3f341459af27eda8a4f9ad7b255cc33a5f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345601
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
why:
- Some schools were reporting errors while launching certain LTI tools.
- These errors were due to a misconfiguration within the LTI tools
themselves, where they were configured to initiate a deep linking
request at placements that don't support it.
- This caused Canvas to throw an error and not launch the tool.
- To prevent this, during launch time, we only initiate a deep linking
request if the tool is configured to do so and the placement supports
it.
- Additionally, we now validate all configured placements within the
Lti::ToolConfiguration on save, so that no invalid
message_type/placement pairings get through.
fixes INTEROP-8509
flag=none
test-plan:
- Before this commit:
- Install the LTI 1.3 test tool with a placement that only supports
resource link requests, such as account_navigation or
course_navigation.
- Modify the config using the JSON editor in the UI (or the Rails
console), so that the course_navigation placement has a message_type
of "LtiDeepLinkingRequest".
- Try to launch the tool. You should get a 500 that looks much like the
error_report linked in the ticket.
- Pull this commit down.
- Try launching the tool again. It should launch successfully as a
resource link request, which can be verified in the decoded JWT the
tool shows.
- Modify the placement to have the appropriate message_type again, using
the UI or the rails console.
- Try to modify it to have the deep linking message type. You should
get a flash alert error in the UI stating that the placement doesn't
support that message type.
Change-Id: I58908450c9784509c79df1fd93f5392cfb16b61a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344102
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Mark Starkman <mark.starkman@instructure.com>
why:
* For the LIME project, we decided to rework the current data model for
storing LTI related data. The current system is quite old and has
accumulated a lot of tech debt from little patches over the years, so
we hope to refine and simplify the data model as much as is reasonably
possible.
closes INTEROP-8500
flag=none
test plan:
* in a rails console, get an Account `a`, a User `u`, and an
Lti::Registration `lr`
* create a new RAB (Lti::RegistrationAccountBinding):
```
Lti::RegistrationAccountBinding.create! account: a,
lti_registration: lr, created_by: u , updated_by: u
```
* the created RAB should have a workflow_state of "off"
* check out the associated MRA commit
* get a cross-shard User `xu`, like `User.find("2~1")`
* bonus points if that user hasn't already been associated
to something on shard 1
* update the RAB's updated_by to point to that user:
```
rab.updated_by = xu
rab.save!
```
* that should succeed and `rab.updated_by` should correctly
reference that cross-shard user
* create another RAB with a cross-shard user for both
created_by and updated_by - it should succeed
Change-Id: I750a725ec0c82fa08de3922c76c855b0a0618116
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345691
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
why:
- For the LIME project, we decided to rework the current data model for
storing LTI related data. The current system is quite old and has
accumulated a lot of tech debt from little patches over the years, so
we hope to refine and simplify the data model as much as is reasonably
possible.
- This is the first step/table in that process.
closes INTEROP-8499
flag=none
test-plan:
- Setup sharding and ensure you have the relevant sharding update commit
checked out (see the ticket description)
- Pull the commit and run your database migrations.
- A new "lti_registrations" table should have been created with the
appropriate columns as listed in the ticket.
- Rollback the migration that's part of this commit and ensure that it
completes successfully.
- Ensure that you have a user on a different shard.
- Run the migration again and ensure that you can create an
Lti::Registration with something like:
```
user = Shard.second.activate { User.first }
Lti::Registration.create!(account: Account.default, name: "registration",
created_by: user, updated_by: user)
```
Note that those are all of the required fields
Optional, as these are tested by the specs themselves:
- Ensure that the Lti::Registration requires an account and a
created_by/updated_by to be created/saved.
- Ensure that the Lti::IMS::Registration can be associated with the
Lti::Registration model.
- Ensure that the DeveloperKey can be associated with the
Lti::Registration model.
Change-Id: If7e8198956875a25fc8e545e3692e39e928222fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345088
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Defaults to false
test plan:
- see if the not_selectable field on your most recent tool
is nil. (It probably is already.)
E.g, ContextExternalTool.not_selectable = nil
- take some other tool and set its not_selectable field to
true. E.g. ContextExternalTool.first.not_selectable = true,
then ContextExternalTool.first.save
- run this migration.
- Verify that ContextExternalTool.last.reload.not_selectable
is now false instead of nil
- Verify that ContextExternalTool.first.reload.not_selectable
is still true.
- You may want to set that first tool's not_selectable value
back to false when you're done.
refs INTEROP-8558
flag = none
Change-Id: Ifde1bd866eee49bd4a8d0b82a70946b61a4717aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344273
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Change-Id: Idbbf08e6ea9c09a75ae27a091c206d8493140f9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344349
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
this slightly adjusts the current ASV/QSV visibilities
to also create visiblities for wiki pages and discussion
topics. Attachments are not yet included. The only changes
that needed to be made for these objects is account for the
objects's assignments. Otherwise these views are the same as
the ASV/QSV views
closes LF-1039
flag=differentiated_modules
test plan:
- Run the appropriate visibilities for each different
object, testing out various types of overrides and
ensure that the correct students appear in the list
- DiscussionTopic.find(id).discussion_topic_student_visibilities
- WikiPage.find(id).wiki_page_student_visibilities
- Test adding these objects to a module with student and
section overrides, ensure the correct students appear.
- Create a graded discussion and add it to a module with
a section or student assigned to the module
- Act as a student that is assigned to that module, and
go to the Assignment index page
- Expect the graded discussion to appear
- Act as a student not assigned to that module, and
go to the assignment index page
- Expect the graded discussion not to appear
Change-Id: I1fa77765cbcc207661e883593dbe74fa8b0ac8f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344017
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>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
endDateTime was added in 0a6055bd42 and cdab4b61d8.
Test plan:
- with a startDateTime
tok http://web.canvas-lms.docker/api/lti/courses/1/line_items \
scoreMaximum=12 label=my_ags_li startDateTime=2024-01-02T12:00:00Z
- list line items (the endpoint is paginated, use limit= if you have too
many line items) and make sure startDateTime is included
tok http://web.canvas-lms.docker/api/lti/courses/1/line_items
- get one line item annd make sure startDateTime is included
tok http://web.canvas-lms.docker/api/lti/courses/1/line_items/28
- edit the assignment in the UI and make sure the unlock_at is set to the
value you set
- change the unlock_at in the UI
- refetch the list of the line items and the item and make sure the
startDateTime is the new value
- update the assignment startDateTime thru AGS.
tok put http://web.canvas-lms.docker/api/lti/courses/1/line_items/28 \
startDateTime=2024-01-03T13:00:00Z
- fetch the line items and make sure the value has been updated
- make sure the unlock_at on the assignment has been updated in the UI
or in the DB
- create an assignment with deep linking and give it an unlock_at
- fetch the line item or list line items with AGS and make sure the
unlock_at is given as startDateTime. (The assignment doesn't seem to
be listed in the AGS list endpoint but you can get it by specifying
the line item id)
refs INTEROP-8405
flag=none
Change-Id: Ib13150c2b26279379c6ddaaf34054a62eac86575
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Mark Starkman <mark.starkman@instructure.com>