- Actually enumerate columns when any are ignored to avoid loading unknown attributes
- Remove old ignored_columns so we don't unnecessary bloat queries when not ignoring
- Various minor fixes for places we do unusual AR things to ensure they work with explicit columns
- Tweak some migrations to clear column information so future migrations are happy
refs AE-747
Change-Id: I60b1c3eae73f4fa9f0b6b6ab4d2b00abd8f8395f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339971
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: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
in rails 7.1, active? will not force a connection. verify! works
in both 7.0 and 7.1, though - checking active? if it's already
connected, or connecting if it's not
Change-Id: I54b93761e8c3a5bc5e0c7943db3eb14a05c7912f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341793
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
why:
* prevents case where line item creation fails, but resource link
succeeds
* this half-migrated state means it tries to recreate the resource
link every time it launches, and breaks the assignment
* this only happens in migration jobs, which aren't already in a
transaction
* this also requires a data fixup for existing half-migrated
assignments, which "resets" the assignments by hard-deleting the
dangling resource links. this is safe because when these
assignments are migrated FRD, the resource link and line item will be
properly created with the same data
closes INTEROP-8510
flag=none
test plan:
* install the vercel lti 1.1 test tool in your root account (need
to run it locally to make the 1.3 version work)
* create a subaccount, and a course in that subaccount
* _without this commit checked out_:
* run these steps:
* clear out any installations of the 1.3 version of that test tool you
may have
* create an assignment associated with the 1.1 tool in a course
in the root account
* create another assignment associated with the 1.1 tool in that
course
* install the 1.3 version of the vercel test tool in the _sub_
account - very crucial it's here and not the root account
* in the rails console, verify that:
* the assignment in the subaccount has the right 1.3 models:
```
a.line_items # should have one
a.lti_resource_links # should have one
```
* the assignment in the root account should have a resource link but
no line item - this is the bug
* try launching the assignment in the root account - it should fail
* check out this commit
* run the data fixup: `DataFixup::Lti::RemoveDanglingResourceLinks.run`
* the assignment in the root account should no longer have a
resource link, and launching should succeed - and launch 1.1
* repeat the above steps under "run these steps" - make sure to remove
the 1.3 tool installation
* the assignment in the root account should _not_ have a resource link,
and still launch correctly
Change-Id: I64418c22546204f6be9e369832f91b623ea39794
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341706
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@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>
closes LF-1045
flag = differentiated_modules
Test plan:
- Create a page
- In the rails console, add an `unlock_at`, `lock_at`, and an
override
- GET /api/v1/courses/:course_id/pages/:page_id/date_details
- Expect to see the base availability dates, the page id, the
override, and no due dates
- Repeat with a file using GET
/api/v1/courses/:course_id/files/:attachment_id/date_details
- Repeat with both an ungraded discussion using GET
/api/v1/courses/:course_id/discussion_topics/:discussion_topic_id
/date_details
- Create a graded discussion in the UI (or you can do it in the rails
console, but note that the base dates and overrides are applied to
the topic's assignment, not the DiscussionTopic object)
- Use the same endpoint to get date_details for the graded discussion,
and expect `due_at` in addition to availability dates
Change-Id: Ied6d65f5fbff8773d033297f8e750b34b7ac59e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341707
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
* use Syslog::Logger instead of writing our own
* extract and share the log formatting between Syslog and file logging
Change-Id: I266713e4c390f11d1650afcf9005059995aca922
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341759
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
after the jquery upgrade, there was extra padding
on the calendar event edit dialog and the background
color only appeared on focus/hover
fixes LF-1320
flag=none
test plan:
- navigate to the calendar and add or edit an existing event
- expect the modal to appear and have the correct styling
- there should be no extra padding or border around the modal
and the background color of the tabs should appear
Change-Id: I9f289ef82fad65c46d652c875909aa2eb7d31d8e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341773
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
refs EVAL-3993
flag=platform_service_speedgrader
Test Plan:
- Verify you can fetch the previewUrl from a Submission or
SubmissionHistory type. It should return the correct version number
in the URL based on the attempt number (not submitted: version = 0,
first submission: version = 1, second submission: version = 2, etc.)
Change-Id: I7d213e282a383a6b0df9589fd760a0f9232c1051
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341748
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
test plan: specs
flag=none
closes FOO-4299
Change-Id: Iad983020e2bdc00466e10227b9aaac786510a905
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341698
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes LF-1180
flags=none
Test plan
- Set up 2 assignments and have a student
submit to 1 of them
- Add both assignments to a module
- Check api/v1/courses/:course_id/
modules/:module_id/items and
ensure the unpublishable flag is true
for the assignment with no submissions
and false for the assignment with submissions
Change-Id: I10a2d87334e35be87434360ce83d06a71734052f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341601
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>
Product-Review: Mysti Lilla <mysti@instructure.com>
closes QO-1042
flag=none
Test plan:
- automated tests pass
- Open a CQ edit view. Add this to the end of the url and hit enter
?_=1&return_to=javascript:alert(`sadness`)
- Note, you NEED a parameter BEFORE the return_to param to test correctly
- Note, you NEED to load the page with that in the url (editing the url
after loading will not work)
- Hit save.
- Observe no alert appears.
Change-Id: I883a9a39d69b399c887a44e443f36140052f85b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341686
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
QA-Review: Jared Crystal <jcrystal@instructure.com>
Product-Review: James Logan <james.logan@instructure.com>
flag=none
refs LF-1146
Test Plan:
- Jenkins passes
- Content migrations work without changes
Change-Id: Ide3d75a621e097c79d30c8972df0ea27e306848f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341756
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>
Build-Review: James Butters <jbutters@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
This flag has been on for all accounts for about 90 days now;
we do not expect to have to revert it. (This is a hidden flag
that customers have not been able to toggle themselves.)
This can affect open source users, who may not have been aware
of this flag before. LTI launch iframes will now have an
id with a unique, three-digit number in it. (E.g. "#tool_content_456".)
If someone was previously scraping the page and finding the iframe with
the CSS selector #tool_content, they can now find that with [id^=tool_content].
test plan:
- a page with multiple tool placements on it,
like the assignment edit page with a tool
in the assignment's description, loads all
tools that you expect it to.
fixes INTEROP-8304
flag = lti_unique_tool_form_ids
Change-Id: I840e1096f59f17851e0b0e8591e69a7a4e0f62a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341592
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: Tucker Mcknight <tmcknight@instructure.com>
formatter needs to be assignable, even if we don't use it
Change-Id: I9b87b26f5f524ca795b250cce5208052391adbef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341746
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This fixes some failing tests when upgrading to jQuery 3.5.
In jQuery 2.2.4 when $todoDateInput.show() is called it adds
'display:block' which is how we checked for the input being
displayed. In jQuery 3.5 it affects the styles differently
depending on the case. In this particular case it removes
the 'display:none' css from the input style. This change
updates checking for the input displaying by checking it
no longer has 'display:none'.
refs FOO-4260
flag=none
Test Plan:
- Jenkins Passes
[skip-crystalball]
Change-Id: Icd55c60bcc46bf10ebe652635489f47e2077b40c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341381
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes LF-1244
flag=none
test plan:
- Create an event with a frequency (not select "not repeat").
- Select an event from the series.
- Edit it using the Edit page or the form modal.
- Select "Does not repeat".
- Submit it.
> Verify that the "All", "This and following" and "This" modal
is not displayed.
> Verify that all the events in the series were removed except
the selected event.
> Verify that the previous behavior of event is working as
expected.
Change-Id: Ibc95d6fcd5e4f67536c2d09a172bf44241ee455a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341606
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
These require a Authentication header with valid LTI Advantage token so
are not suceptible to CSRF. For some reason, a partner was sending a
normandy session cookie, which was returning a confusing 422 without any
more info.
closes INTEROP-8480
flag=none
Test plan:
- before this commit:
- make a request to a non-GET LTI advantage endpoint, e.g.
tok web.canvas-lms.docker/api/lti/courses/1/line_items/15/scores \
userId=01b5dfe9-95aa-47dc-859c-c8b185695b4c \
activityProgress=Completed gradingProgress=FullyGraded \
timestamp=2023-11-08T21:00:00Z
- log in to Canvas in a browser. In dev tools choose an HTTP request made to
a HTML page while logged in. Right click and click 'copy as cURL'. The
clipboard should now contain a Cookie with normandy_session
- Copy the cookie header and add it in to your request.
- The request should now fail with a 422.
- after this commit:
- make the same request that failed with a 422. It should now succeed.
Change-Id: I8211809266698bebc0e995bfa384c5b6210d30b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341105
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>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
fixes LF-1308
refs LF-1251
flag=media_links_use_attachment_id
Test Plan:
- Have an attachment in a different shard to it's own root account
- Have the attachment's media object in that root account's shard
- Have a second attachment in a different shard to it's user
- Have the attachment's media object in that user's shard
- Check you can use both attachments on RCE and get them loaded
Change-Id: I7d924c706cd4641d303dc4e9358a42ef2a8e9828
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341017
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Previously we only set default policies for the users
main communication channel.
Now all new communication channels will get default
notification policy frequencies .
fixes VICE-3870
flag=none
Test Plan
1. Create a new confirmed communication channel
2. Open the notification settings
3. Verify that the new CC has default notifcation
frequencies.
Change-Id: Ia8d2a8003bd6c4d9b805cf88129613c26c794e55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341581
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
Refs FOO-2929
flag=none
The switch from webpack to rspack has introduced
loading errors for the parts of formatjs's polyfills
of missing browser locales. I'm unclear on why some
dynamic imports are failing, but the fix seems to be
to remove the /* webpackIgnore: true */ directive
which rspack does not recognize. I also went straight
into formatjs rather than our own dist directory for
anything other than the locale files themselves.
Test plan:
* Be in Google Chrome
* Change your locale to Welsh (Cymraeg)
* Reload your browser and watch the JS console
* You should see success messages for the polyfills
of locale "cy" and no error messages.
Change-Id: If9b92ed9a51dd5ceeeb4fd8d6535fa2dae710f1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341695
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
This commit adds and enables migrate mute option to
jquery.instructure_jquery_patches.js which is loaded first in
ui/index.ts. This change will disable jQuery migrate console
warnings so that they do not appear on a prod build.
unblocking jquery upgrade path
refs FOO-4260
flag=none
test plan: tests pass
[skip-crystalball]
Change-Id: I3449a2547c8c1129878654ba020531ba94a8c629
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341684
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag=none
fixes VICE-4108
for discussion entries, the avatar
will no longer have an href, since it does
not have an href, it will now render
as a span insted of an a
test plan:
- turn discussion redesign off
- visit a discussion
- verify avatar in both discussion topic
and discission entries no longer links
to its author's profile page
Change-Id: Idf71510c7337cac71a9aa9dcea739785822e5ce1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341563
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
fix issue where dates in discussion redesign were displayed
using the course setting timezone instead of the user setting
timezone
fixes VICE-4087
flag=discussion_react
Test Plan:
- have a user setting timezone that differs from the course setting
timezone, such as having the user setting timezone as tokyo while
the course setting timezone is local
- create a discussion with varying dates such as due date, unlock, and
until
- confirm that the dates set in the date time inputs match the date
in the discussion topic itself and the discussion index page
- play around with other dates such as in a graded discussion and
confirm the dates set in the date time inputs match whatever is shown
in the discussion topic
- confirm that discussion replies and posts are displayed using the
user setting timezone instead of the course setting timezone
- this includes split screen view threads and normal view threads
- this also includes when editing a discussion reply and post
Change-Id: I0b5582328ed671b513de2ffccbc6ed1d65602d2d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341553
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag=enhanced_rubrics
closes EVAL-3942
Test Plan:
- repeat this test plan at the course and account
level
- create a rubric
- click the kebab menu
- click duplicate
- click the submit button on the modal
- verify the rubric is duplicated with a name
formatted as "[original rubric name] Copy"
- verify the rubric is duplicated with the same
criteria, ratings, points, and descriptions
- click the kebab menu
- click delete
- click the delete button on the modal
- verify the rubric is deleted
- verify the rubric is no longer in the list
Change-Id: I6f27295a3e76cb8725b1c618be69cd9326e742f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339988
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
closes AE-793
flag=none
test plan:
- specify invalid pg service
- specify `service` in database.yml
- verify connection still succeeds on second attempt
- verify Sentry error is collected
- verify if service is valid, it is used
- verify if second attempt fails, error is raised
Change-Id: I9e2d5e9f8f70a4c30ed2bfb092f9a6efd5141d46
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341584
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes LF-1221
flag=instui_header
test plan:
- goto modules page for a course
- check that new header match specifications
Change-Id: Idd77b2fb01778d337207c4dedb4aeefb18ac5d45
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341101
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Alvaro Talavera <alvaro.talavera@instructure.com>
add screen reader label for the token details and remove token links
in the approved integrations page
fixes VICE-4120
flag=none
Test Plan:
- have some Approved Integrations in the user settings page
- turn on voice over
- navigate towards the details link for one of the integrations and
confirm that the screen reader reads "(Name of App) Details"
- navigate towards the remove icon for one of the integrations and
confirm that the screen reader reads "Delete (Name of App) Token"
Change-Id: I3eb46f6c5e6a8f6e5d063415419de77a27182a53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341583
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
closes EVAL-3958
flag=speedgrader_studio_media_capture
test plan:
- talk to Derek about setting up DynamicSettings.yml
- restart canvas
- visit speed grader
- add a comment where you record a video
- make sure you're talking in the video
- save the video
- wait a few minutes (~5-10 maybe....)
- make sure your delayed jobs are running
- reload the page
- open the video comment and click the CC button
- ensure there's an option to show captions
Change-Id: I0032046d89280e9c8c4e450501039fc4c91407bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341184
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
closes LF-1258
flag=differentiated_modules
Test plan:
1-Go to the edit assignment page
2-Open the assign to tray
3-Do some changes
4-Click on cancel
5-Expect the tray to be closed
6-Expect not to see the pending changes pill
7-Open the tray again
8-Expect not to see the changes you made
Change-Id: I3dd33cb29a2e9c4a1994b75bb03295b42f7a67ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340834
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>