Commit Graph

2410 Commits

Author SHA1 Message Date
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
Jeremy Stanley c7f1a30744 pseudonym login attribute migration
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>
2024-05-07 03:50:58 +00:00
Jackson Howe 7b47669509 Update indexes on assignment_override_students
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>
2024-05-06 19:01:17 +00:00
rzana ec3b5dbb32 add migrations and models for discussion summary prototype
refs ADV-49

flag = none

Test plan:
- tests pass

Change-Id: I834e1d7720686d59da9a5f2cdcdee1cb1fe850e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346722
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Migration-Review: Cody Cutrer <cody@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-05-06 15:46:51 +00:00
Ryan Hawkins e0648b1833 Remove extraneous fields from IMS Registrations
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>
2024-05-02 22:15:17 +00:00
Cody Cutrer 986a62813d add new pseudonyms check constraint in a concurrent-friendly way
Change-Id: I1cb15f96c23937746a104b536b05395d01ee424e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346565
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2024-05-02 21:04:08 +00:00
Cody Cutrer 8e34368203 start keeping track of _all_ possible login attributes for Microsoft auth
refs AE-951

Change-Id: I342be4b5b16f3532d5af11471e7ea13ea01fb7a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346500
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2024-05-01 18:00:20 +00:00
Omar Gerardo Soto-Fortuño 31ff616274 Add Checkpoints Assignment Created notification
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>
2024-04-29 18:26:45 +00:00
Jeremy Stanley 222b91ab7a smart search: index on demand
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>
2024-04-27 00:52:52 +00:00
Ryan Hawkins 7d9d45171e Validate LTI message_type for placements
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>
2024-04-25 19:22:22 +00:00
Xander Moffatt c6cddcd6a4 create Lti::RegistrationAccountBindings model
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>
2024-04-23 22:28:25 +00:00
Ryan Hawkins b2ff0fe722 Create Lti::Registration table and model
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>
2024-04-19 17:30:13 +00:00
Cody Cutrer 7b6632246a drop long-deprecated group category columns
Change-Id: I877c88876ca101e112428671f1df3591f65e5b55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344355
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-04-09 20:19:40 +00:00
Cody Cutrer 854915feb0 drop long-deprecated enrollments.graded_at
Change-Id: Ia0a168a3c6207837c876cd14eb0c183330776a77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344378
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-04-09 20:19:22 +00:00
Tucker McKnight 4d18531bc3 Make ContextExternalTool.not_selectable be not nullable
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>
2024-04-05 22:01:17 +00:00
Cody Cutrer fb6f3023f9 rubocop: enforce all migration-related Rails cops
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>
2024-04-03 19:17:11 +00:00
Sarah Gerard 04ff10a7b9 Add visibilities for learning objects
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>
2024-04-03 18:04:35 +00:00
Aaron Ogata b1c642a5c2 drop unused external_feed_entries author columns
refs AE-855

Change-Id: I3bf8ec9a4d992c69312591c920b378e38db3ed0e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344203
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: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2024-04-02 21:11:36 +00:00
Martin Yosifov 25a34d6471 Create Model for Inbox Signature Block
closes OUT-6288
flag=inbox_signatures

Test plan:
- Jenkins passes

Change-Id: I0af39aaf4ceeb2673181be0174cbe079936f3afb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343544
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: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-04-01 23:58:44 +00:00
Evan Battaglia 12de7f1169 support startDateTime in the Line Items API
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>
2024-03-26 18:58:20 +00:00