coalescing_panda 3.1.14 → 3.2.0

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: 75bb0823e059437a2bedb8ca7ab4466acf23c8ed
4
- data.tar.gz: 968119a570275210936b6be62b9ad2edf4d057ac
3
+ metadata.gz: 9ef35686d23d7f299ecc2807b2435732888589cf
4
+ data.tar.gz: 51613fba18fa072c99adda16f4e9284808d793fc
5
5
  SHA512:
6
- metadata.gz: d39869116feb62358aa9624cc11f8da32d527b42508dab31ccbc6b1718987aa55227dc17176835cead154af82c8af37a1097a9c0121acae7c72c88f355823878
7
- data.tar.gz: 9542ef19da48cbb910e8d810ab5153bf3ee288ea57342229277fa545345bbc0e71e62922cad286fe7893d9a18b4f0438de2fdd4f6cd576c6a89ea882ba952c8c
6
+ metadata.gz: 64a522af26c2c7eda7c5b3f6127d5706acba6a73dbe6aa90a873f7740ba4ac6ed36d1ec061d529e1b31f58a04df96fcb6647839148cee2266b07e2675dd9fec3
7
+ data.tar.gz: 477682394ab7feefcf5b30f51b9c3d8cb5f2a8c2aac7612fa58979f46d071bd03a119c03836cdf35bdf40a0ad9b20553880bb2ab0ac1d4571a1648919deefaf9
@@ -1,5 +1,6 @@
1
1
  module CoalescingPanda
2
2
  class CanvasBatch < ActiveRecord::Base
3
+ belongs_to :context, polymorphic: true
3
4
  default_scope { order('created_at DESC') }
4
5
  end
5
6
  end
@@ -9,6 +9,7 @@ module CoalescingPanda
9
9
  has_many :users, through: :sections, source: :users, class_name: 'CoalescingPanda::User'
10
10
  has_many :groups, :as => :context, class_name: 'CoalescingPanda::Group'
11
11
  has_many :group_memberships, through: :groups, source: :group_memberships, class_name: 'CoalescingPanda::GroupMembership'
12
+ has_many :canvas_batches, as: :context
12
13
 
13
14
  validates :coalescing_panda_lti_account_id, presence: true
14
15
  validates :canvas_course_id, presence: true
@@ -7,7 +7,7 @@ class CoalescingPanda::Workers::CourseMiner
7
7
  @course = course
8
8
  @account = course.account
9
9
  @options = options
10
- @batch = CoalescingPanda::CanvasBatch.create(status: "Queued")
10
+ @batch = CoalescingPanda::CanvasBatch.create(context: course, status: "Queued")
11
11
  end
12
12
 
13
13
  def api_client
@@ -0,0 +1,6 @@
1
+ class AddContextToCanvasBatch < ActiveRecord::Migration
2
+ def change
3
+ add_column :coalescing_panda_canvas_batches, :context_id, :integer
4
+ add_column :coalescing_panda_canvas_batches, :context_type, :string
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module CoalescingPanda
2
- VERSION = '3.1.14'
2
+ VERSION = '3.2.0'
3
3
  end
Binary file
@@ -11,13 +11,14 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150107205413) do
14
+ ActiveRecord::Schema.define(version: 20150210180516) do
15
15
 
16
16
  create_table "coalescing_panda_assignments", force: true do |t|
17
- t.integer "coalescing_panda_course_id", null: false
17
+ t.integer "coalescing_panda_course_id"
18
18
  t.string "name"
19
- t.text "description"
20
- t.string "canvas_assignment_id", null: false
19
+ t.string "description"
20
+ t.string "canvas_assignment_id"
21
+ t.string "sis_id"
21
22
  t.string "workflow_state"
22
23
  t.float "points_possible"
23
24
  t.datetime "due_at"
@@ -31,7 +32,9 @@ ActiveRecord::Schema.define(version: 20150107205413) do
31
32
  t.boolean "published"
32
33
  end
33
34
 
34
- add_index "coalescing_panda_assignments", ["coalescing_panda_course_id", "canvas_assignment_id"], name: "index_assignments_course", unique: true
35
+ add_index "coalescing_panda_assignments", ["canvas_assignment_id"], name: "index_coalescing_panda_assignments_on_canvas_assignment_id"
36
+ add_index "coalescing_panda_assignments", ["coalescing_panda_course_id"], name: "index_assignments_course"
37
+ add_index "coalescing_panda_assignments", ["sis_id"], name: "index_coalescing_panda_assignments_on_sis_id"
35
38
 
36
39
  create_table "coalescing_panda_canvas_api_auths", force: true do |t|
37
40
  t.string "user_id"
@@ -47,13 +50,15 @@ ActiveRecord::Schema.define(version: 20150107205413) do
47
50
  t.text "message"
48
51
  t.datetime "created_at"
49
52
  t.datetime "updated_at"
53
+ t.string "context_id"
54
+ t.string "context_type"
50
55
  end
51
56
 
52
57
  create_table "coalescing_panda_courses", force: true do |t|
53
- t.integer "coalescing_panda_lti_account_id", null: false
58
+ t.integer "coalescing_panda_lti_account_id"
54
59
  t.integer "coalescing_panda_term_id"
55
60
  t.string "name"
56
- t.string "canvas_course_id", null: false
61
+ t.string "canvas_course_id"
57
62
  t.string "sis_id"
58
63
  t.datetime "start_at"
59
64
  t.datetime "conclude_at"
@@ -63,24 +68,25 @@ ActiveRecord::Schema.define(version: 20150107205413) do
63
68
  t.datetime "updated_at"
64
69
  end
65
70
 
66
- add_index "coalescing_panda_courses", ["coalescing_panda_lti_account_id", "canvas_course_id"], name: "index_courses_account", unique: true
67
- add_index "coalescing_panda_courses", ["coalescing_panda_term_id", "canvas_course_id"], name: "index_courses_term", unique: true
71
+ add_index "coalescing_panda_courses", ["canvas_course_id"], name: "index_coalescing_panda_courses_on_canvas_course_id"
72
+ add_index "coalescing_panda_courses", ["coalescing_panda_lti_account_id"], name: "index_courses_account"
73
+ add_index "coalescing_panda_courses", ["coalescing_panda_term_id"], name: "index_courses_term"
68
74
  add_index "coalescing_panda_courses", ["sis_id"], name: "index_coalescing_panda_courses_on_sis_id"
69
75
 
70
76
  create_table "coalescing_panda_enrollments", force: true do |t|
71
- t.integer "coalescing_panda_user_id", null: false
72
- t.integer "coalescing_panda_section_id", null: false
77
+ t.integer "coalescing_panda_user_id"
78
+ t.integer "coalescing_panda_section_id"
73
79
  t.string "workflow_state"
74
80
  t.string "sis_id"
75
- t.string "canvas_enrollment_id", null: false
76
- t.string "enrollment_type"
81
+ t.string "canvas_enrollment_id"
77
82
  t.datetime "start_at"
78
83
  t.datetime "end_at"
79
84
  t.datetime "created_at"
80
85
  t.datetime "updated_at"
81
86
  end
82
87
 
83
- add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id", "enrollment_type"], name: "index_enrollments_user_and_section", unique: true
88
+ add_index "coalescing_panda_enrollments", ["canvas_enrollment_id"], name: "index_coalescing_panda_enrollments_on_canvas_enrollment_id"
89
+ add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id"], name: "index_enrollments_user_and_assignment"
84
90
  add_index "coalescing_panda_enrollments", ["sis_id"], name: "index_coalescing_panda_enrollments_on_sis_id"
85
91
 
86
92
  create_table "coalescing_panda_group_memberships", force: true do |t|
@@ -110,10 +116,10 @@ ActiveRecord::Schema.define(version: 20150107205413) do
110
116
  t.string "secret"
111
117
  t.string "oauth2_client_id"
112
118
  t.string "oauth2_client_key"
113
- t.string "canvas_account_id"
114
- t.text "settings"
115
119
  t.datetime "created_at"
116
120
  t.datetime "updated_at"
121
+ t.text "settings"
122
+ t.string "canvas_account_id"
117
123
  end
118
124
 
119
125
  create_table "coalescing_panda_lti_nonces", force: true do |t|
@@ -123,9 +129,9 @@ ActiveRecord::Schema.define(version: 20150107205413) do
123
129
  end
124
130
 
125
131
  create_table "coalescing_panda_sections", force: true do |t|
126
- t.integer "coalescing_panda_course_id", null: false
132
+ t.integer "coalescing_panda_course_id"
127
133
  t.string "name"
128
- t.string "canvas_section_id", null: false
134
+ t.string "canvas_section_id"
129
135
  t.string "sis_id"
130
136
  t.string "workflow_state"
131
137
  t.datetime "start_at"
@@ -134,7 +140,8 @@ ActiveRecord::Schema.define(version: 20150107205413) do
134
140
  t.datetime "updated_at"
135
141
  end
136
142
 
137
- add_index "coalescing_panda_sections", ["coalescing_panda_course_id", "canvas_section_id"], name: "index_sections_course", unique: true
143
+ add_index "coalescing_panda_sections", ["canvas_section_id"], name: "index_coalescing_panda_sections_on_canvas_section_id"
144
+ add_index "coalescing_panda_sections", ["coalescing_panda_course_id"], name: "index_coalescing_panda_sections_on_coalescing_panda_course_id"
138
145
  add_index "coalescing_panda_sections", ["sis_id"], name: "index_coalescing_panda_sections_on_sis_id"
139
146
 
140
147
  create_table "coalescing_panda_sessions", force: true do |t|
@@ -145,27 +152,27 @@ ActiveRecord::Schema.define(version: 20150107205413) do
145
152
  end
146
153
 
