canvas-lms/gems/lti_outbound
John Corrigan 6c244b0556 allow whitelisted query param to be added to lti launch body
refs QUIZ-5115

test plan:
- Have a course with quizzes next configured.
- Create a quizzes next assignment.
- Make sure your account has an auth token for making API requests.
- Open up a canvas console, grabbing the course you are operating
  within:

```
course = Course.find <course_id>
```

- Using curl or some other mechanism for making API requests, perform
  the following request:

```
curl 'http(s)://<canvas>/api/v1/courses/<course_id>/external_tools/sessionless_launch' \
     -H "Authorization: Bearer <token>" \
     -F 'launch_type=assessment' \
     -F 'assignment_id=<assignment_id>' \
     -F 'platform=mobile'
```

- The response will be some json, including a `url` key. The url value
  will include a `verifier` query parameter. Grab that value.
- Back in the canvas rails console, we need to get at the launch
  settings for this specific launch:

```
redis_key = "#{@course.class.name}:#{ExternalToolsController::REDIS_PREFIX}#{verifier}"
launch_settings = JSON.parse(Canvas.redis.get(redis_key))
tool_settings = launch_settings['tool_settings']
```

- Observe that `tool_settings['ext_platform'] == 'mobile'`.

Change-Id: I95dedf9d2f7e3a5b44d9d67d50ff27b98420b956
Reviewed-on: https://gerrit.instructure.com/164922
Tested-by: Jenkins
Reviewed-by: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Reviewed-by: Steve Kacsmark <skacsmark@instructure.com>
QA-Review: Steve Kacsmark <skacsmark@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
2018-09-19 18:46:36 +00:00
..
lib allow whitelisted query param to be added to lti launch body 2018-09-19 18:46:36 +00:00
spec Add submittedAt details to Basic Outcomes 2018-04-23 17:06:49 +00:00
.rspec rename basic_lti_outbound gem to lti_outbound 2014-01-24 15:48:34 +00:00
Gemfile bump simplecov, fixes SD-2056 2017-04-04 18:06:25 +00:00
LICENSE.txt da licença part 53 2017-05-01 21:06:11 +00:00
README.md rename basic_lti_outbound gem to lti_outbound 2014-01-24 15:48:34 +00:00
Rakefile rename basic_lti_outbound gem to lti_outbound 2014-01-24 15:48:34 +00:00
lti_outbound.gemspec rails 5.2 2018-04-25 19:15:20 +00:00
test.sh simplify gem test harnesses 2016-01-19 17:52:58 +00:00

README.md

LtiOutbound

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'lti_outbound'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lti_outbound

Usage

TODO: Write usage instructions here

Contributing

  1. Fork it ( http://github.com//lti_outbound/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request