coalescing_panda 4.5.2 → 4.5.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b4aede28621dfdb6cd92e5ba3fa0c9e9a4e0d7c
|
|
4
|
+
data.tar.gz: 52c623c17029c425d57a989b28385c078eae11fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba9772fea35da103ec7c34d0769031073373195026dd46f87f5bd7608fedeb6bb51d817856a2cb8b4ed93648f2eeabfd868382ee5e573d197cad57c3f45c7f4e
|
|
7
|
+
data.tar.gz: acb282dafdc80b8228bb9033260cfd529d64c7201d896e11a0268a51b2cedaa0fe0796c09f8c2ebeda437d2a9e62137b9e5451e6df95c49192506e24ae1beeda
|
|
@@ -87,13 +87,11 @@ class CoalescingPanda::Workers::AccountMiner
|
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
removed_courses = account.courses.where.not(id: course_ids)
|
|
90
|
+
account.submissions.where(coalescing_panda_course_id: removed_courses.map(&:id)).destroy_all
|
|
90
91
|
removed_courses.each do |course|
|
|
91
|
-
course.enrollments.
|
|
92
|
-
account.submissions.where(coalescing_panda_course_id: enrollment.course.id).destroy_all
|
|
93
|
-
enrollment.destroy
|
|
94
|
-
end
|
|
92
|
+
course.enrollments.destroy_all
|
|
95
93
|
end
|
|
96
|
-
|
|
94
|
+
removed_courses.destroy_all
|
|
97
95
|
end
|
|
98
96
|
|
|
99
97
|
def sync_users(collection)
|
|
@@ -111,11 +109,9 @@ class CoalescingPanda::Workers::AccountMiner
|
|
|
111
109
|
end
|
|
112
110
|
end
|
|
113
111
|
removed_users = account.users.where.not(id: user_ids)
|
|
112
|
+
account.submissions.where(coalescing_panda_user_id: removed_users.map(&:id)).destroy_all
|
|
114
113
|
removed_users.each do |user|
|
|
115
|
-
user.enrollments.
|
|
116
|
-
account.submissions.where(coalescing_panda_user_id: enrollment.user.id).destroy_all
|
|
117
|
-
enrollment.destroy
|
|
118
|
-
end
|
|
114
|
+
user.enrollments.destroy_all
|
|
119
115
|
end
|
|
120
116
|
removed_users.destroy_all
|
|
121
117
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: coalescing_panda
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.5.
|
|
4
|
+
version: 4.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Mills
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2017-
|
|
13
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|