panda_pal 5.8.2 → 5.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e48b08205aab332114679529d8efcb01f2af51ef1d913f4aed97c15e3c58a44d
4
- data.tar.gz: 9159e76227ba1447a6e3a989bf06bc484db681599a8be5f96d979edc71747271
3
+ metadata.gz: cd953a87fa9112452135474919816d3955cd83240d3814534a9d0cce715ab648
4
+ data.tar.gz: 833ce3c958a66074f62f31fe24212bab4937aa08f8b77103aa509d649fd3a641
5
5
  SHA512:
6
- metadata.gz: 790743e7d2524f5fce5e675852ac0c219b7936f88d9e6e8e094e57bc3b9dfd4025c6435b708e6b175a461ed5fc89345d8aa9dc8bcac91fea8790908dd1c12b10
7
- data.tar.gz: 152ba84e0ea76a8e0844b2a9374ed0d9af8c512c5e755cd64a41cdd1bc59f1d83d95bdac2d01bd62b167cd4fff98db63da91c4b4c212faf2fba19ba5486b752e
6
+ metadata.gz: 434bd73034d184046b7683e0fcccb35cff695ce4efcbc217047b8058ee5d7b5c81c2295973da79b5b64ca395992d864fdcc1f4b1876cb532d1402cefb5781af1
7
+ data.tar.gz: 7bfb9934d3caad860a1f141b35c8ab65347803da6c737fbe15fc5a85356044eba6fd43470654fd7bba925611b4c1ef59ce3c1e245a17cb242a956683d708dcc2
@@ -88,7 +88,7 @@ module PandaPal
88
88
  ctype, cid = _parse_lti_context(context)
89
89
 
90
90
  if version == 'v1p0'
91
- existing_installs = _find_existing_installs(exists: exists) do |lti|
91
+ existing_installs = _find_existing_installs(context, exists: exists) do |lti|
92
92
  lti[:consumer_key] == self.key
93
93
  end
94
94
 
@@ -12,6 +12,23 @@ module PandaPal
12
12
  @lti_platform ||= Platform.from_serialized(data[:lti_platform])
13
13
  end
14
14
 
15
+ def custom_lti_params
16
+ launch_params = data[:launch_params] || {}
17
+
18
+ # LT 1.3
19
+ custom_params = launch_params["https://purl.imsglobal.org/spec/lti/claim/custom"]
20
+ return custom_params if custom_params.present?
21
+
22
+ # LTI 1.0/1.1
23
+ custom_params = {}
24
+ launch_params.each do |k, v|
25
+ next unless k.start_with?("custom_")
26
+ custom_params[k[7..-1]] = v
27
+ end
28
+
29
+ custom_params.with_indifferent_access
30
+ end
31
+
15
32
  class DataSerializer
16
33
  def self.load(str)
17
34
  return {} unless str.present?
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.8.2"
2
+ VERSION = "5.8.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.2
4
+ version: 5.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-24 00:00:00.000000000 Z
11
+ date: 2023-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -282,7 +282,7 @@ dependencies:
282
282
  - - '='
283
283
  - !ruby/object:Gem::Version
284
284
  version: 2.7.1
285
- description:
285
+ description:
286
286
  email:
287
287
  - pseng@instructure.com
288
288
  executables: []
@@ -394,7 +394,7 @@ homepage: http://instructure.com
394
394
  licenses:
395
395
  - MIT
396
396
  metadata: {}
397
- post_install_message:
397
+ post_install_message:
398
398
  rdoc_options: []
399
399
  require_paths:
400
400
  - lib
@@ -410,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
410
  version: '0'
411
411
  requirements: []
412
412
  rubygems_version: 3.1.6
413
- signing_key:
413
+ signing_key:
414
414
  specification_version: 4
415
415
  summary: LTI mountable engine
416
416
  test_files: