coalescing_panda 4.0.4 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/coalescing_panda/canvas_batch.js.coffee +5 -7
- data/app/assets/stylesheets/coalescing_panda/progress.css.scss +97 -0
- data/app/controllers/coalescing_panda/canvas_batches_controller.rb +10 -0
- data/app/controllers/coalescing_panda/lti_controller.rb +2 -2
- data/app/controllers/coalescing_panda/oauth2_controller.rb +3 -1
- data/app/models/coalescing_panda/assignment.rb +2 -0
- data/app/models/coalescing_panda/assignment_group.rb +11 -0
- data/app/models/coalescing_panda/canvas_batch.rb +4 -0
- data/app/models/coalescing_panda/course.rb +2 -0
- data/app/models/coalescing_panda/group.rb +3 -2
- data/app/models/coalescing_panda/group_category.rb +11 -0
- data/app/models/coalescing_panda/lti_account.rb +1 -0
- data/app/models/coalescing_panda/user.rb +1 -0
- data/app/models/coalescing_panda/workers/course_miner.rb +132 -56
- data/app/models/concerns/single_table_polymorphic.rb +1 -1
- data/app/views/coalescing_panda/canvas_batches/_canvas_batch.html.haml +22 -10
- data/app/views/coalescing_panda/canvas_batches/_canvas_batch_flash.html.haml +1 -1
- data/config/routes.rb +3 -1
- data/db/migrate/20150506183335_create_coalescing_panda_assignment_groups.rb +18 -0
- data/db/migrate/20150506192717_add_assignment_group_id_to_assignments.rb +5 -0
- data/db/migrate/20150526144713_add_account_to_canvas_batches.rb +5 -0
- data/db/migrate/20150602205257_add_option_to_canvas_batches.rb +5 -0
- data/db/migrate/20150708192717_add_group_moderator_to_group_memberships.rb +5 -0
- data/db/migrate/20150709192717_add_leader_id_to_groups.rb +6 -0
- data/db/migrate/20150714205405_create_coalescing_panda_group_categories.rb +16 -0
- data/lib/coalescing_panda/bearcat_uri.rb +20 -0
- data/lib/coalescing_panda/controller_helpers.rb +22 -25
- data/lib/coalescing_panda/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +120 -82
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +628 -0
- data/spec/dummy/log/test.log +42958 -0
- data/spec/factories/assignment_groups.rb +14 -0
- data/spec/models/coalescing_panda/assignment_group_spec.rb +32 -0
- data/spec/models/coalescing_panda/assignment_spec.rb +1 -0
- data/spec/models/coalescing_panda/course_spec.rb +5 -0
- data/spec/models/coalescing_panda/workers/course_miner_spec.rb +57 -10
- metadata +25 -6
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateCoalescingPandaAssignmentGroups < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :coalescing_panda_assignment_groups do |t|
|
4
|
+
t.belongs_to :coalescing_panda_course, null: false
|
5
|
+
t.belongs_to :context, polymorphic: true
|
6
|
+
t.string :canvas_assignment_group_id
|
7
|
+
t.string :name
|
8
|
+
t.integer :position
|
9
|
+
t.float :group_weight
|
10
|
+
t.string :workflow_state
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :coalescing_panda_assignment_groups, [:coalescing_panda_course_id, :canvas_assignment_group_id], name: :index_assignment_group_course, unique: true
|
16
|
+
add_index :coalescing_panda_assignment_groups, [:canvas_assignment_group_id, :context_id, :context_type], name: :index_assignment_group_context, unique: true
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateCoalescingPandaGroupCategories < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :coalescing_panda_group_categories do |t|
|
4
|
+
t.belongs_to :context, polymorphic: true
|
5
|
+
t.string :context_type
|
6
|
+
t.integer :canvas_group_category_id
|
7
|
+
t.string :name
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :coalescing_panda_group_categories, [:context_id, :context_type], name: :index_group_categories_context_and_context_type
|
12
|
+
|
13
|
+
add_column :coalescing_panda_assignments, :coalescing_panda_group_category_id, :integer
|
14
|
+
add_column :coalescing_panda_groups, :coalescing_panda_group_category_id, :integer
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CoalescingPanda::BearcatUri
|
2
|
+
attr_accessor :uri
|
3
|
+
|
4
|
+
def initialize(uri)
|
5
|
+
Rails.logger.info "Parsing Bearcat URI: #{uri}"
|
6
|
+
@uri = URI.parse(uri)
|
7
|
+
end
|
8
|
+
|
9
|
+
def api_domain
|
10
|
+
uri.port.present? ? "#{uri.host}:#{uri.port.to_s}" : uri.host
|
11
|
+
end
|
12
|
+
|
13
|
+
def scheme
|
14
|
+
[uri.scheme, '://'].join
|
15
|
+
end
|
16
|
+
|
17
|
+
def prefix
|
18
|
+
[scheme, api_domain].join
|
19
|
+
end
|
20
|
+
end
|
@@ -7,27 +7,21 @@ module CoalescingPanda
|
|
7
7
|
if lti_authorize!(*roles)
|
8
8
|
user_id = params['user_id']
|
9
9
|
launch_presentation_return_url = @lti_account.settings[:launch_presentation_return_url] || params['launch_presentation_return_url']
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
scheme = uri.scheme + '://'
|
14
|
-
@lti_params = params.to_hash
|
15
|
-
session['user_id'] = user_id
|
16
|
-
session['uri'] = launch_presentation_return_url
|
17
|
-
session['lis_person_sourcedid'] = params['lis_person_sourcedid']
|
18
|
-
session['oauth_consumer_key'] = params['oauth_consumer_key']
|
19
|
-
session['custom_canvas_account_id'] = params['custom_canvas_account_id']
|
10
|
+
launch_presentation_return_url = [BearcatUri.new(request.env["HTTP_REFERER"]).prefix, launch_presentation_return_url].join unless launch_presentation_return_url.include?('http')
|
11
|
+
uri = BearcatUri.new(launch_presentation_return_url)
|
12
|
+
set_session(launch_presentation_return_url)
|
20
13
|
|
21
|
-
if token = CanvasApiAuth.where('user_id = ? and api_domain = ?', user_id, api_domain).pluck(:api_token).first
|
22
|
-
@client = Bearcat::Client.new(token: token, prefix:
|
14
|
+
if token = CanvasApiAuth.where('user_id = ? and api_domain = ?', user_id, uri.api_domain).pluck(:api_token).first
|
15
|
+
@client = Bearcat::Client.new(token: token, prefix: uri.prefix)
|
23
16
|
elsif @lti_account = params['oauth_consumer_key'] && LtiAccount.find_by_key(params['oauth_consumer_key'])
|
24
17
|
client_id = @lti_account.oauth2_client_id
|
25
|
-
client = Bearcat::Client.new(prefix:
|
18
|
+
client = Bearcat::Client.new(prefix: uri.prefix)
|
26
19
|
session['state'] = SecureRandom.hex(32)
|
27
|
-
|
28
|
-
|
29
|
-
|
20
|
+
redirect_url = [coalescing_panda_url, coalescing_panda.oauth2_redirect_path({key: params['oauth_consumer_key'], user_id: user_id, api_domain: uri.api_domain, state: session['state']})].join
|
21
|
+
@canvas_url = client.auth_redirect_url(client_id, redirect_url)
|
22
|
+
|
30
23
|
#delete the added params so the original oauth sig still works
|
24
|
+
@lti_params = params.to_hash
|
31
25
|
@lti_params.delete('action')
|
32
26
|
@lti_params.delete('controller')
|
33
27
|
render 'coalescing_panda/oauth2/oauth2', layout: 'coalescing_panda/application'
|
@@ -35,6 +29,14 @@ module CoalescingPanda
|
|
35
29
|
end
|
36
30
|
end
|
37
31
|
|
32
|
+
def set_session(launch_presentation_return_url)
|
33
|
+
session['user_id'] = params['user_id']
|
34
|
+
session['uri'] = launch_presentation_return_url
|
35
|
+
session['lis_person_sourcedid'] = params['lis_person_sourcedid']
|
36
|
+
session['oauth_consumer_key'] = params['oauth_consumer_key']
|
37
|
+
session['custom_canvas_account_id'] = params['custom_canvas_account_id']
|
38
|
+
end
|
39
|
+
|
38
40
|
def have_session?
|
39
41
|
if params['tool_consumer_instance_guid'] && session['user_id'] != params['user_id']
|
40
42
|
reset_session
|
@@ -43,12 +45,9 @@ module CoalescingPanda
|
|
43
45
|
end
|
44
46
|
|
45
47
|
if (session['user_id'] && session['uri'])
|
46
|
-
uri =
|
47
|
-
api_domain = uri.
|
48
|
-
|
49
|
-
scheme = uri.scheme + '://'
|
50
|
-
token = CanvasApiAuth.where('user_id = ? and api_domain = ?', session['user_id'], api_domain).pluck(:api_token).first
|
51
|
-
@client = Bearcat::Client.new(token: token, prefix: scheme+api_domain) if token
|
48
|
+
uri = BearcatUri.new(session['uri'])
|
49
|
+
token = CanvasApiAuth.where('user_id = ? and api_domain = ?', session['user_id'], uri.api_domain).pluck(:api_token).first
|
50
|
+
@client = Bearcat::Client.new(token: token, prefix: uri.prefix) if token
|
52
51
|
end
|
53
52
|
|
54
53
|
@lti_account = LtiAccount.find_by_key(session['oauth_consumer_key']) if session['oauth_consumer_key']
|
@@ -67,9 +66,7 @@ module CoalescingPanda
|
|
67
66
|
logger.info 'not authorized on roles' if !authorized
|
68
67
|
authorized = authorized && @lti_account.validate_nonce(params['oauth_nonce'], DateTime.strptime(params['oauth_timestamp'], '%s'))
|
69
68
|
logger.info 'not authorized on nonce' if !authorized
|
70
|
-
|
71
|
-
render :text => 'Invalid Credentials, please contact your Administrator.', :status => :unauthorized
|
72
|
-
end
|
69
|
+
render :text => 'Invalid Credentials, please contact your Administrator.', :status => :unauthorized unless authorized
|
73
70
|
authorized
|
74
71
|
end
|
75
72
|
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,14 +11,30 @@
|
|
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:
|
14
|
+
ActiveRecord::Schema.define(version: 20150714205405) do
|
15
15
|
|
16
|
-
create_table "
|
17
|
-
t.integer "coalescing_panda_course_id",
|
16
|
+
create_table "coalescing_panda_assignment_groups", force: :cascade do |t|
|
17
|
+
t.integer "coalescing_panda_course_id", null: false
|
18
|
+
t.integer "context_id"
|
19
|
+
t.string "context_type"
|
20
|
+
t.string "canvas_assignment_group_id"
|
18
21
|
t.string "name"
|
19
|
-
t.
|
20
|
-
t.
|
22
|
+
t.integer "position"
|
23
|
+
t.float "group_weight"
|
21
24
|
t.string "workflow_state"
|
25
|
+
t.datetime "created_at"
|
26
|
+
t.datetime "updated_at"
|
27
|
+
end
|
28
|
+
|
29
|
+
add_index "coalescing_panda_assignment_groups", ["canvas_assignment_group_id", "context_id", "context_type"], name: "index_assignment_group_context", unique: true
|
30
|
+
add_index "coalescing_panda_assignment_groups", ["coalescing_panda_course_id", "canvas_assignment_group_id"], name: "index_assignment_group_course", unique: true
|
31
|
+
|
32
|
+
create_table "coalescing_panda_assignments", force: :cascade do |t|
|
33
|
+
t.integer "coalescing_panda_course_id", null: false
|
34
|
+
t.string "name", limit: 255
|
35
|
+
t.text "description"
|
36
|
+
t.string "canvas_assignment_id", limit: 255, null: false
|
37
|
+
t.string "workflow_state", limit: 255
|
22
38
|
t.float "points_possible"
|
23
39
|
t.datetime "due_at"
|
24
40
|
t.datetime "unlock_at"
|
@@ -29,38 +45,42 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
29
45
|
t.integer "group_category_id"
|
30
46
|
t.boolean "grade_group_students_individually"
|
31
47
|
t.boolean "published"
|
48
|
+
t.integer "coalescing_panda_assignment_group_id"
|
49
|
+
t.integer "coalescing_panda_group_category_id"
|
32
50
|
end
|
33
51
|
|
34
52
|
add_index "coalescing_panda_assignments", ["coalescing_panda_course_id", "canvas_assignment_id"], name: "index_assignments_course", unique: true
|
35
53
|
|
36
|
-
create_table "coalescing_panda_canvas_api_auths", force:
|
37
|
-
t.string "user_id"
|
38
|
-
t.string "api_domain"
|
39
|
-
t.string "api_token"
|
54
|
+
create_table "coalescing_panda_canvas_api_auths", force: :cascade do |t|
|
55
|
+
t.string "user_id", limit: 255
|
56
|
+
t.string "api_domain", limit: 255
|
57
|
+
t.string "api_token", limit: 255
|
40
58
|
t.datetime "created_at"
|
41
59
|
t.datetime "updated_at"
|
42
60
|
end
|
43
61
|
|
44
|
-
create_table "coalescing_panda_canvas_batches", force:
|
45
|
-
t.float "percent_complete",
|
46
|
-
t.string "status"
|
62
|
+
create_table "coalescing_panda_canvas_batches", force: :cascade do |t|
|
63
|
+
t.float "percent_complete", default: 0.0
|
64
|
+
t.string "status", limit: 255
|
47
65
|
t.text "message"
|
48
66
|
t.datetime "created_at"
|
49
67
|
t.datetime "updated_at"
|
50
68
|
t.integer "context_id"
|
51
|
-
t.string "context_type"
|
69
|
+
t.string "context_type", limit: 255
|
70
|
+
t.integer "coalescing_panda_lti_account_id"
|
71
|
+
t.text "options"
|
52
72
|
end
|
53
73
|
|
54
|
-
create_table "coalescing_panda_courses", force:
|
55
|
-
t.integer "coalescing_panda_lti_account_id",
|
74
|
+
create_table "coalescing_panda_courses", force: :cascade do |t|
|
75
|
+
t.integer "coalescing_panda_lti_account_id", null: false
|
56
76
|
t.integer "coalescing_panda_term_id"
|
57
|
-
t.string "name"
|
58
|
-
t.string "canvas_course_id", null: false
|
59
|
-
t.string "sis_id"
|
77
|
+
t.string "name", limit: 255
|
78
|
+
t.string "canvas_course_id", limit: 255, null: false
|
79
|
+
t.string "sis_id", limit: 255
|
60
80
|
t.datetime "start_at"
|
61
81
|
t.datetime "conclude_at"
|
62
|
-
t.string "workflow_state"
|
63
|
-
t.string "course_code"
|
82
|
+
t.string "workflow_state", limit: 255
|
83
|
+
t.string "course_code", limit: 255
|
64
84
|
t.datetime "created_at"
|
65
85
|
t.datetime "updated_at"
|
66
86
|
end
|
@@ -69,13 +89,13 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
69
89
|
add_index "coalescing_panda_courses", ["coalescing_panda_term_id", "canvas_course_id"], name: "index_courses_term", unique: true
|
70
90
|
add_index "coalescing_panda_courses", ["sis_id"], name: "index_coalescing_panda_courses_on_sis_id"
|
71
91
|
|
72
|
-
create_table "coalescing_panda_enrollments", force:
|
73
|
-
t.integer "coalescing_panda_user_id",
|
74
|
-
t.integer "coalescing_panda_section_id",
|
75
|
-
t.string "workflow_state"
|
76
|
-
t.string "sis_id"
|
77
|
-
t.string "canvas_enrollment_id", null: false
|
78
|
-
t.string "enrollment_type"
|
92
|
+
create_table "coalescing_panda_enrollments", force: :cascade do |t|
|
93
|
+
t.integer "coalescing_panda_user_id", null: false
|
94
|
+
t.integer "coalescing_panda_section_id", null: false
|
95
|
+
t.string "workflow_state", limit: 255
|
96
|
+
t.string "sis_id", limit: 255
|
97
|
+
t.string "canvas_enrollment_id", limit: 255, null: false
|
98
|
+
t.string "enrollment_type", limit: 255
|
79
99
|
t.datetime "start_at"
|
80
100
|
t.datetime "end_at"
|
81
101
|
t.datetime "created_at"
|
@@ -85,51 +105,69 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
85
105
|
add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id", "enrollment_type"], name: "index_enrollments_user_and_section", unique: true
|
86
106
|
add_index "coalescing_panda_enrollments", ["sis_id"], name: "index_coalescing_panda_enrollments_on_sis_id"
|
87
107
|
|
88
|
-
create_table "
|
108
|
+
create_table "coalescing_panda_group_categories", force: :cascade do |t|
|
109
|
+
t.integer "context_id"
|
110
|
+
t.string "context_type"
|
111
|
+
t.integer "canvas_group_category_id"
|
112
|
+
t.string "name"
|
113
|
+
t.datetime "created_at"
|
114
|
+
t.datetime "updated_at"
|
115
|
+
end
|
116
|
+
|
117
|
+
add_index "coalescing_panda_group_categories", ["context_id", "context_type"], name: "index_group_categories_context_and_context_type"
|
118
|
+
|
119
|
+
create_table "coalescing_panda_group_memberships", force: :cascade do |t|
|
89
120
|
t.integer "coalescing_panda_group_id"
|
90
121
|
t.integer "coalescing_panda_user_id"
|
91
|
-
t.string "canvas_group_membership_id"
|
92
|
-
t.string "workflow_state"
|
122
|
+
t.string "canvas_group_membership_id", limit: 255
|
123
|
+
t.string "workflow_state", limit: 255
|
93
124
|
t.datetime "created_at"
|
94
125
|
t.datetime "updated_at"
|
126
|
+
t.boolean "moderator"
|
95
127
|
end
|
96
128
|
|
97
|
-
|
129
|
+
add_index "coalescing_panda_group_memberships", ["coalescing_panda_group_id", "coalescing_panda_user_id"], name: "index_group_memberships_user_and_group", unique: true
|
130
|
+
|
131
|
+
create_table "coalescing_panda_groups", force: :cascade do |t|
|
98
132
|
t.integer "context_id"
|
99
|
-
t.string "context_type"
|
100
|
-
t.string "description"
|
101
|
-
t.string "group_category_id"
|
102
|
-
t.string "canvas_group_id"
|
103
|
-
t.string "name"
|
133
|
+
t.string "context_type", limit: 255
|
134
|
+
t.string "description", limit: 255
|
135
|
+
t.string "group_category_id", limit: 255
|
136
|
+
t.string "canvas_group_id", limit: 255
|
137
|
+
t.string "name", limit: 255
|
104
138
|
t.integer "members_count"
|
105
139
|
t.datetime "created_at"
|
106
140
|
t.datetime "updated_at"
|
141
|
+
t.integer "leader_id"
|
142
|
+
t.integer "coalescing_panda_group_category_id"
|
107
143
|
end
|
108
144
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
t.string "
|
113
|
-
t.string "
|
114
|
-
t.string "
|
115
|
-
t.string "
|
145
|
+
add_index "coalescing_panda_groups", ["context_id", "canvas_group_id"], name: "index_groups_context_and_group_id", unique: true
|
146
|
+
|
147
|
+
create_table "coalescing_panda_lti_accounts", force: :cascade do |t|
|
148
|
+
t.string "name", limit: 255
|
149
|
+
t.string "key", limit: 255
|
150
|
+
t.string "secret", limit: 255
|
151
|
+
t.string "oauth2_client_id", limit: 255
|
152
|
+
t.string "oauth2_client_key", limit: 255
|
153
|
+
t.string "canvas_account_id", limit: 255
|
116
154
|
t.text "settings"
|
117
155
|
t.datetime "created_at"
|
118
156
|
t.datetime "updated_at"
|
119
157
|
end
|
120
158
|
|
121
|
-
create_table "coalescing_panda_lti_nonces", force:
|
159
|
+
create_table "coalescing_panda_lti_nonces", force: :cascade do |t|
|
122
160
|
t.integer "coalescing_panda_lti_account_id"
|
123
|
-
t.string "nonce"
|
161
|
+
t.string "nonce", limit: 255
|
124
162
|
t.datetime "timestamp"
|
125
163
|
end
|
126
164
|
|
127
|
-
create_table "coalescing_panda_sections", force:
|
128
|
-
t.integer "coalescing_panda_course_id",
|
129
|
-
t.string "name"
|
130
|
-
t.string "canvas_section_id", null: false
|
131
|
-
t.string "sis_id"
|
132
|
-
t.string "workflow_state"
|
165
|
+
create_table "coalescing_panda_sections", force: :cascade do |t|
|
166
|
+
t.integer "coalescing_panda_course_id", null: false
|
167
|
+
t.string "name", limit: 255
|
168
|
+
t.string "canvas_section_id", limit: 255, null: false
|
169
|
+
t.string "sis_id", limit: 255
|
170
|
+
t.string "workflow_state", limit: 255
|
133
171
|
t.datetime "start_at"
|
134
172
|
t.datetime "end_at"
|
135
173
|
t.datetime "created_at"
|
@@ -139,22 +177,22 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
139
177
|
add_index "coalescing_panda_sections", ["coalescing_panda_course_id", "canvas_section_id"], name: "index_sections_course", unique: true
|
140
178
|
add_index "coalescing_panda_sections", ["sis_id"], name: "index_coalescing_panda_sections_on_sis_id"
|
141
179
|
|
142
|
-
create_table "coalescing_panda_sessions", force:
|
143
|
-
t.string "token"
|
180
|
+
create_table "coalescing_panda_sessions", force: :cascade do |t|
|
181
|
+
t.string "token", limit: 255
|
144
182
|
t.text "data"
|
145
183
|
t.datetime "created_at"
|
146
184
|
t.datetime "updated_at"
|
147
185
|
end
|
148
186
|
|
149
|
-
create_table "coalescing_panda_submissions", force:
|
150
|
-
t.integer "coalescing_panda_user_id",
|
151
|
-
t.integer "coalescing_panda_assignment_id",
|
152
|
-
t.string "url"
|
153
|
-
t.string "grade"
|
154
|
-
t.string "score"
|
187
|
+
create_table "coalescing_panda_submissions", force: :cascade do |t|
|
188
|
+
t.integer "coalescing_panda_user_id", null: false
|
189
|
+
t.integer "coalescing_panda_assignment_id", null: false
|
190
|
+
t.string "url", limit: 255
|
191
|
+
t.string "grade", limit: 255
|
192
|
+
t.string "score", limit: 255
|
155
193
|
t.datetime "submitted_at"
|
156
|
-
t.string "workflow_state"
|
157
|
-
t.string "canvas_submission_id", null: false
|
194
|
+
t.string "workflow_state", limit: 255
|
195
|
+
t.string "canvas_submission_id", limit: 255, null: false
|
158
196
|
t.datetime "created_at"
|
159
197
|
t.datetime "updated_at"
|
160
198
|
end
|
@@ -162,15 +200,15 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
162
200
|
add_index "coalescing_panda_submissions", ["canvas_submission_id"], name: "index_coalescing_panda_submissions_on_canvas_submission_id"
|
163
201
|
add_index "coalescing_panda_submissions", ["coalescing_panda_user_id", "coalescing_panda_assignment_id", "canvas_submission_id"], name: "index_submissions_user_and_assignment", unique: true
|
164
202
|
|
165
|
-
create_table "coalescing_panda_terms", force:
|
166
|
-
t.integer "coalescing_panda_lti_account_id",
|
167
|
-
t.string "name"
|
168
|
-
t.string "code"
|
169
|
-
t.string "sis_id"
|
170
|
-
t.string "canvas_term_id", null: false
|
203
|
+
create_table "coalescing_panda_terms", force: :cascade do |t|
|
204
|
+
t.integer "coalescing_panda_lti_account_id", null: false
|
205
|
+
t.string "name", limit: 255
|
206
|
+
t.string "code", limit: 255
|
207
|
+
t.string "sis_id", limit: 255
|
208
|
+
t.string "canvas_term_id", limit: 255, null: false
|
171
209
|
t.datetime "start_at"
|
172
210
|
t.datetime "end_at"
|
173
|
-
t.string "workflow_state"
|
211
|
+
t.string "workflow_state", limit: 255
|
174
212
|
t.datetime "created_at"
|
175
213
|
t.datetime "updated_at"
|
176
214
|
end
|
@@ -178,14 +216,14 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
178
216
|
add_index "coalescing_panda_terms", ["canvas_term_id", "coalescing_panda_lti_account_id"], name: "index_terms_account", unique: true
|
179
217
|
add_index "coalescing_panda_terms", ["sis_id"], name: "index_coalescing_panda_terms_on_sis_id"
|
180
218
|
|
181
|
-
create_table "coalescing_panda_users", force:
|
182
|
-
t.integer "coalescing_panda_lti_account_id",
|
183
|
-
t.string "name"
|
184
|
-
t.string "email"
|
185
|
-
t.string "roles"
|
186
|
-
t.string "workflow_state"
|
187
|
-
t.string "sis_id"
|
188
|
-
t.string "canvas_user_id", null: false
|
219
|
+
create_table "coalescing_panda_users", force: :cascade do |t|
|
220
|
+
t.integer "coalescing_panda_lti_account_id", null: false
|
221
|
+
t.string "name", limit: 255
|
222
|
+
t.string "email", limit: 255
|
223
|
+
t.string "roles", limit: 255
|
224
|
+
t.string "workflow_state", limit: 255
|
225
|
+
t.string "sis_id", limit: 255
|
226
|
+
t.string "canvas_user_id", limit: 255, null: false
|
189
227
|
t.datetime "created_at"
|
190
228
|
t.datetime "updated_at"
|
191
229
|
end
|
@@ -193,16 +231,16 @@ ActiveRecord::Schema.define(version: 20150210180516) do
|
|
193
231
|
add_index "coalescing_panda_users", ["coalescing_panda_lti_account_id", "canvas_user_id"], name: "index_users_account", unique: true
|
194
232
|
add_index "coalescing_panda_users", ["sis_id"], name: "index_coalescing_panda_users_on_sis_id"
|
195
233
|
|
196
|
-
create_table "delayed_jobs", force:
|
197
|
-
t.integer "priority",
|
198
|
-
t.integer "attempts",
|
199
|
-
t.text "handler",
|
234
|
+
create_table "delayed_jobs", force: :cascade do |t|
|
235
|
+
t.integer "priority", default: 0, null: false
|
236
|
+
t.integer "attempts", default: 0, null: false
|
237
|
+
t.text "handler", null: false
|
200
238
|
t.text "last_error"
|
201
239
|
t.datetime "run_at"
|
202
240
|
t.datetime "locked_at"
|
203
241
|
t.datetime "failed_at"
|
204
|
-
t.string "locked_by"
|
205
|
-
t.string "queue"
|
242
|
+
t.string "locked_by", limit: 255
|
243
|
+
t.string "queue", limit: 255
|
206
244
|
t.datetime "created_at"
|
207
245
|
t.datetime "updated_at"
|
208
246
|
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|