why:
* doing an HTML meta-redirect or a JS redirect brings the CSP header
into play, which wasn't needed in a 302 redirect
* add the destination domain to the CSP header so that the redirect
doesn't fail
* allows us to keep testing if an HTML redirect solves INTEROP-8200
* also allows us to enable this setting for a single domain instead of
globally for better testing
refs INTEROP-8200
flag=none
test plan:
* install the 1.3 test tool in a course
* have multiple local shards
* in a test tool rails console, update the Platform's
authentication_redirect_endpoint to point to your second shard
* run
```
Setting.set("interop_8200_session_token_redirect/canvas.docker", "true")
```
in your canvas rails console (subbing your first shard's domain for
canvas.docker as neeeded) and restart your canvas containers
* launch the tool
* without this commit, the authorize_redirect will fail with a CSP error
* with this commit, the authorize_redirect will succeed and the
tool will launch
Change-Id: Ifd81fdbdd76fd97c67ff81a9e9b112679053aaff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327027
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>
Product-Review: Paul Gray <paul.gray@instructure.com>
created LF-731 to fix
Change-Id: I6f756f5f631f08f9fbd9d2d856ae9301e6805634
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327042
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes LF-661
flag=none
Test plan
- Go to the syllabus page in a course
- Check the edit button and ensure it's actually
a button (and is read as such in a screenreader)
- Verify it reads something ("collapsed" in Safari)
to let you know the edit portion is not visible
Change-Id: I13236217018652bf807e135e984285a3236c8eb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
refs LF-611
flag=differentiated_modules
qa risk: low
test plan:
-have the flag enabled and go to modules
-open the assign to tray and switch to 'settings'
-update name and / or lock until time
-click 'update module'
>in network tab, confirm the request is made with your updates
-refresh the page
>observe that your updates are reflected in the dom
-open the tray again for the module you updated
>confirm the updates you made flow through to the tray
Change-Id: I80d4f625608782e5873d933ee4abe58207dcad3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326776
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
either gems that are not actually used directly by Canvas,
or are transitivie dependencies of another gem that's highly
unlikely to remove that dependency (i.e. no need to specify
inst-jobs or switchman when including switchman-inst-jobs;
it will always require those two)
Change-Id: Idc4f85e09158c9906da6b608ceb969815e535933
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326461
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
make it match the mismatch message for other gems more closely
Change-Id: Iab0a4089eb7862bc24504041389f10345eecacbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326813
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>
fixes CANVAS-KDBB
since the json Faraday middleware will parse them into a Hash,
instead of a string
Change-Id: I80dddcab4e4bc5fa5e3d726954bc85a4874de598
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326962
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>
closes LF-659
flag=none
Test plan:
- With screenreader ON
- Navigate to calendar
- Open the calendar feed dialog
- Ensure the dialog has an accessible
name, the same as it's title
Change-Id: Ieb344a6c3f46e231585a466f39f05f87bdace5ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326919
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
closes LF-721
flag=calendar_series
test plan:
- click the + to create a new event
- set the date to a leap day (e.g. Feb 29, 2024
- open the frequency picker
> expect to see "Annually on Feb 29"
- click on custom and save
> expect to see "Annually on Feb 29, 5 times"
- submit
- when the api completes, click on one of the events
you just created
> expect the natural lang description to be correct
- click on one of the events and edit
- change the title and save
> expect the title to change on all events
(you can click on the month-year link at the top
of the calendar and type in a month-year
(eg. February 2028) to go there)
Change-Id: Ibd184e10597cf014ffa0ee877ae1911250330923
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327007
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
refs LF-660
flag=none
Test Plan:
- In Calendar, open the appointment gorup
creation form modal
- Navigate the form with the screenreader
- Check that Time Range is called out whenever
you navigate into either time range field.
Change-Id: I036c759188d08afd047d1ab7f9569a7df2e421a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326909
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
refs LF-660
flag=high_contrast
Test plan:
- With high contrast ui ON
- Check that the following calendar modal forms have
inputs with proper border contrast
To-Do item creation form, assignment creation form,
appointment creation form.
Change-Id: I07207efe5eef8e4b17e663cd45133d6473dbdee7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
test plan:
- the "what it does" and "additional considerations" text should be
visible in the permissions sidebar (see FOO-3701)
flag=view_admin_analytics
closes FOO-3787
Change-Id: I5e79ed80c3b65a79ce5c5e049237b268e8f1a7b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326916
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
flag = none
closes LF-713
Test plan:
(This is just regression testing the feature)
- Set up some account calendar events in the next week
- Go to the planner and make sure the events appear
Change-Id: Ida4d01ad72d4e0c67a55e6a67cc0ba6384d01464
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326918
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
closes LF-714
flag = none
Test plan:
(This is just regression testing the auto subscription feature)
- Go to account calendar settings and make sure you can flip between
manual and auto subscription type
- Visit the calendar and expect to see events for auto subscribed
calendars, even if the user hasn't previously subscribed
Change-Id: I4a1d7188b15c6722457c77c1347668003aabb6c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326785
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
by replacing *byRole with *byText
flag = none
Test plan: specs pass
Change-Id: I4a2267caa451dfa42a686da2f6b245b7c68d1556
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326944
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Fixes FOO-3768
flag=none
Test Plan:
* Have a cross-shard version of a existing user that still has the
old lti_context_id. (see ticket for context)
* The new user does not have an LTI context id, create one
* If the existing user was deleted, it's lti_context_id is nullified
* Otherwise, the new user gets a new randomize (not hashed global_id)
LTI context ID.
Change-Id: Ibf5a35828051ace4101fe7bfade96f9085e39ab5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326878
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jason Perry <jason.perry@instructure.com>
Product-Review: Jason Perry <jason.perry@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
created another ticket (LF-716) to clean this up
Change-Id: I0a739ce2e1c08b67dbc551d33a15d58a5852537a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326934
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
closes EVAL-3359
flag=enhanced_individual_gradebook
test plan:
- create a course with a student and a teacher
- create at least three assignments
- put them in one assignment group
- create rules to drop certain assignments(maybe try a couple
different combos)
- go to the traditional gradebook and grade some of those
submissions and ensure some of the cells are labeled as dropped and
note which assignments are dropped for that student
- go to the enhanced srgb and ensure that the when selecting the
same assignments and that student, that the grading results shows
a message reading: 'This grade is currently dropped for this
student.'
- ensure when switching between student and assignments that the
message is hidden and displayed appropriately
Change-Id: I686be76a1de96c45cdc1cbe46f646a4b2dc289d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
refs LF-660
flag=none
Test plan:
- In Calendar, open the appointment group
creation form modal
- Try out the checkbox labels and make ensure
they toggle the checkboxes properly
Change-Id: I5e330dd603e19076bcd17e6ff69702a58e7d8304
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
because of course there are three places for this (ノಠ益ಠ)ノ
Change-Id: Icc8e6dd9c4f35685a282af70162e1a911c9a6eca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326821
Reviewed-by: 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>
flags = new_quizzes_third_party_imports
Test Plan:
- Flag no longer appears.
Change-Id: I978c6872cd5f91b4b35e6cbf30b9f1a2e00b6d08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326456
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ferenc Marcsó <ferenc.marcso@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
If the delay posting at is in the future, the button should say 'save'
if the delay posting at is unchecked or in the past, the button should say 'publish;
fixes VICE-3704
flag=none
Test Plan
1. Create a delayed announcement
2. Verify that when you delay the announcement it changes the submit button from
2a publish to save
3. Edit the announcement
4. verify that on edit, the submit button says "save" if it is delayed
5. uncheck the delayed_post_at checkbox
6. verify that the submit button says "publish"
Change-Id: I224178247669becd392df538caabad6e0d69ea36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326455
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
These started out as 3 separate commits, but the fixes
were intertwined and keeping them separate and stacked
on one another was proving to be too much of a hassle.
It should all work after this.
closes LF-629 LF-634 LF-632
flag=calendar_series
LF-629 "Update calendar correctly when editing recurring events"
Fixing this uncovered the same bug in the monthly view,
but it was just less noticable.
test plan:
- create a recurring event
- in an of the calendar views
- edit the title one of the events
- save any of the this, all, following options
> expect the events in the calendar to display the new title
- edit the start time of an event, save all and following
> expect the events in the calendar to show the start time
- try editing other stuff and expect it to work too
- edit an event in a series and shorten the series length
- save All Events
> expect the deleted events to be gone from the calendar
> expect them to be gone from the mini calendar
- change the title of 1 event and save "this event"
> expect just the 1 event to be updated
- change the title of the last event and save "this and following"
> expect just the 1 event to be updated
LF-634 "Stop FrequencyPicker changing when date on new event changes"
The root cause was not using the local state value for rrule, but
keying off the event.
test plan for 634
- in the calendar click on a date to create a new event
- in the modal, change the frequency
- then change the date
> expect the freq picker to change to reflect the new day
of the week
> unless it's a custom freq, in which case it remains the same
> this should work for weekly, monthly, and yearly frequencies
LF-632 "Update series events when changing calendars" test plan for
- have a teacher with a published course
- create an event series
- pick an event in the middle and change its calendar.
change just this event
- click on that event again, edit, submit, and choose all following
> expect all or all following events to reflect the new calendar
- click on each event
> expect the data in the popup to be correct
- switch to a different view
> expect the changes to the events to be reflected there too
Change-Id: Ie6ed678cf60922cd4660a3e75262b542d3e64a4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326203
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
to deal with :info offenses
Change-Id: I6dacd48079f15dd0bcfc5c37acd9097f52c105ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326818
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
when adding a new course or user, the required input boxes have a red
border that disappears when you select the input field. this change
makes it so that there is a red asterisk that stays next to the
visual label for accessibility.
closes FOO-3761
flag=none
test plan:
- go to courses or people page
- select +course or +people button
- check that the asterisk shows next to the visual label for the
required fields
Change-Id: Iaa9f021be450c6c51421d21c47c535bdca7c172e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326613
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
closes VICE-3199
flag=react_discussions_post
test plan:
- Specs pass.
- No behavior change, current specs are enough.
- Cursory testing of inline view.
- Should load all entries associated to a root
entry without executing multiple queries.
qa risk: low
Change-Id: Ic54f14173432735f3d29bb8bb4c36c47642d8c9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326695
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
g/325983 requires `add_replica_identity` to be in a separate
migration from the commit that creates the table, for
complicated DBA reasons. change the phrasing of the
Migration/RootAccount cop so it doesn't contradict the
newer Migration/SetReplicaIdentityInSeparateTransaction
test plan:
- make a new migration that creates a table
and does not do `add_replica_identity`
- the cop should tell you to do that in a different migration
and not after the `create_table` block in this one
flag=none
refs AE-443
Change-Id: Id37914399d40739e9fd8a72b90745c29d9e7cbda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326791
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes LF-616
flag=media_links_use_attachment_id
Test plan
- Set up a course with a media file
- Set up some captions on that media file
- Copy that course to a new course
- In the new course, delete the captions
- Reload the page and look at the list of
captions
- The inherited captions should now show up
- Ensure you can select the same language
as the inherited captions and create new
captions
Change-Id: Iffdcd25c3923b986a0ef482ff255d61dc98a5948
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326729
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>
darken the close button in the Admin tab of the Account Settings
page. the close button is also the same color whether on hover or
not to meet contract requirements.
closes FOO-3757
flag=none
test plan:
- go to the account settings page
- select the admin tab
- check that the "x" close button is dark enough to see with the
contrast of page background
Change-Id: Ieb248efdc6ee848758a0207148e6a7fc6a5586c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326392
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
closes FOO-3762
flag=none
test plan:
- go to courses or people page
- check that pagination nav element has an aria-label value of
pagination
Change-Id: I67fd733aece47d5aa7aca60e75586c8e9505ea3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326480
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
for account settings admin tab, change the names of the reports
to be table header elements to make them row headers. this is so
screen readers can read them differently than the information in
the table, i.e., the td elements.
closes FOO-3758
flag=none
test plan:
- go to account settings page
- go to reports tab
- check that the report names in the table are <th> elements
Change-Id: I83dcf114dfc815662134200a292afdec63e4a4e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326474
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Some updates cause a series to be split in 2. The existing code
neglected to return the updated front half when that happened.
closes LF-702
flag=calendar_series
test plan:
- create a series of events
- change the start time of one in the middls and update
this and all following
> expect the edited event and those after to have the correct
description of the series
> expect the other events before the edited one to have an
updated description of the series
Change-Id: I374d43cd973704a6cedfbf47ac0a19a7b948b15a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326719
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
refactor the incomplete/complete select dropdown code into its own
component, which is associated with EVAL-3357
closes EVAL-3437
flag=individual_gradebook_enhancements
test plan:
1. the tests pass in GradingResults.test.tsx file
2. the grading functions work as intended
- incomplete/complete dropdown grading for the submission details
modal and main grade input
- the text input grading for the submission details modal and main
grade input
Change-Id: I35861e2d487c0c6b0bf08898773f75df0ad67d70
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Jackson Huang <jackson.huang@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
flag=none
closes EVAL-3316
Test Plan:
- ensure example curl command completes without error
Change-Id: I4170a39ecb0124c78060a4d12f65f76bc784c18a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326435
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
In the postMessage forwarders (both the "sibling iframe" and the RCE
one) we are currently storing the source window in a lookup table from
origin -> window, and using that to determine where the response should
be set to. If two tools use the same origin, then depending on timing,
it is possible for one to get the response message intended for the
other.
We can't forward the source Window in a postMessage, nor could I find
anything unique in the Window object to key off, but object equality
(===) works, so we can just keep the Window objects in an array and use
an index into that array in the forwarded postMessage.
closes INTEROP-8206
flag=none
Test plan:
- go to a page with the same tool e.g. the LTI 1.3 test tool) launched
multiple times. Possibilities include:
- RCE content with embedded tool launches
- new assignment page with the tool in multiple placements that show
up here
- add a console.log() statement right before the
`targetWindow?.postMessage(message, targetOrigin)` line to log the
windowId, targetOrigin, and targetWindow, in the code that handles the
response message (index.ts), like this:
console.log('forwarding message to',
targetOrigin, sourceToolInfo.windowId)
- send some messages (e.g. {"subject":"lti.capabilities"}) from each
tool launch iframe to the forwarder window (check the "Send to LTI Storage
Target" option in the test tool). In the dev console, check that your
logging shows a unique windowId is used for each source iframe. Also
make sure that the response gets to the tool (you should see both the
"messageSent" and the "messageReceived" object logged to the console)
- Run messages multiple times, varying which tool launch iframe you send
from, and make sure exactly 1 windowId is used per tool launch iframe.
(e.g., if you have 2 tool iframes, windowId will always be either 0 or
1)
- add a similar logging statement in
packages/canvas-rce/src/rce/RCEWrapper.jsx
before the targetWindow?.postMessage(...) line, e.g.
console.log('rce forwarding message to',
targetOrigin, sourceToolInfo.windowId)
note: since the RCE stuff is in a package, you may need to do a 'yarn
install' followed by the normal asset building stuff for it to pick up
the change
- in the RCE (e.g. the assignment edit page), launch the test tool and
put `{"width":600, "height":600}` in the "iframe" box before sending
back the content item. this should render a tool iframe inside the editor
- repeat the last step to add a 2nd tool iframe into the RCE content.
- as before, send some message from each tool to the PARENT (not
forwarder) window ("Send to LTI Storage Target" option UNCHECKED)
and check the console.log() output to see that it uses a different
windowId for each tool iframe. Also make sure that the response gets
to the tool (you should see both the "messageSent" and the
"messageReceived" object logged to the console)
- if possible, test this in different browsers. due to cookie issues, it
may be difficult to test locally except in Firefox, so test that we
can identify windows by object equality (===) in different browsers
with this test HTML page:
<iframe srcdoc="<button onclick="window.parent.postMessage('hi', '*')">send</button>"></iframe>
<iframe srcdoc="<button onclick="window.parent.postMessage('hi', '*')">send</button>"></iframe>
<iframe srcdoc="<button onclick="window.parent.postMessage('hi', '*')">send</button>"></iframe>
<script>
const windowToId = (windowReferences, win) => {
const existingIndex = windowReferences.indexOf(win)
if (existingIndex !== -1) {
return existingIndex
}
windowReferences.push(win)
return windowReferences.length - 1
}
windowRefs = []
window.addEventListener('message', e => console.log("msg from", windowToId(windowRefs, e.source)))
</script>
Change-Id: I276912f46e6fd701da1821c7ff02b3011cf823d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326284
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: Evan Battaglia <ebattaglia@instructure.com>