Commit Graph

829 Commits

Author SHA1 Message Date
Xander Moffatt 3664a9e19f fix: render LTI variable substitution API docs correctly
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>
2024-01-24 18:33:43 +00:00
Evan Battaglia f262c7cf58 externalContentReady $.trigger() -> postMessage
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>
2024-01-23 17:00:05 +00:00
Bence Arpasi b01c9ce9ce lti manual: adding placements list and screenshots
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>
2024-01-19 14:14:16 +00:00
Endre Berki b9a59cb7f1 fix lti tools variable substition doc
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>
2024-01-19 09:08:58 +00:00
Ryan Norton 1fc5f24291 update the canvas api docs to point to the api policy
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>
2024-01-16 23:16:19 +00:00
Paul Gray 05b955f48f Tweak wording in variable substitution docs
Change-Id: I26d74495e646c3383d4b12384f6775f54a7fda90
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337425
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2024-01-11 20:54:37 +00:00
Xander Moffatt e8b201ba7e docs: sync LTI variable expansion doc
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>
2024-01-11 20:17:37 +00:00
Weston Dransfield e4add6de3c Add variable expander for launch context UUID
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>
2024-01-10 22:50:43 +00:00
Paul Gray 7b0d2309a6 Tweak styles for API documentation
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>
2024-01-10 16:40:33 +00:00
ferenc.marcso c08de922e1 Add com.instructure.User.student_view variable expansion
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>
2024-01-04 08:42:18 +00:00
Tucker McKnight 66056e80e8 spec: Add openapi docs for lti/developer_keys endpoint
Change-Id: I73ea293b38a520328e2ec2c2fbcc49b2fafbe0ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336148
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-01-03 23:31:54 +00:00
Tucker McKnight 9ae975603c spec: Add openapi docs for authorize_redirect and security
Change-Id: Ia66b9769946a36e6a71b271fcac79aeb4890c7c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336147
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-01-03 23:31:36 +00:00
Tucker McKnight 358556977c spec: Add openapi doc for lti/accounts endpoint
Change-Id: I08dc417ed922ae44f8d272ba9cd363da52fb5fcc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336146
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-01-03 23:31:13 +00:00
Tucker McKnight 05d21fb5af spec: Add openapi docs for lti/groups and lti/courses endpoints
Change-Id: I4e38833dcc8207b06fd279efe38d96aa022ff99d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336145
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-01-03 23:30:53 +00:00
Tucker McKnight 6f5db5e5df spec: Add openapi doc for register and registrations endpoints
Change-Id: I7a325d8dc721cee4eea3f2939aa3b4a2f4e817d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336144
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-01-03 23:30:32 +00:00
Tucker McKnight 55319d9bd2 spec: Add openapi doc for registration_token endpoint
Change-Id: I35b34ec05841591833e297ecf2eb463032136d0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336143
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-01-03 23:30:12 +00:00
Paul Gray a4f958ed8c Add Dynamic Registration Technical Documentation
This commit adds technical documentation for Dynamic Registration in
Canvas.

test plan: n/a

closes INTEROP-8340
flag=lti_dynamic_registration

Change-Id: Ic516e8389e49a0d97d782d72c6a04604fed81fd1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334965
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Lauren Auchter <lauren.auchter@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mark Starkman <mark.starkman@instructure.com>
2023-12-21 17:50:43 +00:00
Evan Battaglia 02af1dfd65 postMessage forwarder iframe: eliminate excess JS
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>
2023-12-20 22:37:40 +00:00
Xander Moffatt b864f67bd1 generate docs for rubric_assessed live event
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>
2023-12-19 17:07:58 +00:00
Cody Cutrer c32d30f662 bundle update rubocop
[skip-stages=Flakey]
[skip-crystalball]

and apply corrections from new/updated cops:

 * Layout
 * Lint/AmbiguousRange
 * Lint/RedundantSafeNavigation
 * Style/HashEachMethods
 * Style/HashSyntax
 * Style/InverseMethods
 * Style/RedundantLineContinuation
 * Style/RedundantParentheses
 * Style/RedundantReturn
 * Style/SuperWithArgsParentheses
 * Style/SymbolProc

Change-Id: I787e46f5b1c89e0fedebd5452ba74567d66954c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-12-06 14:25:02 +00:00
Evan Battaglia 2392899b1f Ignore internal variable expansion for docs
flag=none
Test plan: n/a

Change-Id: If03404625c0e92da20923e6a4142d60e220bb5a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334587
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: Xander Moffatt <xmoffatt@instructure.com>
2023-12-05 22:49:30 +00:00
Evan Battaglia 3c8babe5b4 Add comments pointing people to BulkToolUpdater
flag=none
Test plan: n/a

