coalescing_panda 4.0.6 → 4.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/coalescing_panda/workers/course_miner.rb +4 -1
- data/lib/coalescing_panda/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +11529 -37157
- metadata +43 -47
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -628
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aa343308804a8cc89f65148286e4bde3ff98769
|
|
4
|
+
data.tar.gz: da8517865c918e50f8fa07dbd900a4c5e4ea7f79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a07a47627f297e2899e6e24f46b4adede5e76b9a5085d44431fd2a5bf7ca885415e91f1f871fb6865f3552312da8b786fd97bf718719a723c16e29e3e6bdf4d4
|
|
7
|
+
data.tar.gz: 88076a495df0f172fc84736732d8a67f11e0cc430fb538f131327412c947b2471efb8622e859a0498ca36910e18bbe1bbccc65b67888d2997b2cd7abb99f8179
|
|
@@ -3,7 +3,7 @@ class CoalescingPanda::Workers::CourseMiner
|
|
|
3
3
|
COMPLETED_STATUSES = ['Completed', 'Error']
|
|
4
4
|
RUNNING_STATUSES = ['Queued', 'Started']
|
|
5
5
|
|
|
6
|
-
attr_accessor :options, :account, :course, :batch, :course_section_ids, :enrollment_ids, :assignment_ids, :assignment_group_ids, :group_ids, :user_ids
|
|
6
|
+
attr_accessor :options, :account, :course, :batch, :course_section_ids, :enrollment_ids, :assignment_ids, :assignment_group_ids, :group_ids, :group_membership_ids, :user_ids
|
|
7
7
|
|
|
8
8
|
def initialize(course, options = [])
|
|
9
9
|
@course = course
|
|
@@ -15,6 +15,7 @@ class CoalescingPanda::Workers::CourseMiner
|
|
|
15
15
|
@assignment_ids = []
|
|
16
16
|
@assignment_group_ids = []
|
|
17
17
|
@group_ids = []
|
|
18
|
+
@group_membership_ids = []
|
|
18
19
|
@user_ids = []
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -269,10 +270,12 @@ class CoalescingPanda::Workers::CourseMiner
|
|
|
269
270
|
group_membership.user = course.users.find_by(canvas_user_id: values['user_id'].to_s)
|
|
270
271
|
group_membership.assign_attributes(standard_attributes(group_membership, values))
|
|
271
272
|
group_membership.save(validate: false)
|
|
273
|
+
group_membership_ids << group_membership.id
|
|
272
274
|
rescue => e
|
|
273
275
|
Rails.logger.error "Error syncing group memebership: #{values} Error: #{e}"
|
|
274
276
|
end
|
|
275
277
|
end
|
|
278
|
+
course.group_memberships.where.not(id: group_membership_ids).destroy_all
|
|
276
279
|
end
|
|
277
280
|
|
|
278
281
|
def standard_attributes(record, attributes)
|
data/spec/dummy/db/test.sqlite3
CHANGED
|
Binary file
|