panda_pal 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/panda_pal/lti_controller.rb +7 -3
- data/lib/panda_pal/version.rb +1 -1
- data/lib/panda_pal.rb +9 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec363ec0b5ca735237ea01b194dda78320eadf5
|
4
|
+
data.tar.gz: 397cf50a70cac0e961a96f01f95ee2eea8666f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f3a1e05a1ac97b39816a77f7c29c587ff252b148a683ae1139821c883ecbf7368a9abdf6b21280292c85732df785d132e3e5c474798346be18ab9feff85e1ff
|
7
|
+
data.tar.gz: 82789e5edf44b8dd4a1ec30e1f70b70b662f5ed8657265490900d8c3fdcd3c40fa6258805c38057454833ee4efae01b27b0b33a3cdcb8c7a6408ad394000f9e3
|
@@ -5,6 +5,7 @@ module PandaPal
|
|
5
5
|
|
6
6
|
def tool_config
|
7
7
|
lti_options = PandaPal.lti_options
|
8
|
+
lti_properties = PandaPal.lti_properties
|
8
9
|
lti_nav = PandaPal.lti_paths
|
9
10
|
lti_environments = PandaPal.lti_environments
|
10
11
|
lti_custom_params = PandaPal.lti_custom_params
|
@@ -17,8 +18,11 @@ module PandaPal
|
|
17
18
|
platform = lti_options.delete(:platform) || 'canvas.instructure.com'
|
18
19
|
host = "#{request.scheme}://#{request.host_with_port}"
|
19
20
|
tc = IMS::LTI::Services::ToolConfig.new(:title => lti_options[:title], :launch_url => ("#{host}#{lti_options[:launch_route]}") || 'ABC')
|
20
|
-
tc.set_ext_param(platform, :domain, request.host)
|
21
|
-
tc.set_ext_param(platform, :privacy_level, 'public')
|
21
|
+
tc.set_ext_param(platform, :domain, request.host) unless lti_properties.has_key?(:domain)
|
22
|
+
tc.set_ext_param(platform, :privacy_level, 'public') unless lti_properties.has_key?(:public)
|
23
|
+
lti_properties.each do |k, v|
|
24
|
+
tc.set_ext_param(platform, k, v)
|
25
|
+
end
|
22
26
|
lti_custom_params.each do |k, v|
|
23
27
|
tc.set_custom_param k, v
|
24
28
|
end
|
@@ -43,7 +47,7 @@ module PandaPal
|
|
43
47
|
|
44
48
|
def ext_params(options)
|
45
49
|
url = options.delete(:url)
|
46
|
-
options[:url] = main_app.send([url,'_url'].join)
|
50
|
+
options[:url] = main_app.send([url, '_url'].join)
|
47
51
|
options
|
48
52
|
end
|
49
53
|
end
|
data/lib/panda_pal/version.rb
CHANGED
data/lib/panda_pal.rb
CHANGED
@@ -9,6 +9,7 @@ module PandaPal
|
|
9
9
|
@@lti_navigation = {}
|
10
10
|
@@staged_navigation = {}
|
11
11
|
@@lti_options = {}
|
12
|
+
@@lti_properties = {}
|
12
13
|
@@lti_environments = {}
|
13
14
|
@@lti_custom_params = {}
|
14
15
|
|
@@ -20,6 +21,14 @@ module PandaPal
|
|
20
21
|
@@lti_options.deep_dup
|
21
22
|
end
|
22
23
|
|
24
|
+
def self.lti_properties= lti_properties
|
25
|
+
@@lti_properties = lti_properties
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.lti_properties
|
29
|
+
@@lti_properties.deep_dup
|
30
|
+
end
|
31
|
+
|
23
32
|
def self.lti_environments=(lti_environments)
|
24
33
|
@@lti_environments = lti_environments
|
25
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_pal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Young
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.
|
212
|
+
rubygems_version: 2.2.2
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: LTI mountable engine
|
@@ -258,3 +258,4 @@ test_files:
|
|
258
258
|
- spec/models/panda_pal/session_spec.rb
|
259
259
|
- spec/rails_helper.rb
|
260
260
|
- spec/spec_helper.rb
|
261
|
+
has_rdoc:
|