<% # Copyright (C) 2014 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% provide :page_title do %><%= @lti_launch.link_text %><% end %> <% js_bundle 'legacy/external_tools_tool_show' %> <% js_bundle :external_tool_redirect if @redirect_return %> <%= render @prepend_template if @prepend_template %> <% if @lti_launch.resource_url.start_with?('http://') %>

<%= t('You are trying to launch insecure content from within a secure site (canvas). Some web browsers may prevent this content from loading.') %>

<%= t('It looks like your content might not load. You can use this button to try launching it in a new tab.') %>

<% end %>
<% @lti_launch.params.each do |key, value| %> <%= hidden_field_tag key, value.to_s %> <% end %>
<%= t :new_tab, "This tool needs to be loaded in a new browser window" %>
<%= iframe( "about:blank", name: 'tool_content', id: 'tool_content', class: "tool_launch", allowfullscreen: "true", webkitallowfullscreen: "true", mozallowfullscreen: "true", tabindex:"0", title:t('Tool Content'), style: "height:#{@lti_launch.tool_dimensions[:selection_height]};width:#{@lti_launch.tool_dimensions[:selection_width]};", allow: Lti::Launch.iframe_allowances(request.user_agent).join('; '), data: { 'lti-launch': true } ) %>
<%= render @append_template if @append_template %>