panda_pal 5.4.0.beta6 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{lib → app/jobs}/panda_pal/jobs/grade_passback_job.rb +2 -2
- data/app/models/panda_pal/organization.rb +4 -0
- data/lib/panda_pal.rb +25 -0
- data/lib/panda_pal/engine.rb +4 -0
- data/lib/panda_pal/helpers.rb +1 -0
- data/lib/panda_pal/{ability_mixin.rb → helpers/ability_mixin.rb} +0 -0
- data/lib/panda_pal/helpers/session_replacement.rb +5 -5
- data/lib/panda_pal/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f9acd1140343a82865441f59754c28df08780876b234cad3f7cbfdaa8a1261
|
4
|
+
data.tar.gz: 33c8718d1171d76b38ba8e77793de352bacc03f1f7c6fa2da31e2f69b412e609
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c68e57f0abcd6e2f46a22f15757294c0b9002039a61e7e66cda233edcf2cf0a26eda9247520f163b37ce3b9c56f1be2b09705fe59fa031c2be70d0065db60e49
|
7
|
+
data.tar.gz: 87c0bb93619507cd6e90c7b3dd1726a5522e6ceb0eaa7ee898c836953080c7ec941e7ddda489e6482d55388c582a61915018730dba7c4f845bf73b2a572c135d
|
@@ -4,10 +4,10 @@ module PandaPal::Jobs
|
|
4
4
|
class GradePassbackFailure < StandardError; end
|
5
5
|
|
6
6
|
class GradePassbackJob < ActiveJob::Base
|
7
|
-
sidekiq_options retry: 5
|
8
|
-
|
9
7
|
attr_accessor :organization, :opts
|
10
8
|
|
9
|
+
sidekiq_options(retry: 5) if respond_to?(:sidekiq_options)
|
10
|
+
|
11
11
|
# Required values for opts: passback_guid, passback_url, score AND/OR total_score.
|
12
12
|
# Possible values for opts: cdata_text, text, url, submitted_at, lti_launch_url.
|
13
13
|
# passback_guid is sent in launch params as 'lis_result_sourcedid'.
|
data/lib/panda_pal.rb
CHANGED
@@ -13,6 +13,7 @@ module PandaPal
|
|
13
13
|
@@lti_properties = {}
|
14
14
|
@@lti_environments = {}
|
15
15
|
@@lti_custom_params = {}
|
16
|
+
@@extensions = {}
|
16
17
|
@@lti_private_key = nil
|
17
18
|
|
18
19
|
def self.lti_options= lti_options
|
@@ -70,8 +71,30 @@ module PandaPal
|
|
70
71
|
@@lti_private_key = k
|
71
72
|
end
|
72
73
|
|
74
|
+
def self.register_extension(type, modul)
|
75
|
+
type = normalize_ext_type(type)
|
76
|
+
@@extensions[type] ||= []
|
77
|
+
@@extensions[type] << modul.to_s
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.extensions_for(type)
|
81
|
+
(@@extensions[normalize_ext_type(type)] || []).uniq
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.resolved_extensions_for(type)
|
85
|
+
extensions_for(type).map do |ext|
|
86
|
+
ext.safe_constantize
|
87
|
+
end.compact
|
88
|
+
end
|
89
|
+
|
73
90
|
private
|
74
91
|
|
92
|
+
def self.normalize_ext_type(type)
|
93
|
+
type = type.to_s
|
94
|
+
type = "#{self.to_s}::#{type}" unless type.starts_with?('::') || type.starts_with?(self.to_s)
|
95
|
+
type
|
96
|
+
end
|
97
|
+
|
75
98
|
def self.validate_pandapal_config!
|
76
99
|
errors = []
|
77
100
|
validate_lti_navigation(errors)
|
@@ -89,3 +112,5 @@ module PandaPal
|
|
89
112
|
errors
|
90
113
|
end
|
91
114
|
end
|
115
|
+
|
116
|
+
PandaPal.register_extension 'Organization', '::OrganizationExtension'
|
data/lib/panda_pal/engine.rb
CHANGED
@@ -43,6 +43,10 @@ module PandaPal
|
|
43
43
|
ActiveSupport.on_load(:active_record) do
|
44
44
|
if defined?(Sidekiq) && Sidekiq.server? && PandaPal::Organization.respond_to?(:sync_schedules)
|
45
45
|
PandaPal::Organization.sync_schedules
|
46
|
+
|
47
|
+
ActiveSupport::Reloader.to_prepare do
|
48
|
+
PandaPal::Organization.sync_schedules
|
49
|
+
end
|
46
50
|
end
|
47
51
|
end
|
48
52
|
end
|
data/lib/panda_pal/helpers.rb
CHANGED
File without changes
|
@@ -14,14 +14,14 @@ module PandaPal::Helpers
|
|
14
14
|
|
15
15
|
class_methods do
|
16
16
|
def link_nonce_type(value = :not_given, use_non_app: false)
|
17
|
-
if
|
18
|
-
if
|
19
|
-
@link_nonce_type || superclass.try(:link_nonce_type) || :nonce
|
17
|
+
if value == :not_given
|
18
|
+
if use_non_app || !defined?(::ApplicationController) || self <= ::ApplicationController
|
19
|
+
@link_nonce_type || superclass.try(:link_nonce_type, use_non_app: true) || :nonce
|
20
20
|
else
|
21
|
-
|
21
|
+
::ApplicationController.link_nonce_type(value, use_non_app: true)
|
22
22
|
end
|
23
23
|
else
|
24
|
-
|
24
|
+
@link_nonce_type = value
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/lib/panda_pal/version.rb
CHANGED
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.4.0
|
4
|
+
version: 5.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure ProServe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- app/controllers/panda_pal/lti_v1_p0_controller.rb
|
219
219
|
- app/controllers/panda_pal/lti_v1_p3_controller.rb
|
220
220
|
- app/helpers/panda_pal/application_helper.rb
|
221
|
+
- app/jobs/panda_pal/jobs/grade_passback_job.rb
|
221
222
|
- app/lib/lti_xml/base_platform.rb
|
222
223
|
- app/lib/lti_xml/bridge_platform.rb
|
223
224
|
- app/lib/lti_xml/canvas_platform.rb
|
@@ -244,14 +245,13 @@ files:
|
|
244
245
|
- db/migrate/20171205183457_encrypt_organization_settings.rb
|
245
246
|
- db/migrate/20171205194657_remove_old_organization_settings.rb
|
246
247
|
- lib/panda_pal.rb
|
247
|
-
- lib/panda_pal/ability_mixin.rb
|
248
248
|
- lib/panda_pal/engine.rb
|
249
249
|
- lib/panda_pal/helpers.rb
|
250
|
+
- lib/panda_pal/helpers/ability_mixin.rb
|
250
251
|
- lib/panda_pal/helpers/controller_helper.rb
|
251
252
|
- lib/panda_pal/helpers/route_helper.rb
|
252
253
|
- lib/panda_pal/helpers/secure_headers.rb
|
253
254
|
- lib/panda_pal/helpers/session_replacement.rb
|
254
|
-
- lib/panda_pal/jobs/grade_passback_job.rb
|
255
255
|
- lib/panda_pal/plugins.rb
|
256
256
|
- lib/panda_pal/version.rb
|
257
257
|
- lib/tasks/panda_pal_tasks.rake
|
@@ -315,9 +315,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
315
315
|
version: '0'
|
316
316
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
317
317
|
requirements:
|
318
|
-
- - "
|
318
|
+
- - ">="
|
319
319
|
- !ruby/object:Gem::Version
|
320
|
-
version:
|
320
|
+
version: '0'
|
321
321
|
requirements: []
|
322
322
|
rubygems_version: 3.0.3
|
323
323
|
signing_key:
|