Commit Graph

2429 Commits

Author SHA1 Message Date
Ed Schiebel 388d995568 update the block editor data format
the legacy block editor code assumed the json format for
the block_editors.blocks column was
   blocks: [data: {editor data}, id, timestamp]
that was an artifact of the data structure emitted by editor.js.
Now we just want to put the craft.js editor's json output directly
into the blocks column.

The data migration also changes the editor_version value
from '1' to '0.1' because '1' doesn't seem right

this commit also introduces data transformations to update the data
to the latest version on the fly

closes RCX-2369
flag=block_editor

test plan:
  - before checking this branch out, have a block editor page
  - after checking this branch out
    - run bundle exec rake db:migrate RAILS_ENV=development
    - run psql canvas_development
    - select id, editor_version from block_editors;
    > expect your pages to have version 0.1
  - edit the old v0.1 page
  > expect it to work
  - save
  > expect it to have v0.2 in the block_editors table
  - from the pages index page, choose Duplicate from a
    page's kabob menu
  > expect the correct type of page (rce or block) icon
    to be displyed
  > expect to be able to view the copy of the page
  > expect to be able to edit the copy of the page
  - run:
    bundle exec rake db:migrate:down VERSION=20220228162704
  - select id, editor_version from block_editors;
  > expect the old v0.1 pages to revert to '1'
  > expect the new v0.2 pages to remain '0.2'

Change-Id: I592bffc11018ab3c4f7d7cc4752202088d5700c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/357583
Migration-Review: Cody Cutrer <cody@instructure.com>
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: Ed Schiebel <eschiebel@instructure.com>
2024-09-24 20:53:16 +00:00
Charley Kline f691a0648e Unilaterally remove "Covid-19 Canvas Resources" help link
Closes FOO-4794
Refs FOO-4735
flag=none

We've already removed the Covid help link from the Rails
model, but most production accounts have it saved as a
custom help link setting, after having edited their
account settings. It was decided to remove it everywhere
so this is a database migration to do so in all accounts.

Test plan:
* needs migration review

Change-Id: Ie2c7004c31fde321a95f26202d508ba588d34af0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/357864
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2024-09-19 16:09:37 +00:00
Jason Gillett f85c9997c1 Add new parent relationship to assignment_override
flag=discussion_checkpoints
refs EGG-79

Note, sub_assignment override creation will use this field
in the next patchset.

Test Plan
1. Verify that the parent_override relatinoship exists on
an assignemnt override
2. Verify that if an assignment override has a parent_override
that it gets destroyed when the parent is destroy

Change-Id: I490f04c14f979494918cdffa3822ea149dd5f3ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/357062
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Dave Wenzlick <david.wenzlick@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-09-13 15:48:52 +00:00
August Thornton dc8ee613aa add index to account_report_runners created_at
We don't have app code that relies on this index,
and it has already been cowboy'd in production,
thus why the :postdeploy tag.

closes FOO-4660
flag = none

test plan:
 - none

Change-Id: I3e66ba48be56606dcb0e0177cd6bd92fd57a4837
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/356704
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-09-10 19:38:03 +00:00
Robin Kuss 2b0a75fc93 create data fixup for module override data values
Closes LX-2043

Test Plan:
  - Set up scenario with module overrides that have due_at_overridden,
unlock_at_overriden, lock_at_overridden set to "true."  You can do this
by commenting out lines 128-133 in app/models/assignment_override.rb,
making the change to one or more overrides in the rails console, and
then uncommenting the lines in that file.
  - Run the datafixup via the test included.
  - Run locally...somehow?

Change-Id: I3a115b1ed9f5d8014430697522169ebf58d36ca5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/356824
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2024-09-10 00:12:53 +00:00
Xander Moffatt 64dae6c512 create Lti::Overlay model
why:
* this will represent the overrides that a Canvas admin makes to tool-
provided LTI Registrations (whether dynamic or 1.3 or 1.1 eventually)
* this will allow us to track the overrides and apply them to the
finalized registration, and provide options like Reset to Default

closes INTEROP-8773
flag=none

test plan:
* in a rails console, get an Account `account`, a User `updated_by`,
and an Lti::Registration `registration`
* create an Lti::Overlay with
`o = Lti::Overlay.create!(registration:, updated_by:, account:, data:
{ hello: 'world' })`
* the overlay should have references to the registration, the user who
updated it, and the account it belongs to
 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 overlay's updated_by to point to that user:
