Module: PandaPal
- Defined in:
- lib/panda_pal.rb,
lib/panda_pal/engine.rb,
lib/panda_pal/version.rb,
app/models/panda_pal/session.rb,
app/models/panda_pal/api_call.rb,
app/models/panda_pal/platform.rb,
app/models/panda_pal/organization.rb,
lib/panda_pal/helpers/misc_helper.rb,
app/lib/panda_pal/lti_jwt_validator.rb,
app/lib/panda_pal/launch_url_helpers.rb,
app/models/panda_pal/platform/canvas.rb,
lib/panda_pal/helpers/secure_headers.rb,
app/models/panda_pal/panda_pal_record.rb,
lib/panda_pal/helpers/console_helpers.rb,
app/controllers/panda_pal/lti_controller.rb,
app/helpers/panda_pal/application_helper.rb,
app/controllers/panda_pal/api_call_controller.rb,
app/controllers/panda_pal/lti_v1_p0_controller.rb,
app/controllers/panda_pal/lti_v1_p3_controller.rb,
app/controllers/panda_pal/application_controller.rb,
app/models/panda_pal/organization_concerns/task_scheduling.rb,
app/models/panda_pal/organization_concerns/task_scheduling.rb,
app/models/panda_pal/organization_concerns/settings_validation.rb,
app/models/panda_pal/organization_concerns/organization_builder.rb
Defined Under Namespace
Modules: ApplicationHelper, ConsoleHelpers, Helpers, Jobs, LaunchUrlHelpers, MiscHelper, OrganizationConcerns, Plugins, SecureHeaders, SkipSymmetricEncAttrEncrypted
Classes: ApiCall, ApiCallController, ApplicationController, Engine, LtiController, LtiJwtValidator, LtiNavigationInUse, LtiV1P0Controller, LtiV1P3Controller, NotMounted, Organization, PandaPalRecord, Platform, Session, SettingsMarshaler
Constant Summary
collapse
- VERSION =
"5.9.7"
- @@lti_navigation =
{}
- @@lti_options =
{}
- @@lti_properties =
{}
- @@lti_environments =
{}
- @@lti_custom_params =
{}
- @@extensions =
{}
- @@lti_private_key =
nil
Class Method Summary
collapse
Class Method Details
.extensions_for(type) ⇒ Object
80
81
82
|
# File 'lib/panda_pal.rb', line 80
def self.extensions_for(type)
(@@extensions[normalize_ext_type(type)] || []).uniq
end
|
.lti_custom_params ⇒ Object
47
48
49
|
# File 'lib/panda_pal.rb', line 47
def self.lti_custom_params
@@lti_custom_params.deep_dup
end
|
.lti_custom_params=(custom_params) ⇒ Object
43
44
45
|
# File 'lib/panda_pal.rb', line 43
def self.lti_custom_params=(custom_params)
@@lti_custom_params = custom_params
end
|
.lti_environments ⇒ Object
39
40
41
|
# File 'lib/panda_pal.rb', line 39
def self.lti_environments
@@lti_environments.deep_dup
end
|
.lti_environments=(lti_environments) ⇒ Object
35
36
37
|
# File 'lib/panda_pal.rb', line 35
def self.lti_environments=(lti_environments)
@@lti_environments = lti_environments
end
|
.lti_options ⇒ Object
23
24
25
|
# File 'lib/panda_pal.rb', line 23
def self.lti_options
@@lti_options.deep_dup
end
|
.lti_options=(lti_options) ⇒ Object
19
20
21
|
# File 'lib/panda_pal.rb', line 19
def self.lti_options= lti_options
@@lti_options = lti_options
end
|
.lti_paths ⇒ Object
56
57
58
|
# File 'lib/panda_pal.rb', line 56
def self.lti_paths
@@lti_navigation.deep_dup
end
|
.lti_private_key ⇒ Object
60
61
62
63
64
65
66
67
68
|
# File 'lib/panda_pal.rb', line 60
def self.lti_private_key
key = @@lti_private_key.presence
key ||= ENV['LTI_PRIVATE_KEY'].presence
key ||= File.read(File.join( File.dirname(__FILE__), "../config/dev_lti_key.key")) if Rails.env.development?
return nil unless key.present?
key = OpenSSL::PKey::RSA.new(key) if key.is_a?(String)
key
end
|
.lti_private_key=(v) ⇒ Object
70
71
72
|
# File 'lib/panda_pal.rb', line 70
def self.lti_private_key=(v)
@@lti_private_key = k
end
|
.lti_properties ⇒ Object
31
32
33
|
# File 'lib/panda_pal.rb', line 31
def self.lti_properties
@@lti_properties.deep_dup
end
|
.lti_properties=(lti_properties) ⇒ Object
27
28
29
|
# File 'lib/panda_pal.rb', line 27
def self.lti_properties= lti_properties
@@lti_properties = lti_properties
end
|
.register_extension(type, modul) ⇒ Object
74
75
76
77
78
|
# File 'lib/panda_pal.rb', line 74
def self.register_extension(type, modul)
type = normalize_ext_type(type)
@@extensions[type] ||= []
@@extensions[type] << modul.to_s
end
|
.resolved_extensions_for(type) ⇒ Object
84
85
86
87
88
|
# File 'lib/panda_pal.rb', line 84
def self.resolved_extensions_for(type)
extensions_for(type).map do |ext|
ext.safe_constantize
end.compact
end
|
.stage_navigation(navigation, options) ⇒ Object
51
52
53
54
|
# File 'lib/panda_pal.rb', line 51
def self.stage_navigation(navigation, options)
@@lti_navigation[navigation] ||= {}
@@lti_navigation[navigation].merge!(options)
end
|