effective_learndash 0.1.5 → 0.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf3a76614af4d9fba4a5d9e483ecfc78ec821c042643b0d59508b42f80aead20
|
4
|
+
data.tar.gz: 3e383233f17438db0bc4c134e8fb767183b3697b0036100ddf89e80961b42332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73041dc5fa8d6e130f865cd0ed5acf4c966ff1d7148168d6482f582f68c29d86fd8521c6d23aeb35227ca1f70810bd54b88408527767c3654b0998f8f6513d37
|
7
|
+
data.tar.gz: 58d39dc3138ff44d2be3152aba69734f7f83146714b1b79a44b084cdc05dcd865974e457b4f61c2c3dd2436e5a81b709db7ea3cde5b68b807a325bf28df7c58e
|
@@ -87,9 +87,9 @@ module EffectiveLearndashCourseRegistration
|
|
87
87
|
course_registrants
|
88
88
|
end
|
89
89
|
|
90
|
+
# Enroll them in all courses.
|
90
91
|
def after_submit_purchased!
|
91
|
-
|
92
|
-
learndash_owner.create_learndash_enrollment(course: learndash_course)
|
92
|
+
course_registrants.each { |registrant| registrant.owner.create_learndash_enrollment(course: registrant.learndash_course) }
|
93
93
|
end
|
94
94
|
|
95
95
|
end
|
@@ -116,7 +116,7 @@ module EffectiveLearndashCourseRegistration
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def build_course_registrant
|
119
|
-
course_registrants.build(owner: owner)
|
119
|
+
course_registrants.build(owner: owner, learndash_course: learndash_course)
|
120
120
|
end
|
121
121
|
|
122
122
|
def learndash_owner
|
@@ -151,7 +151,7 @@ module EffectiveLearndashCourseRegistration
|
|
151
151
|
|
152
152
|
# Assign prices
|
153
153
|
assign_pricing()
|
154
|
-
raise('expected
|
154
|
+
raise('expected course_registrants to have a price') if course_registrants.any? { |registrant| registrant.price.blank? }
|
155
155
|
|
156
156
|
# Save record
|
157
157
|
save!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_learndash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|