```
o.updated_by = xu
o.save!
```
* that should succeed and `o.updated_by` should correctly
reference that cross-shard user
* create another Overlay with a cross-shard user for both
created_by and updated_by - it should succeed

Change-Id: I60dabeab09ac115ab766d11f6e0ec2d8323735f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/356511
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2024-09-09 20:39:38 +00:00
Mysti Lilla 1b7bdca0ea Ensure BP children can fix media
refs RCX-2188
flag=none

Test plan
- Set up a blueprint child with locked
  rich content and a bad link that looks like
  /courses/:course_id/file_contents/course%20files
  /media_objects/:media_id.mp4
- Run the data fix up and ensure the Blueprint child
  is able to show the video

Change-Id: Ife7ea69b0f9195b3e4b105d70d56d84103d816ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355396
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2024-09-06 21:49:02 +00:00
Sarah Gerard d80a56166b Remove old visibility views
this removes any references to the old visibility
views and drops them from the database. These views
were extremely slow and are uneccessary with the new
student visibility services. The original views (pre
selective release, for assignments and quizzes) should
still remain.

closes LX-1747
flag=none

test plan:
- run migrations - bin/rails db:migrate
- in a rails console run ActiveRecord::Base.connection.views
- ensure that the only views in the list are
  assignment_student_visibilities and
  quiz_student_visibilities
Change-Id: Ia4cce9ad83e3e8fb749d5148c60ed1a8df53ba46

Change-Id: I63504469e50a4c62f1e10328d7668a9fdae76052
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/356753
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2024-09-06 21:19:12 +00:00
Spencer Olson 283b6ae6d1 update version grades on points scheme assignments
closes EVAL-4437
flag=none

Test Plan:
- Create an assignment using a points-based grading scheme
- Submit to the assignment as a student
- Grade the student as a teacher
- Submit to the assignment as a student again
- Grade the student as a teacher, again (different grade this time)
- Go to SpeedGrader for the student. notice in the dropdown for previous
  grades that it shows the correct grades
- Go into a rails console and manually change the `grade` and
  `published_grade` (without triggering callbacks) on the Version
  objects associated with the grades:

    sub = Submission.find_by(
      user_id: <student id>,
      assignment_id: <assignment id>
    )

    sub.versions.each do |version|
      model = version.model
      model.grade = "bad grade!"
      model.published_grade = "bad grade!"
      version.update_columns(yaml: model.attributes.to_yaml)
    end

- Go to SpeedGrader for the student. notice in the dropdown for previous
  grades that it shows the incorrect grades ("bad grade!")
- Run migrations
- Go to SpeedGrader for the student. notice in the dropdown for the most
  recent grade that it shows the correct grade. For the previous grades,
  it should show "bad grade!".

Change-Id: I874bbf30e5f8988cbce1c27786cac2be121948bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354429
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2024-08-29 18:15:16 +00:00
Jackson Howe 201a1d8b63 Drop UserNote entities
All canvas-lms application code used by these entities was removed in
2332ad4000

flag = none
closes LX-157
[skip-crystalball]

Test plan: specs pass

Change-Id: Id8dec0e624a71ceb31da24ef62a652d3316635e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355576
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2024-08-27 16:40:32 +00:00
Tucker McKnight 8c45def786 Rerun fixups to backfill lti registrations and acc bindings
fixes INTEROP-8800

flag = none

test plan:
- the DataFixup classes being run here already have tests, this is
  just causing them to be run again in a migration
- see commit 47c1db for the actual change that is being run, and
  its test coverage

Change-Id: Ibae7b9f0c3c4d19c95be0aae3176b5007a47e0a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355619
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-08-27 15:32:44 +00:00
Tucker McKnight 786e5249d2 Create a column linking a tool config to an lti registration
Lti::Registrations should have an optional manual_configuration
attribute on them that references the tool configuration for
that registration's dev key.

I.e. reg.manual_configuration == reg.developer_key.tool_configuration

test plan:
- Have a couple of LTI 1.3 tools installed that were *not* installed
  by dynamic registration
- Run migrations
- See that the Lti::Registration records for those tools now have
  a manual_configuration attribute on them

flag = none

fixes INTEROP-8761

