panda_pal 5.4.0.beta5 → 5.4.0.beta10
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 +6 -2
- data/lib/panda_pal/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e8e58d3536fde62fef266458e96d98db54f45d91f067050717e17fdc00dcdf2
|
4
|
+
data.tar.gz: 73b390447618698dfaaf87ea6c2372bfb0f8a9cc4f9594b436cf4f29d379407f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 427b3efbb5bc569a2d4c775aac76ce7701a014c03def9ba6066f58cd31f03f6e3099d554cbcfa1a198ed6cf436ab743d5eab2b91109bb5fafa61a751c1115eb0
|
7
|
+
data.tar.gz: 2a11146be413ba7036e9c092fae83b94f7e8dc8a0b9333cdf918995219169a681c5a5dcf9cfa3fd19b19b8e7873ab2b80f9aa106d1d3dded51a9e4de5817a52d
|
@@ -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
|
@@ -13,9 +13,13 @@ module PandaPal::Helpers
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class_methods do
|
16
|
-
def link_nonce_type(value = :not_given)
|
16
|
+
def link_nonce_type(value = :not_given, use_non_app: false)
|
17
17
|
if value == :not_given
|
18
|
-
|
18
|
+
if use_non_app || !defined?(::ApplicationController) || self <= ::ApplicationController
|
19
|
+
@link_nonce_type || superclass.try(:link_nonce_type, use_non_app: true) || :nonce
|
20
|
+
else
|
21
|
+
::ApplicationController.link_nonce_type(value, use_non_app: true)
|
22
|
+
end
|
19
23
|
else
|
20
24
|
@link_nonce_type = value
|
21
25
|
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.beta10
|
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-04-
|
11
|
+
date: 2021-04-16 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
|