Change-Id: Id342baf6a4ca56c4d46e8209c90852b0d5aaafcd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333426
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rajmund Csehil <rajmund.csehil@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2023-11-28 21:31:55 +00:00
AJ Esa a7e5b80822 add quotes around canvas in API doc
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>
2023-11-27 16:56:59 +00:00
Chrystal Langston d6ae15d8d7 Add live event rubric_assesed
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>
2023-11-16 21:01:40 +00:00
Evan Battaglia 19d326f35b Fix inaccurate documentation
refs INTEROP-8275
flag=none

Test plan: n/a

Change-Id: Ia4e4f5310f8dd285e6c778936e0b807535b81ccd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2023-11-13 17:42:57 +00:00
Xander Moffatt b135c9142d document LTI Platform Storage implementation
why:
* for posterity and future reference

closes INTEROP-8308
flag=none

test plan:
* verify this info is correct

Change-Id: I4a4d1b5e65a2371b23985ec8494b0c499968ea87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332032
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>
2023-11-13 17:14:47 +00:00
Xander Moffatt 08ede78f09 clarify fall back for LTI platform storage
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>
2023-11-10 23:18:39 +00:00
Evan Battaglia 27c7ecf340 Document Live Events HTTPS failures/sub disabling
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>
2023-11-09 17:12:15 +00:00
Evan Battaglia a50b8dbbe8 enable setUnloadMessage/removeUnloadMessage in RCE
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>
2023-11-06 17:21:40 +00:00
Alex Slaughter bb3a5f8f28 Support NQ Embedded Quiz Assets
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>
2023-10-19 18:23:45 +00:00
Xander Moffatt 737bf7025a Revert "(temp) only support LTI Platform Storage in Safari"
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>
2023-10-16 15:01:46 +00:00
Xander Moffatt 9360fcdb85 (temp) only support LTI Platform Storage in Safari
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>
2023-10-13 15:23:37 +00:00
Cody Cutrer 4fbc04c506 Add VSCode devcontainer configuration
Change-Id: I1a23005e533e23179da6a73a6730e95cc479cb22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329420
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-10-11 14:57:46 +00:00
Mysti Lilla d55a9a930e Add doc updates for variable substitutions
flag=none

Test plan
- Compile api documentation with rake doc:api
- Ensure the term.endAt substition appears

Change-Id: I975ee53a7dc0263ab6b896a70b4ab6b56eeac732
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329823
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: Mysti Lilla <mysti@instructure.com>
2023-10-09 21:01:53 +00:00
Evan Battaglia dfe7ed3dfe lti: Regional OIDC Initiation URIs
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>
2023-10-09 16:25:57 +00:00
Evan Battaglia ad4ad89b85 lti: add "earliestEnrollmentDueAt" expansion
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>
2023-10-02 21:28:17 +00:00
Isaac Moore 9a1c659a25 Add support for VS Code rdbg extension
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>
2023-09-22 22:38:30 +00:00
Evan Battaglia daa2025b46 LTI: variable substitution for adminable accounts
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>
2023-09-21 15:30:08 +00:00
Cody Cutrer 22b7677b3b switch from byebug to debug
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>
2023-09-20 23:48:39 +00:00
Xander Moffatt b052378ef7 update LTI platform storage API docs post-flip
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>
2023-08-28 15:42:56 +00:00
Jason Perry f99f811162 Documentation cross-account params in pseudonyms controller
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>
2023-08-24 20:32:09 +00:00
Xander Moffatt e75d27eb6c forward postMessages from RCE iframe
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>
2023-08-18 16:13:49 +00:00
Cody Cutrer e1a6ca4982 bundle update rubocop
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>
2023-08-14 16:32:06 +00:00
Tucker McKnight 30078faeca Clarify submission_created events do not include classic quizzes
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>
2023-08-10 22:31:10 +00:00
Omar Gerardo Soto-Fortuño 696236117c Change gradingScheme variable expander format
closes VICE-3688
flag=none

test plan:
  - Specs pass.

qa risk: low

Change-Id: I9db9de596c59c198b649b2261216ebbffbc89e69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324365
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Alexander Youngblood <alexander.youngblood@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-08-03 20:21:37 +00:00
Jeremy Stanley 244ba09355 add diffing_user_remove_status option
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>
2023-08-03 19:04:15 +00:00
Hitesh Rawal 33d01dcde9 New decaying_average calculation
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>
2023-07-31 15:06:45 +00:00
Cody Cutrer f8f579cd82 switch LiveEvents config to use a single Consul key
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>
2023-07-12 14:53:08 +00:00
Nayeel Imtiaz 6d12d6166d Update API text for Outcomes Import Format Documentation
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>
2023-07-11 00:00:25 +00:00
Steve McGee 5b09a61f75 send environment specific url in LTI calls
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>
2023-07-05 23:29:10 +00:00