Change-Id: If2e31f01c6ae59097eb790012f7d24a1eded065c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355371
Migration-Review: Cody Cutrer <cody@instructure.com>
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: Tucker Mcknight <tmcknight@instructure.com>
2024-08-21 17:38:19 +00:00
Csaba Csuzdi 5b7507efda Always_on RCE favorite tools can be removed from favorites
Some tools are displayed by default on RCE toolbar.
From now on, these tools can be removed or added to the toolbar
just like any other LTI tool with editor_button placement.
Always_on tools don't count towards the 2 app toolbar limit.

closes INTEROP-8635
flag=none

Test plan:
- do not run migrations yet
- create a developer key (1.3 test tool) with
  editor_button placement
- add the developer key id to Setting:
`Setting.set("rce_always_on_developer_key_ids", "#{dk.id}")`
- add the tool with the new devkey (on_by_default tool)
- have at least 3 other tools registered
  with other developer_key(s). (normal tools)
- open an RCE editor (like Settings / Announcements / New Announcement)
- check if on_by_default tool is NOT on the RCE toolbar
  (next to the socket icon)
- have 2 subaccounts
- in subaccount 1 add a normal tool to RCE toolbar
- in subaccount 2 do not do anything

- run the migrations

- check again, the on_by_default app should be on the RCE toolbar
  in root account and every subaccount
- check in subaccount 1 if normal tool is still added to
  RCE toolbar as well as the on_by_default app
- check in subaccount 2 if the on_by_default app is on the toolbar
- check in root account if on_by_default app is on the toolbar
- in root account: turn OFF the switch of the on_by_default tool
- check the RCE toolbar, the tool should disappear

- in root account / on Settings / Apps page:
  - add two normal tools to RCE toolbar
  - switch of the other normals should be disabled
  - switch of the on_by_default tool should NOT be disabled
  - turn on the on_by_default tool
  - check if all 3 tools appear on the toolbar

Change-Id: I7319a6a0ff7ec6f6765033a15ca6bcfde65822d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353174
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
2024-08-21 15:37:41 +00:00
Jacob Burroughs 227488498d Remove unnecessary test table
Change-Id: If9441780317e9b79181529b7399396cee2bd8aba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355233
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Migration-Review: Alex Slaughter <aslaughter@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2024-08-15 20:44:58 +00:00
Cody Cutrer 0fdb1bea18 squash old migrations 202403
closes AE-1068

Change-Id: I141a1f7263ac01cfc3313851f57b576e71ec0138
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355208
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-08-15 20:22:04 +00:00
Cody Cutrer 2a6ced7e83 squash old migrations 202402
refs AE-1068

Change-Id: I63a45261536e6df44967cbaeb2b5584b02c6c18c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355203
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-08-15 20:21:52 +00:00
Cody Cutrer 842b155fa9 squash old migrations 202401
refs AE-1068

Change-Id: Idb2a1bbfe29c641f49dec910f314d9d6a583e40a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355201
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: 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>
2024-08-15 18:26:39 +00:00
theo sorriaux 2787656ed1 Discussion Edited At
refs VICE-4168
flag=react_discussions_post

Test plan:
- Create a Discussion topic
- Post a reply
- The topic should no longer display the reply date as the edited date
- Try to edit the topic title or message
- The topic should display an edited date
- The same behaviour should be observed on Announcement and nested replies

Change-Id: I0ca6c172acea867c439296c0267a387910a02252
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354013
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Tamás Balogh <tamas.balogh@instructure.com>
QA-Review: Dora Csolakov <dora.csolakov@instructure.com>
Reviewed-by: Roland Beres <roland.beres@instructure.com>
2024-08-13 08:19:44 +00:00
Cody Cutrer bca3c9165c send unique notification when an access token is created on a user's behalf
closes AE-1081