147
154
  create_table "coalescing_panda_submissions", force: true do |t|
148
- t.integer "coalescing_panda_user_id", null: false
149
- t.integer "coalescing_panda_assignment_id", null: false
155
+ t.integer "coalescing_panda_user_id"
156
+ t.integer "coalescing_panda_assignment_id"
150
157
  t.string "url"
151
158
  t.string "grade"
152
159
  t.string "score"
153
160
  t.datetime "submitted_at"
154
161
  t.string "workflow_state"
155
- t.string "canvas_submission_id", null: false
162
+ t.string "canvas_submission_id"
156
163
  t.datetime "created_at"
157
164
  t.datetime "updated_at"
158
165
  end
159
166
 
160
167
  add_index "coalescing_panda_submissions", ["canvas_submission_id"], name: "index_coalescing_panda_submissions_on_canvas_submission_id"
161
- add_index "coalescing_panda_submissions", ["coalescing_panda_user_id", "coalescing_panda_assignment_id", "canvas_submission_id"], name: "index_submissions_user_and_assignment", unique: true
168
+ add_index "coalescing_panda_submissions", ["coalescing_panda_user_id", "coalescing_panda_assignment_id"], name: "index_submissions_user_and_assignment"
162
169
 
163
170
  create_table "coalescing_panda_terms", force: true do |t|
164
- t.integer "coalescing_panda_lti_account_id", null: false
171
+ t.integer "coalescing_panda_lti_account_id"
165
172
  t.string "name"
166
173
  t.string "code"
167
174
  t.string "sis_id"
168
- t.string "canvas_term_id", null: false
175
+ t.string "canvas_term_id"
169
176
  t.datetime "start_at"
170
177
  t.datetime "end_at"
171
178
  t.string "workflow_state"
@@ -173,22 +180,23 @@ ActiveRecord::Schema.define(version: 20150107205413) do
173
180
  t.datetime "updated_at"
174
181
  end
175
182
 
176
- add_index "coalescing_panda_terms", ["canvas_term_id", "coalescing_panda_lti_account_id"], name: "index_terms_account", unique: true
183
+ add_index "coalescing_panda_terms", ["canvas_term_id"], name: "index_coalescing_panda_terms_on_canvas_term_id"
177
184
  add_index "coalescing_panda_terms", ["sis_id"], name: "index_coalescing_panda_terms_on_sis_id"
178
185
 
179
186
  create_table "coalescing_panda_users", force: true do |t|
180
- t.integer "coalescing_panda_lti_account_id", null: false
187
+ t.integer "coalescing_panda_lti_account_id"
181
188
  t.string "name"
182
189
  t.string "email"
183
190
  t.string "roles"
184
191
  t.string "workflow_state"
185
192
  t.string "sis_id"
186
- t.string "canvas_user_id", null: false
193
+ t.string "canvas_user_id"
187
194
  t.datetime "created_at"
188
195
  t.datetime "updated_at"
189
196
  end
190
197
 
191
- add_index "coalescing_panda_users", ["coalescing_panda_lti_account_id", "canvas_user_id"], name: "index_users_account", unique: true
198
+ add_index "coalescing_panda_users", ["canvas_user_id"], name: "index_coalescing_panda_users_on_canvas_user_id"
199
+ add_index "coalescing_panda_users", ["coalescing_panda_lti_account_id"], name: "index_users_account"
192
200
  add_index "coalescing_panda_users", ["sis_id"], name: "index_coalescing_panda_users_on_sis_id"
193
201
 
194
202
  create_table "delayed_jobs", force: true do |t|
@@ -180,3 +180,11 @@ Migrating to CreateCoalescingPandaGroupMemberships (20150107205413)
180
180
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150107205413"]]
181
181
   (0.9ms) commit transaction
182
182
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
183
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
184
+ Migrating to AddContextToCanvasBatch (20150210180516)
185
+  (0.1ms) begin transaction
186
+  (0.6ms) ALTER TABLE "coalescing_panda_canvas_batches" ADD "context_id" varchar(255)
187
+  (0.1ms) ALTER TABLE "coalescing_panda_canvas_batches" ADD "context_type" varchar(255)
188
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150210180516"]]
189
+  (0.8ms) commit transaction
190
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
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: 3.1.14
4
+ version: 3.2.0
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: 2015-01-08 00:00:00.000000000 Z
13
+ date: 2015-02-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -364,6 +364,7 @@ files:
364
364
  - db/migrate/20150106180131_add_published_to_assignments.rb
365
365
  - db/migrate/20150107205405_create_coalescing_panda_groups.rb
366
366
  - db/migrate/20150107205413_create_coalescing_panda_group_memberships.rb
367
+ - db/migrate/20150210180516_add_context_to_canvas_batch.rb
367
368
  - lib/coalescing_panda.rb
368
369
  - lib/coalescing_panda/controller_helpers.rb
369
370
  - lib/coalescing_panda/engine.rb