Module: IMS::LTI::Extensions::Content

Defined in:
lib/ims/lti/extensions/content.rb

Overview

An LTI extension that adds support for content back to the consumer

# Initialize TP object with OAuth creds and post parameters
provider = IMS::LTI::ToolProvider.new(consumer_key, consumer_secret, params)
# add extension
provider.extend IMS::LTI::Extensions::Content::ToolProvider

If the tool was launched as an content request and it supports the content extension you can redirect the user to the tool consumer using the return url helper methods. The tool consumer is then responsible for consuming the content.

#Check if a certain response type is available
if provider.accepts_url? do
  #Generate the URL for the user
  redirect provider.url_content_return_url(url)
end

Defined Under Namespace

Modules: ToolConsumer, ToolProvider