Change-Id: I5f9a741c30973ccca7d0ddb10ca9d3470089e32d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354550
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-08-08 15:55:37 +00:00
Dora, Csolakov 0490b39866 Fix discussion_type on Discussion Topics
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>
2024-08-01 14:24:02 +00:00
Kai Bjorkman ddae33343f datafix for points based scheme grades
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>
2024-07-30 21:07:01 +00:00
Dustin Cowles df83d7ad7a fixup usages of deprecated getPageContent scope
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>
2024-07-30 16:36:21 +00:00
Ryan Hawkins 88e7f898ee backfill Lti::RegistrationAccountBindings
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>
2024-07-25 14:45:48 +00:00
Riley Crahen e286b49874 Fix pagination in pages assign to tray
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>
2024-07-24 20:10:50 +00:00
Ojaswee Chaudhary 22b61580e0 build rubric import backend
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>
2024-07-24 19:06:13 +00:00
August Thornton 3ea6204e2e make user_id nullable in web_conferences
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>
2024-07-23 16:57:19 +00:00
Daniel Vincze 1e1cf33b11 chore: resubscirbe archived conversations
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>
2024-07-23 14:08:28 +00:00
Jason Anderson 938bff1850 Remove 'inbox_settings_ooo_snapshot'
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>
2024-07-22 22:00:37 +00:00
Tucker McKnight 3603f76ed8 Fixup to create Lti::Registrations for existing dev keys
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>
2024-07-22 15:15:46 +00:00
Paul Gray 7f8b6c34a8 Store Dynamic Registration URL
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>
2024-07-17 18:25:04 +00:00
Jason Anderson 22fdbe4a96 Add 'inbox_settings_column_hash'
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>
2024-07-08 17:19:43 +00:00
Cody Cutrer d6023865f2 bundle update rubocop
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>
2024-07-05 18:54:07 +00:00
Xander Moffatt cd58810787 save unified_tool_id on new LTI Apps Manage page
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>
2024-07-05 16:03:54 +00:00
Cody Cutrer c50cab6c98 drop Rails 7.0 support
closes AE-882

Change-Id: I6d1205e826f3bf83528c957592fbf677a03ab508
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350884
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-07-05 15:30:54 +00:00
Spencer Olson ec1e7725f7 null out auto caption status before changing check constraint
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>
2024-06-25 15:08:37 +00:00
Derek Williams 3684e368ce remove sleeps from VideoCaptionService
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>
2024-06-25 03:37:15 +00:00
Cody Cutrer 40c73dfbd2 reduce locking from adding media_objects.chk_auto_caption_status_enum
Change-Id: I503b278d077ecaf7f79ac8ca4b41e731f33c259b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350909
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2024-06-24 21:16:17 +00:00
Daniel Vincze 36987ed388 feat: add root account reference to collaborations table
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>
2024-06-21 16:59:40 +00:00
Jason Anderson 19965789e2 Inbox OOO Auto Response - Backend
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>
2024-06-18 18:04:44 +00:00
rzana 36d55da1ba add user input to discussion summary prototype
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>
2024-06-17 09:13:26 +00:00
Csaba Csuzdi 8e450f7556 add unified_tool_id to lti_tool_configurations
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>
2024-06-14 09:03:28 +00:00
Bence Arpasi 9d4a8e055d add unified_tool_id to CET
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>
2024-06-14 08:59:28 +00:00
Derek Williams f60b8f7f67 add auto caption status to media objects
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>
2024-06-13 17:54:00 +00:00
Xander Moffatt 1be0eb504c remove LTI Registration-Binding foreign key
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>
2024-06-12 16:46:54 +00:00
rzana 7a24a5d0eb refine and localize summaries in an additional step
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>
2024-06-10 14:31:17 +00:00
Cody Cutrer 669c4cabac remove Cassandra support for page views
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>
2024-06-05 15:15:34 +00:00
Martin Yosifov 351110fc19 Allow User to Add Their Name Pronunciation to Profile
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>
2024-05-30 18:12:16 +00:00
Steve McGee 80b6535a00 sync DeveloperKey and Lti::Registration on save
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>
2024-05-28 22:05:02 +00:00
Martin Dubai 1bb93f9cf3 Add index to enrollments query
Improve performance of discussions topics index query

fixes VICE-4245
flag=none
test plan:
- tests should pass

Change-Id: I87dda53dc076ad3297a01661cab18f23df05e4d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348329
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ádám Molnár <adam.molnar@instructure.com>
Reviewed-by: Szvetlin Tanyi <szvetlin.tanyi@instructure.com>
Reviewed-by: Gergő Szendrei <gergo.szendrei@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Migration-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Martin Dubai <m.dubai@instructure.com>
2024-05-28 15:44:30 +00:00
Michael Hulse 585a805a3c add index for Group context on updated_at
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>
2024-05-15 19:06:24 +00:00