effective_mentorships 0.3.0 → 0.3.1
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: 51540f932b6939477810dbc83ca434c9a1f645e02ad8ce1bdfbf6ecf97254dbc
|
4
|
+
data.tar.gz: 5561bd5faa4e649f72702f9f861ca0571c47f92f6a719d866e64aead6ccf500d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42f67c456e342f4abf4be9983246c6d01172db3e9a4bb36980c597a74153dc401bb3ac3e8056e94982b6344e5e90e98506c91e215e979451e0fa4f0cb00b8c1a
|
7
|
+
data.tar.gz: 6575760097d8daf6fe4160313eee73eb7c180464cdeaa16a910b5107b7e69be4cce7295c7b5a6c22f44778aa53a0af69639123be69f4850daf9220ca9970a89e
|
@@ -126,9 +126,10 @@ module EffectiveMentorshipsBulkGroup
|
|
126
126
|
|
127
127
|
# Called by Effective::MentorshipsBulkCreateGroupsJob
|
128
128
|
def create_groups!
|
129
|
-
# First pass
|
130
|
-
# Create groups with 1 mentor and 1 best matching mentee each
|
131
129
|
EffectiveMentorships.MentorshipRegistration.uncached do
|
130
|
+
# First pass
|
131
|
+
# Create groups with 1 mentor and 1 best matching mentee each
|
132
|
+
|
132
133
|
# In-person
|
133
134
|
mentors_mentorship_registrations.without_groups.in_person.find_each do |mentor_registration|
|
134
135
|
mentorship_group = build_mentorship_group(mentor_registration)
|
@@ -241,7 +242,7 @@ module EffectiveMentorshipsBulkGroup
|
|
241
242
|
|
242
243
|
# Fill this group to limit of number of mentees
|
243
244
|
limit = [mentor_registration.mentor_multiple_mentees_limit.to_i, max_pairings_mentee].min
|
244
|
-
fill_mentees = (limit - mentorship_group.
|
245
|
+
fill_mentees = (limit - mentorship_group.mentorship_group_users.select(&:mentee?).length) # dont use mentorship_group_mentees here
|
245
246
|
return unless fill_mentees > 0
|
246
247
|
|
247
248
|
# We only support 1 mentor and many mentees
|