Add oauth_callback param to ContentItemRequest
closes PLAT-3818 Test Plan: Use of the content item request now includes the oauth_callback - check that it is the case Change-Id: I035587458ed75b7dc1c6b2497d60113071e2179e Reviewed-on: https://gerrit.instructure.com/167206 Reviewed-by: Weston Dransfield <wdransfield@instructure.com> QA-Review: Weston Dransfield <wdransfield@instructure.com> Tested-by: Jenkins Product-Review: Marc Phillips <mphillips@instructure.com>
This commit is contained in:
parent
b0e38c3f5a
commit
cef7bac4a9
|
@ -532,8 +532,8 @@ class ExternalToolsController < ApplicationController
|
||||||
media_types.to_unsafe_h,
|
media_types.to_unsafe_h,
|
||||||
params["export_type"]
|
params["export_type"]
|
||||||
)
|
)
|
||||||
params = Lti::ContentItemSelectionRequest.default_lti_params(@context, @domain_root_account, @current_user).merge(
|
params = Lti::ContentItemSelectionRequest.default_lti_params(@context, @domain_root_account, @current_user).
|
||||||
{
|
merge({
|
||||||
#required params
|
#required params
|
||||||
lti_message_type: message_type,
|
lti_message_type: message_type,
|
||||||
lti_version: 'LTI-1p0',
|
lti_version: 'LTI-1p0',
|
||||||
|
@ -543,7 +543,9 @@ class ExternalToolsController < ApplicationController
|
||||||
context_title: @context.name,
|
context_title: @context.name,
|
||||||
tool_consumer_instance_name: @domain_root_account.name,
|
tool_consumer_instance_name: @domain_root_account.name,
|
||||||
tool_consumer_instance_contact_email: HostUrl.outgoing_email_address,
|
tool_consumer_instance_contact_email: HostUrl.outgoing_email_address,
|
||||||
}).merge(variable_expander(tool: tool, attachment: content_item_response.file).expand_variables!(tool.set_custom_fields(placement)))
|
}).
|
||||||
|
merge(variable_expander(tool: tool, attachment: content_item_response.file).
|
||||||
|
expand_variables!(tool.set_custom_fields(placement)))
|
||||||
|
|
||||||
lti_launch = @tool.settings['post_only'] ? Lti::Launch.new(post_only: true) : Lti::Launch.new
|
lti_launch = @tool.settings['post_only'] ? Lti::Launch.new(post_only: true) : Lti::Launch.new
|
||||||
lti_launch.resource_url = opts[:launch_url] || tool.extension_setting(placement, :url)
|
lti_launch.resource_url = opts[:launch_url] || tool.extension_setting(placement, :url)
|
||||||
|
|
|
@ -56,6 +56,7 @@ module Lti
|
||||||
launch_presentation_locale: I18n.locale.to_s || I18n.default_locale.to_s,
|
launch_presentation_locale: I18n.locale.to_s || I18n.default_locale.to_s,
|
||||||
launch_presentation_document_target: 'iframe',
|
launch_presentation_document_target: 'iframe',
|
||||||
ext_roles: lti_helper.all_roles,
|
ext_roles: lti_helper.all_roles,
|
||||||
|
oauth_callback: 'about:blank'
|
||||||
}
|
}
|
||||||
|
|
||||||
params[:user_id] = Lti::Asset.opaque_identifier_for(user) if user
|
params[:user_id] = Lti::Asset.opaque_identifier_for(user) if user
|
||||||
|
|
Loading…
Reference in New Issue