why:
* the comment was formatted incorrectly which caused
rake doc:api to leave an extra open code block
refs QUIZ-10351
flag=none
test plan:
* run rake doc:api
* there should be no changes
* go to http://canvas.docker/doc/api/file.tools_variable_substitutions.html
* search for "student view"
* everything below it should be correctly formatted
Change-Id: I0c5ab8065f0064e150f33d1cc4a2a645d7791ed5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338605
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Remove the forwarder shim between externalContentReady postMessages and
the jquery event and have everything use the postMessage directly, for
simplicity and consistency.
closes INTEROP-7887
flag: n/a
Test plan:
- create an LTI 1.1 tool with the following placements supporting
Content-Item, and test sending back content:
- collaborations: /courses/1/collaborations
- other (new?) collaborations UI: same placement, but UI is at
/courses/1/lti_collaborations
- assignment_selection: I shouldn't have affected this but it's
good and easy to test. The tool needs the explicit
assignment_selection placement with
message_type=ContentItemSelectionRequest. In the New Assignment
page, choose "External Tool" for submission type, launch the tool,
return content, and make sure the second popup closes.
- assignment_index_menu placement: on the assignments page, the kebab
menu in the upper right to the right of the assignment button (not
that course_assignments_menu placements also appear here but they
cannot use Content-Item). After the tool sends back content, the
page should reload. Note: it doesn't seem like this placement
actually did anything with the content before my commit either.
- module_index_menu_modal: this placement doesn't support ContentItem.
click the "Redirect to launch presentation return URL" button and the
modal should close.
- module_menu_modal, file_index_menu, or discussion_topic_index_menu.
I tested menu_index_menu (also doesn't support ContentItem; doesn't
seem to even launch for me in prod but works locally).
- you can test cancelling in a tray or modal by going to a tool and setting
location.href = "https://web.canvas-lms.docker/external_content/cancel/external_tool_dialog"
but I haven't found a place where this actually works before my
changes.
Change-Id: I90683e5e3872d5d1bc1f0a9e515b57741b738271
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336794
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs INTEROP-8385
flag=none
test plan:
* the information I added should be correct
Change-Id: If8618db8eb371b4d2c84123e7efb0b36bf72a6c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336652
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>
a previous commmit added an unclosed ``` block, causing all later text to invert
closes QUIZ-13051
flag=none
test plan:
- check preview of the modified md file
> verify text before and after student_view variable has the same format
Change-Id: Ifa2d70527210e5b75d72ea00314e92cabc3b0096
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338032
Reviewed-by: Ferenc Marcsó <ferenc.marcso@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
Product-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
in the past this was an API ToS and this has led to confusion with
the more specific ToS, so we are updating this wording to better
indicate our intention
test plan:
- docs look good in preview
flag=none
refs FOO-4217
Change-Id: I8dc6d78e7fb3ae66ff574882ac511c86dc413fbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337775
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
why:
* rake doc:api has to be run for all changes to
lib/lti/variable_expander.rb
* there was a change that did run it for an early PS, but later
changed the wording and did not re-run it
refs QUIZ-12877
flag=none
test plan:
* none
Change-Id: Id745d24b9957383b7982ece4346659c2a5cbed4f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337399
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Closes QUIZ-12983
flag=none
Add the `$com.instructure.Context.uuid` variable expansion to
an LTI tool that is installed in an account.
Launch the tool from the account navigation in the
root account and validate the new parameter value
matches the root account's UUID
Launch the tool from the account navigation in
a sub-account and vaildate the new parameter value
matches the sub-account's UUID
Launch the tool from the course navigation and validate
the new parameter value matches the course UUID
Change-Id: If04841f895e489852e4eefe106a4b5b830b0a51d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337070
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit tweaks some styles for the API documentation. The most
important change is that text is defaulted to 16px, which is the
recommended size for body text per the US government:
https://accessibility.digital.gov/visual-design/typography/#:~:text=Use%20a%20large%20enough%20font,length%20that%20promotes%20comfortable%20reading.
Another change is adding a background color to inline code blocks.
test plan:
Build the docs with:
```
rake doc:api
```
Then open the docs in a browser and verify that everything looks good.
fixes INTEROP-8383
flag=none
Change-Id: I066938e130159d7a710186701d45562998c7c2b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334967
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
At New Quizzes Item Analysis the submissions
with the student view should be excluded. For other LTI tools
it is a useful info that the tool is launched by a student
view `fake student`.
closes: QUIZ-12877
flag=none
test plan:
- have an LTI tool tha could be launched during test steps
- add `canvas_user_student_view=$com.instructure.User.student_view`
as custom lti parameter
- launch tool with a student user
- ensure `custom_canvas_user_student_view` is false
- launch tool with an admin user
ensure `custom_canvas_user_student_view` is false
- launch tool with from a student view
- ensure `custom_canvas_user_student_view` is true
Change-Id: If86ac6452d01045fc85331aaaf42052a5319f512
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334992
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Rajmund Csehil <rajmund.csehil@instructure.com>
Why:
- The current way of including the forwarder code involves using a
bundle, All the extra unnecessary Canvas code slows things down, costs
more to serve, and can cause errors because some things it expects to
work don't in the iframe.
- This includes the script as a static asset which will be served from
the CDN and only be refetched by the client when the the script
content changes, otherwise it will be cached for a year
(365.2425 days). It will also be gzip-compressed when delivered to
web browsers.
Credit to Jacob Burroughs for figuring out this approach.
Test plan:
Note: this is pretty much the same test plan as the next commit so you
can test just test that commit.
- after checking out code, run `yarn gulp rev` (this may also be done as
part of building assets?).
- to make sure you get the new code, clear your browser's cache, load a
canvas page, and open dev tools. In Network find the (web/doc) request
for /post_message_forwarding?target=... and visit the page to make
sure it has the new code (with script
src="/...lti_post_message_forwarding-1244...js" tag)
- launch an LTI tool and send messages to the forwarder iframe (platform
storage target) and make sure you get the appropriate response. You
can use can use messages like:
{"subject":"lti.put_data","key":"a","value":"b","message_id":"12"}
{"subject":"lti.get_data","key":"a","message_id":"12"}
- send messages from the tool to the parent window and make sure those
work too.
- embed an LTI tool in RCE content and while still editing the content,
send messages from the tool to both the platform storage target and
the parent window, as in the previous 2 steps.
refs INTEROP-8279
flag=none
Change-Id: I0d4ced28efc3c0c7d8180e72d56bab54557d3cce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334733
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
why:
* rake doc:api needs to be run when adding new live events JSON examples
refs OUT-5885
test plan:
* Rubric shows up under the Data Services -> Live Events ->
-> Canvas list in the API docs
* the Rubric doc includes the Rubric Assessed Event
Change-Id: Ia184b4226fc55bebd2f14510a790ce9da869a53a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335643
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
To make it more clear that the word "cavnas" has to be passed
explicitly for the users to be notified for password setup.
closes FOO-3948
flag=none
test plan:
- generate API docs
- go to SIS Import Format Documentation
- make sure the word canvas has quotes around it in
canvas_password_notifcation description of users.csv
Change-Id: Ifc701c181efbf8fc4b59b6b5eabd9e5a1ba0e2c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333482
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: Michael Hulse <michael.hulse@instructure.com>
closes OUT-5885
flag=none
test plan:
- Tests are sufficient and jenkins passes
- Live event is triggered when assessing a rubric associated to an
assignment for a student in Speedgrader
- Steps for manual testing:
- Prereq:
- A course with an graded assignment that is aligned to a rubric
with atleast 1 student enrolled
- Live events are working locally
- Open terminal and tail sqs logs in Outcomes Service OR tail the
kinesis logs in Canvas
- dc logs -f sqs2outcomes
- OR dc run --rm web script/tail_kinesis http://kinesis live-events
- Launch Canvas and navigate to course with the rubric aligned
assignment
- Open Speedgrader
- Assess the rubric for the student
- Verify that the "rubric_assessed" event is present in the logs
- Back to Speedgrader, assess rubric for the student again
- Verify that the "rubric_assessed" event is present in the logs
Change-Id: I533aa7eceae8afbee37217ccc5705649ff8df4de
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330756
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
why:
* make it very clear when this API is supported
and what to do when it's not
closes INTEROP-8273
flag=none
test plan:
* info is accurate
Change-Id: I158a6264d044c911020cf97367f332df85a33d03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332247
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: Alexis Nast <alexis.nast@instructure.com>
Test plan:
- rake doc:api
- view doc and make sure link to "HTTPS delivery failures" works
closes INTEROP-8275
Change-Id: I74467b2bcb287c078e83c136f418761061c9f8a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332323
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
These work without any additional changes. In this commit, I also made
it so they work without any "message" value given in the postMessage,
because custom unload messages aren't supported in modern browsers, and
making this be required (but ignored) would be confusing.
refs INTEROP-8218
flag=lti_rce_postmessage_support
Test plan:
- embed an LTI tool within RCE content and remain editing the content
- send {"subject":"setUnloadMessage"} from the tool to its window.parent
- try to navigate away from the page. it will ask if you are sure. hit
cancel.
- send {"subject":"removeUnloadMessage"} from the tool to its
window.parent
- try to navigate away from the page. it will no longer prompt you to
stay.
- repeat but use {"subject":
- repeat but send messages to the platform storage target ('sibling
forward iframe')
Change-Id: Ie52b1888d27184eb5a12064faee85a340ef28ac6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331845
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Closes: QUIZ-12538
Change-Id: I6addecda6900ce67e78a8a27b23f9d656209d160
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330540
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
This reverts commit 9360fcdb85.
Reason for revert: this caused more problems than it solved, including breaking tools. We will look to cut down on these requests in other ways.
Change-Id: I4589c63c7cf3a974f5943e41adcf67eb02cdb144
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330431
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
why:
* loading the /post_message_forwarding frame on every page to
facilitate proper use of the Platform Storage spec generates
a _ton_ of requests
* temporarily only signal Platform Storage support and serve
the forwarding frame in Safari, to cut down on these requests
while we craft a more permanent solution
* I realize this _may_ impact some tools who are choosing to use
Platform Storage properly and send their messages to
sso.canvaslms.com from any browser, but that number of tools
is very low right now
changes:
* in browsers that aren't Safari:
* no lti_storage_target param in LTI launch
* lti.put_data and lti.get_data are not supported
* forwarding frame is not present
* API docs and notice on Developer Keys page say this is temporary
closes INTEROP-8267
flag=none
test plan:
* make sure your lti_platform_storage feature flag is enabled locally
* launch an LTI 1.3 tool in Safari
* the login request should include an lti_storage_target param
* the launch request should include an lti_storage_target param
* send this postMessage from the tool:
`{"subject":"lti.capabilities"}`
* the response in the browser console should include message
types like lti.put_data and lti.get_data
* send this postMessage from the tool:
`{"subject":"lti.get_data","key":"hello","message_id":"1234"}`
* the response in the console should _not_ include an error
* go to the Developer Keys page, there should be a new warning
* launch the same tool in Firefox
* in the login request there should not be an lti_storage_target param
* same in the launch request
* send this postMessage from the tool:
`{"subject":"lti.capabilities"}`
* the response in the browser console should not include
message types like lti.put_data and lti.get_data
* send this postMessage from the tool:
`{"subject":"lti.get_data","key":"hello","message_id":"1234"}`
* the response in the console should include an error and say
that this type is unsupported in all browsers except Safari
Change-Id: If21d8b39eaf5a198f4c5f7ed666647591d715311
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330232
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
closes INTEROP-8247
flag=none
Why:
- So tools can launch from the right region from the start, e.g. for
data residency reasons
Test plan:
* modify `development` in config/database.yml to add e.g.,
`region: us-west-2`, where `us-west-2` is some region.
added in the tool configuration. Restart canvas.
* In the UI, create / edit an LTI 1.3 DeveloperKey to have an
"oidc_initiation_urls" property in the settings, with two regions,
including the one you put in config/database.yml. The easiest thing is
to just add a different query parameter for each so your tool will
still launch. e.g.:
"oidc_initiation_urls": {
"us-east-1": "https://mytool/login?region=useast1",
"us-west-2": "https://mytool/login?region=uswest2"
}
* open up dev tools. Launch tool in a couple different placements (e.g.,
assignment_selection and an assignment launch), and observe that the
region-specific URL is launched.
- modify the region in config/database.yml so use a region not in
the config. launch the tool. it should use the default
oidc_initiation_url.
- Edit the developer and modify the initiation URL for the current
region to be not a string. It should fail to save. Not that we allow
additional properties, so if you add e.g.
`"somethingmadeup": "http://someurl.com"`, it won't complain. (I'm
open to changing that, but we don't currently do it for any field in
the schema)
- Try changing oidc_initiation_urls to something other than an object.
Saving should fail.
- Build the documentation with `dexec rake doc:api` and visit the
documentation at `/doc/api/file.lti_dev_key_config.html`. Check that
the added JSON in the example is correct, the copy under
`oidc_initiation_urls` makes sense, and that the link to it under
from the `environments` param info work.
Change-Id: Ie370b677700853beac283739457f9541aa6b36a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329301
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: Alexis Nast <alexis.nast@instructure.com>
Some notes (will remove from message after code review):
- I had at first wanted to put this along with the code that finds the
latest due at date, which is in AssignmentOverrideApplicator, but this
involved several levels of changes, adding an attribute to the
Assignment model, and finally for the presence of an assignment vs
quiz. That seemed like too much.
- Putting the code in the VariableExpander involves both repeating a bit
of custom logic to determine teacher vs. student, and potentially
risking some incompatibility with the old dueAt expansion in some edge
cases (when sections have no students/enrollments), but seems like the
best way to go.
- This cannot go in SubstitutionsHelper because that doesn't have any
assignment in it
- The behavior of substituing an empty string vs. not subtituting at all
(the value is the literal "$Canvas.assignment.earliestDueAt.iso8601")
is different from `Canvas.assignment.dueAt.iso8601` (but the same as
`Canvas.assignment.dueAt`). This is to simplify things and to
standardize on ASSIGNMENT_GUARD. It appears that the behavior of
dueAt.iso8601 was just to avoid crashes.
flag=none
closes INTEROP-8228
Test plan:
- have an LTI tool
- create a course with three sections:
Section A
Section B
Section C
- enroll a student in Section A and Section B, but no student in Section
C. Note: for a section due date to take effect for a student, the
students enrollments need to be in an 'active' state (not
creation_pending). You can run
enrollment.update workflow_state: :active
- create an assignment of type external tool. Give it different
assignment dates for different students (in Assignment settings under
"Assign" you can specify different dates for different students or
sections)
- add the $Canvas.assignment.earliestDueAt.iso8601 expansion either
to the assignment's Lti::ResourceLink custom fields, or the tool
configuration custom fields.
- launch the tool as a student in each section. the date should be the
due date for that student, as defined by Section or Student overrides.
- as a teacher test the following scenarios (settings under "Assign")
(sample dates in October, November, December)
- Assign to Section A: November
Assign to Everyone Else: December
-> expected variable value: November
- Assign to Section A: November
Assign to Everyone Else: October
-> expected variable value: October
- Assign to Section A: November
Assign to Section B: December
Assign to Everyone Else: October
-> expected variable value: November
(all students are either in Section A or B)
- Assign to Section A: November
Assign to Everyone Else: no due date
-> expected variable value: November
- Assign to Section A: no due date
Assign to Everyone Else: November
-> expected variable value: November
- Assign to Section A: no due date
Assign to Everyone Else: no due date
-> expected variable value: ""
- Assign to Section A: no due date
Assign to Section B: no due date
Assign to Everyone Else: October
-> expected variable value: ""
- Assign to student 1: October
Assign to Everyone Else: November
-> expected variable value: October
Change-Id: Ie3a2896caf2eb002b3e32bd1688337a41523eb1d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328020
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
This allows remote attachment to the `debug` server in the web container.
closes AE-532
flag=none
test plan:
- install the 'VS Code rdbg` extension
- add `docker-compose/rdbg.override.yml` to your COMPOSE_FILE var
- start a debugging session
- verify interactive debugging works
Change-Id: I5b44c4e0e76c64575f25876af097bcd48f6fde74
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328485
Tested-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
This adds a variable expansion which provides a list of subaccounts
(recursive) the launching user has admin rights too. This is needed by
Studio.
The code add in app/models/user.rb has been moved verbatim from MRA,
where it was previously written for another purposes. See corresponding
commit which removes it from there.
closes INTEROP-8207
flag=none
Test plan:
- have an account (not a root account) with at least one subaccount of
its own.
- make a user an admin in the account by going into account settings ->
admin.
- add a custom variable with the value "$Canvas.user.adminableAccounts"
to an LTI.
- launch the LTI as the user
- look at the LTI custom variable (HTTP request params for LTI 1.1, in
the JWT for LTI 1.3). You should see the account id you added the user
as an admin for, and the ids of all of its subaccounts.
Change-Id: I222efbc44b727bf6a02c8ab8e77851a2938fb5ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327509
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
It's the new default debugger in ruby 3.1. Rails switched to it in 7.0,
avoids issues with Zeitwerk, has a more modern interface based on
current IRB, supports Unix Domain Sockets for remote debugging,
promises even better future maintenance due to being part of Ruby,
etc.
Change-Id: Ieaa7872f1c0308b16ae180fdb16df5dd6caa87a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328241
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>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
why:
* the platform storage flag was enabled on 8/19, which unlocks
full support for the spec. remove caveats
* the API docs now reference sso.canvaslms.com as the primary OIDC auth
domain, and the reasoning for changing it
closes INTEROP-7924
flag=none
test plan:
* no typos
* grammar makes sense
* info is correct
Change-Id: Ibd8e3ab516e89c1edd3043704c8a846686f2725b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326238
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Closes FOO-3736
flag=none
Test plan:
- n/a
Change-Id: Iee06712b34af76c035b72875ae31399e64a93d5a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325916
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>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
why:
* LTI tools expect to be able to send window.postMessages to their
direct parent window, which isn't possible in the active RCE that wraps
the editor box in an iframe
* forward all messages sent to the RCE iframe to Canvas and back
* this means some message types won't work in this context since they
rely on finding the tool iframe
* there is also some strange behavior in Firefox (possibly a bug) where
when sending a postMessage from the RCE frame to Canvas, the event's
`source` is actually the Canvas window object, not the RCE frame,
so account for that by explicitly looking for the RCE frame
* not sure how else to handle this bug
* this does not yet allow for sending messages to the OIDC Auth endpoint
via a sibling forwarder iframe, but that's a separate issue
closes INTEROP-8194
flag=none
test plan:
* install the lti 1.3 test tool locally
* edit an assignment or a page to pull up an active RCE window
* add a content item from the test tool and include
`{"width":600,"height":600}` in the "iframe" box in the tool before
sending back the content item
* this should render an iframe inside the editor that launches the tool
* open the dev tools console
* scroll to the bottom of the tool's frame to the postMessage section
* deselect the "send to storage target" checkbox
* send this message: `{"subject":"toggleCourseNavigationMenu"}`
* the left course nav should collapse
* the console should log "message received" from the test tool
* this should work in all browsers (although rendering an LTI tool in
local canvas in Chrome doesn't work)
Change-Id: Ia219e8bd9d46ea3a061811458588af6dd8be8603
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325031
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
no new cops, but a few fixes to existing cops (notably
Style/RedundantReturn)
Change-Id: I64a744c3d81e25329c1612e4622ca96783b0801d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324942
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>
flag = none
test plan:
- check that the language is accurate
Change-Id: I7f434ab8765cb0c17aa9980c4393ce1d4808d39f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324595
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: Alexis Nast <alexis.nast@instructure.com>
this feature was requested by multiple customers
at InstructureCon 23 hack night
test plan
- import a SIS user batch using a diffing_data_set_identifier
- remove a user from the csv file and re-import
using the same diffing_data_set_identifier
while supplying the "diffing_user_remove_status=suspended"
option
- the user should be suspended rather than deleted
flag=none
closes FOO-3710
Change-Id: I5a0acf0677c0512a334060f917a3fa4fdf32fcd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323910
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ajmal Esa <ajmal.esa@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Existing decaying_average method
is renamed as weighted_average
and added new standard_decaying_average method
for standard decay calculation.
These changes will be reflected only
if outcomes_new_decaying_average_calculation,
feature_flag is turned on
refs: PFS-21869, PFS-21871
Test Plan
* Create outcome
* it should have default calculation method weighted_average
* Mastery calculation dropdown should show weighted_average
and decaying_average
flag=none
Change-Id: I84a90a58c1b5d311564921af78729480141744ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321346
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Mark Valentine <mvalentine@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
makes it much easier to do a failsafe local cache on it
refs AE-380
Change-Id: Ia4bda742e3ee3f80749f3f074e2411b68476b49c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322309
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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>
Updated documentation to say calculation method and mastery scale
do not need to be defined in the imported .csv.
closes OUT-5134
flag=none
Test plan:
- See changes in the documentation.
Change-Id: Idfb2f338e1ab1aa4bef79588110f0c94a54acc27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321269
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
In Beta and Test versions of Canvas, we always want to send
the xxx.beta.instructure.com URL in LTI calls (NRPS, AGS, etc)
instead of the preferred domain.
fixes INTEROP-8102
flag=consistent_ags_ids_based_on_account_principal_domain
test plan:
1. temporarily modify local code for ApplicationController.test_cluster_name
to return a beta url
2. Launch an LTI 1.3 tool in an assignment context (e.g. create an LTI
1.3 assignment) and check both the "lineitems" and "lineitem" fields
3. Also check the context_memberships_url (NRPS) from the launch
4. Get an LTI advantage token for your LTI 1.3 tool
(/api/lti/advantage_token?tool_id=123) and GET the
/api/lti/courses/2/line_items endpoint, and check the "id" fields
of the returned results.
5. Post a score to the /courses/123/line_items/456 (etc.) endpoint --
see the example request from the docs at
https://canvas.instructure.com/doc/api/score.html --
and check the the "progress" URL (under content_items) and the
resultUrl returned.
6. Get the /api/lti/courses/2/line_items/1/results and check the URLs
in the "id" field and the "scoreOf" field.
7. Get the /api/lti/courses/2/names_and_roles endpoint and check the
URL in the "id" field.
Change-Id: I21ad34097442283f74dd70b28b1a46fbc8fbcaf8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>