Sha256: a52210769f43484c8a42427e56ee6af6cd046e1b29090e005ea32b8614e8abab

Contents?: true

Size: 815 Bytes

Versions: 20

Compression:

Stored size: 815 Bytes

Contents

require_dependency "panda_pal/application_controller"

module PandaPal
  class LtiController < ApplicationController
    def tool_config
      if PandaPal.lti_environments.empty?
        render plain: 'Domains must be set in lti_environments'
        return
      end
      platform = PandaPal.lti_options.delete(:platform) || 'canvas.instructure.com'
      request_url = "#{request.scheme}://#{request.host_with_port}"
      case platform
      when 'canvas.instructure.com'
        xml_config = LtiXml::CanvasPlatform.new(platform, request_url, main_app)
      when 'bridgeapp.com'
        xml_config = LtiXml::BridgePlatform.new(platform, request_url, main_app)
      else
        render plain: 'platform must be set under lti_options'
        return
      end
      render xml: xml_config.xml
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
panda_pal-5.1.0 app/controllers/panda_pal/lti_controller.rb
panda_pal-5.0.0 app/controllers/panda_pal/lti_controller.rb
panda_pal-5.0.0.beta.4 app/controllers/panda_pal/lti_controller.rb
panda_pal-5.0.0.beta.3 app/controllers/panda_pal/lti_controller.rb
panda_pal-5.0.0.beta.2 app/controllers/panda_pal/lti_controller.rb
panda_pal-5.0.0.beta.1 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.1.0.beta3 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.1.0.beta2 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.11 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.10 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.8 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.7 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.6 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.4 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.3 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.2 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.1 app/controllers/panda_pal/lti_controller.rb
panda_pal-4.0.0 app/controllers/panda_pal/lti_controller.rb
panda_pal-3.2.3 app/controllers/panda_pal/lti_controller.rb
panda_pal-3.2.2 app/controllers/panda_pal/lti_controller.rb