coalescing_panda 4.1.8 → 4.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/coalescing_panda/group.rb +1 -1
- data/lib/coalescing_panda/controller_helpers.rb +2 -2
- data/lib/coalescing_panda/version.rb +1 -1
- data/spec/dummy/app/models/account.rb +7 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1009 -0
- data/spec/dummy/log/test.log +66759 -955
- data/spec/helpers/coalescing_panda/canvas_batches_helper_spec.rb +17 -0
- metadata +12 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16a71b9c4e96dc91f00706e4c48d84b680efea19
|
4
|
+
data.tar.gz: 75d4955fa7a91a408bc38641089ce3a01e0d7297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f90f7d05524b519a6d29d077280a276fbe11d8416c75e975705230757c69bf3ce4476b73041b1b24f93513ace1a80606516a5d8e5a11a565d85d8a00a9617edd
|
7
|
+
data.tar.gz: f68a8d67ebbb9edf64216553ad5e67ea3caea0748977c384ef2c0146532dff08d0c3d6d456c4a6604f83d71f74108047a1f1cca056d83d9c50ae0048ee3810e4
|
@@ -3,7 +3,7 @@ module CoalescingPanda
|
|
3
3
|
belongs_to :context, :polymorphic => true
|
4
4
|
include SingleTablePolymorphic
|
5
5
|
|
6
|
-
has_many :group_memberships,
|
6
|
+
has_many :group_memberships, foreign_key: :coalescing_panda_group_id, class_name: 'CoalescingPanda::GroupMembership', dependent: :destroy
|
7
7
|
validates :group_category_id, presence: true
|
8
8
|
validates :canvas_group_id, presence: true
|
9
9
|
validates :coalescing_panda_user_id, presence: true
|
@@ -19,10 +19,10 @@ module CoalescingPanda
|
|
19
19
|
session['custom_canvas_account_id'] = params['custom_canvas_account_id']
|
20
20
|
|
21
21
|
if token = CanvasApiAuth.where('user_id = ? and api_domain = ?', user_id, api_domain).pluck(:api_token).first
|
22
|
-
@client = Bearcat::Client.new(token: token, prefix: scheme
|
22
|
+
@client = Bearcat::Client.new(token: token, prefix: [scheme, api_domain].join)
|
23
23
|
elsif @lti_account = params['oauth_consumer_key'] && LtiAccount.find_by_key(params['oauth_consumer_key'])
|
24
24
|
client_id = @lti_account.oauth2_client_id
|
25
|
-
client = Bearcat::Client.new(prefix: scheme
|
25
|
+
client = Bearcat::Client.new(prefix: [scheme, api_domain].join)
|
26
26
|
session['state'] = SecureRandom.hex(32)
|
27
27
|
@canvas_url = client.auth_redirect_url(client_id,
|
28
28
|
coalescing_panda.oauth2_redirect_url({key: params['oauth_consumer_key'],
|
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
class Account < CoalescingPanda::LtiAccount
|
3
|
+
has_many :terms, foreign_key: :coalescing_panda_lti_account_id, class_name: 'Term'
|
4
|
+
has_many :courses, foreign_key: :coalescing_panda_lti_account_id, class_name: 'Course'
|
5
|
+
has_many :users, foreign_key: :coalescing_panda_lti_account_id, class_name: 'User'
|
6
|
+
end
|
7
|
+
|
Binary file
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|