canvas_sync 0.9.4 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/canvas_sync/api_syncable.rb +1 -0
- data/lib/canvas_sync/generators/install_generator.rb +3 -3
- data/lib/canvas_sync/generators/templates/migrations/create_accounts.rb +17 -0
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_admins.rb +2 -2
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_assignment_groups.rb +2 -2
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_assignments.rb +7 -7
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_context_module_items.rb +4 -4
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_context_modules.rb +2 -2
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_courses.rb +7 -8
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_enrollments.rb +4 -6
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_roles.rb +2 -2
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_sections.rb +5 -5
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_submissions.rb +2 -2
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_terms.rb +2 -2
- data/lib/canvas_sync/generators/templates/{models → migrations}/create_users.rb +4 -4
- data/lib/canvas_sync/generators/templates/models/account.rb +4 -4
- data/lib/canvas_sync/generators/templates/models/admin.rb +4 -4
- data/lib/canvas_sync/generators/templates/models/assignment.rb +10 -9
- data/lib/canvas_sync/generators/templates/models/assignment_group.rb +5 -5
- data/lib/canvas_sync/generators/templates/models/context_module.rb +2 -2
- data/lib/canvas_sync/generators/templates/models/context_module_item.rb +3 -2
- data/lib/canvas_sync/generators/templates/models/course.rb +14 -14
- data/lib/canvas_sync/generators/templates/models/enrollment.rb +10 -9
- data/lib/canvas_sync/generators/templates/models/role.rb +3 -3
- data/lib/canvas_sync/generators/templates/models/section.rb +6 -6
- data/lib/canvas_sync/generators/templates/models/submission.rb +5 -5
- data/lib/canvas_sync/generators/templates/models/term.rb +4 -3
- data/lib/canvas_sync/generators/templates/models/user.rb +6 -6
- data/lib/canvas_sync/generators/templates/services/live_events/base_event.rb +4 -0
- data/lib/canvas_sync/generators/templates/services/live_events/course/course_event.rb +1 -1
- data/lib/canvas_sync/generators/templates/services/live_events/course_section/course_section_event.rb +4 -4
- data/lib/canvas_sync/generators/templates/services/live_events/module/module_event.rb +1 -1
- data/lib/canvas_sync/generators/templates/services/live_events/module_item/module_item_event.rb +3 -3
- data/lib/canvas_sync/generators/templates/services/live_events/user/user_event.rb +1 -1
- data/lib/canvas_sync/jobs/sync_provisioning_report_job.rb +7 -2
- data/lib/canvas_sync/jobs/sync_simple_table_job.rb +7 -2
- data/lib/canvas_sync/processors/model_mappings.yml +35 -41
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb +4 -4
- data/spec/canvas_sync/jobs/sync_simple_table_job_spec.rb +3 -3
- data/spec/canvas_sync/models/accounts_spec.rb +2 -2
- data/spec/canvas_sync/models/admins_spec.rb +3 -3
- data/spec/canvas_sync/models/assignment_group_spec.rb +4 -4
- data/spec/canvas_sync/models/assignment_spec.rb +8 -8
- data/spec/canvas_sync/models/context_module_spec.rb +2 -2
- data/spec/canvas_sync/models/course_spec.rb +7 -8
- data/spec/canvas_sync/models/enrollment_spec.rb +5 -5
- data/spec/canvas_sync/models/roles_spec.rb +3 -3
- data/spec/canvas_sync/models/section_spec.rb +4 -4
- data/spec/canvas_sync/models/submission_spec.rb +5 -5
- data/spec/canvas_sync/models/term_spec.rb +7 -7
- data/spec/canvas_sync/models/user_spec.rb +4 -4
- data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +5 -5
- data/spec/canvas_sync/services/module_event_spec.rb +1 -1
- data/spec/canvas_sync/services/module_item_event_spec.rb +7 -7
- data/spec/dummy/app/models/account.rb +9 -1
- data/spec/dummy/app/models/admin.rb +4 -4
- data/spec/dummy/app/models/assignment.rb +23 -5
- data/spec/dummy/app/models/assignment_group.rb +15 -3
- data/spec/dummy/app/models/context_module.rb +2 -2
- data/spec/dummy/app/models/context_module_item.rb +3 -2
- data/spec/dummy/app/models/course.rb +20 -7
- data/spec/dummy/app/models/enrollment.rb +20 -4
- data/spec/dummy/app/models/role.rb +3 -3
- data/spec/dummy/app/models/section.rb +14 -3
- data/spec/dummy/app/models/submission.rb +16 -4
- data/spec/dummy/app/models/term.rb +4 -3
- data/spec/dummy/app/models/user.rb +15 -4
- data/spec/dummy/app/services/live_events/base_event.rb +4 -0
- data/spec/dummy/app/services/live_events/course_event.rb +1 -1
- data/spec/dummy/app/services/live_events/course_section_event.rb +4 -4
- data/spec/dummy/app/services/live_events/module_event.rb +1 -1
- data/spec/dummy/app/services/live_events/module_item_event.rb +3 -3
- data/spec/dummy/app/services/live_events/user_event.rb +1 -1
- data/spec/dummy/db/migrate/{20180216171618_create_submissions.rb → 20190521003447_create_submissions.rb} +4 -4
- data/spec/dummy/db/migrate/{20180103162102_create_roles.rb → 20190521003448_create_roles.rb} +2 -2
- data/spec/dummy/db/migrate/{20180109210452_create_admins.rb → 20190521003449_create_admins.rb} +2 -2
- data/spec/dummy/db/migrate/{20180222163506_create_assignment_groups.rb → 20190521003450_create_assignment_groups.rb} +2 -2
- data/spec/dummy/db/migrate/{20180411215348_create_context_modules.rb → 20190521003451_create_context_modules.rb} +2 -2
- data/spec/dummy/db/migrate/{20180215214227_create_assignments.rb → 20190603192310_create_assignments.rb} +11 -11
- data/spec/dummy/db/migrate/{20180605172338_create_context_module_items.rb → 20190603193502_create_context_module_items.rb} +4 -4
- data/spec/dummy/db/migrate/{20180509194201_create_users.rb → 20190603215718_create_users.rb} +4 -4
- data/spec/dummy/db/migrate/{20170906193506_create_terms.rb → 20190603215721_create_terms.rb} +2 -2
- data/spec/dummy/db/migrate/{20171107213207_create_sections.rb → 20190603215722_create_sections.rb} +5 -5
- data/spec/dummy/db/migrate/{20170914181345_create_courses.rb → 20190603220011_create_courses.rb} +7 -8
- data/spec/dummy/db/migrate/{20170905192509_create_enrollments.rb → 20190603220013_create_enrollments.rb} +4 -6
- data/spec/dummy/db/migrate/{20180220172559_create_accounts.rb → 20190604193942_create_accounts.rb} +6 -6
- data/spec/dummy/db/schema.rb +56 -58
- data/spec/dummy/log/test.log +1350 -0
- data/spec/factories/account_factory.rb +5 -5
- data/spec/factories/admin_factory.rb +1 -1
- data/spec/factories/assignment_factory.rb +1 -1
- data/spec/factories/assignment_group_factory.rb +1 -1
- data/spec/factories/context_module_factory.rb +2 -2
- data/spec/factories/context_module_item_factory.rb +1 -1
- data/spec/factories/course_factory.rb +5 -5
- data/spec/factories/enrollment_factory.rb +1 -1
- data/spec/factories/role_factory.rb +1 -1
- data/spec/factories/section_factory.rb +1 -1
- data/spec/factories/submission_factory.rb +1 -1
- data/spec/factories/term_factory.rb +1 -1
- data/spec/factories/user_factory.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +41 -41
- data/lib/canvas_sync/generators/templates/models/create_accounts.rb +0 -17
data/spec/dummy/db/migrate/{20180103162102_create_roles.rb → 20190521003448_create_roles.rb}
RENAMED
@@ -9,7 +9,7 @@
|
|
9
9
|
class CreateRoles < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :roles do |t|
|
12
|
-
t.integer :
|
12
|
+
t.integer :canvas_id, null: false
|
13
13
|
t.string :label, null: false
|
14
14
|
t.string :base_role_type, null: false
|
15
15
|
t.json :account
|
@@ -18,6 +18,6 @@ class CreateRoles < ActiveRecord::Migration[5.1]
|
|
18
18
|
|
19
19
|
t.timestamps
|
20
20
|
end
|
21
|
-
add_index :roles, :
|
21
|
+
add_index :roles, :canvas_id, unique: true
|
22
22
|
end
|
23
23
|
end
|
data/spec/dummy/db/migrate/{20180109210452_create_admins.rb → 20190521003449_create_admins.rb}
RENAMED
@@ -9,7 +9,7 @@
|
|
9
9
|
class CreateAdmins < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :admins do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.string :role_name
|
14
14
|
t.bigint :canvas_role_id, null: false
|
15
15
|
t.json :user_data
|
@@ -18,6 +18,6 @@ class CreateAdmins < ActiveRecord::Migration[5.1]
|
|
18
18
|
|
19
19
|
t.timestamps
|
20
20
|
end
|
21
|
-
add_index :admins, :
|
21
|
+
add_index :admins, :canvas_id, unique: true
|
22
22
|
end
|
23
23
|
end
|
@@ -9,7 +9,7 @@
|
|
9
9
|
class CreateAssignmentGroups < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :assignment_groups do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.bigint :canvas_course_id
|
14
14
|
t.string :name
|
15
15
|
t.text :rules
|
@@ -22,7 +22,7 @@ class CreateAssignmentGroups < ActiveRecord::Migration[5.1]
|
|
22
22
|
t.timestamps
|
23
23
|
end
|
24
24
|
|
25
|
-
add_index :assignment_groups, :
|
25
|
+
add_index :assignment_groups, :canvas_id, unique: true
|
26
26
|
add_index :assignment_groups, :canvas_course_id
|
27
27
|
end
|
28
28
|
end
|
@@ -9,7 +9,7 @@
|
|
9
9
|
class CreateContextModules < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :context_modules do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id
|
13
13
|
t.bigint :canvas_context_id
|
14
14
|
t.string :canvas_context_type
|
15
15
|
t.integer :position
|
@@ -20,7 +20,7 @@ class CreateContextModules < ActiveRecord::Migration[5.1]
|
|
20
20
|
t.timestamps
|
21
21
|
end
|
22
22
|
|
23
|
-
add_index :context_modules, :
|
23
|
+
add_index :context_modules, :canvas_id, unique: true
|
24
24
|
add_index :context_modules, [:canvas_context_id, :canvas_context_type], name: "index_context_modules_on_context"
|
25
25
|
end
|
26
26
|
end
|
@@ -9,29 +9,29 @@
|
|
9
9
|
class CreateAssignments < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :assignments do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.string :title
|
14
14
|
t.text :description
|
15
15
|
t.datetime :due_at
|
16
16
|
t.datetime :unlock_at
|
17
17
|
t.datetime :lock_at
|
18
|
-
t.
|
19
|
-
t.
|
20
|
-
t.
|
21
|
-
t.
|
18
|
+
t.float :points_possible
|
19
|
+
t.float :min_score
|
20
|
+
t.float :max_score
|
21
|
+
t.float :mastery_score
|
22
22
|
t.string :grading_type
|
23
23
|
t.string :submission_types
|
24
24
|
t.string :workflow_state
|
25
|
-
t.integer :
|
26
|
-
t.string :
|
25
|
+
t.integer :canvas_context_id
|
26
|
+
t.string :canvas_context_type
|
27
27
|
t.integer :canvas_assignment_group_id
|
28
|
-
t.integer :
|
29
|
-
t.integer :
|
28
|
+
t.integer :canvas_grading_scheme_id
|
29
|
+
t.integer :canvas_grading_standard_id
|
30
30
|
|
31
31
|
t.timestamps
|
32
32
|
end
|
33
33
|
|
34
|
-
add_index :assignments, :
|
35
|
-
add_index :assignments, [:
|
34
|
+
add_index :assignments, :canvas_id, unique: true
|
35
|
+
add_index :assignments, [:canvas_context_id, :canvas_context_type]
|
36
36
|
end
|
37
37
|
end
|
@@ -9,18 +9,18 @@
|
|
9
9
|
class CreateContextModuleItems < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :context_module_items do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id
|
13
13
|
t.bigint :canvas_context_module_id
|
14
14
|
t.integer :position
|
15
|
-
t.
|
16
|
-
t.
|
15
|
+
t.bigint :canvas_content_id
|
16
|
+
t.string :canvas_content_type
|
17
17
|
t.bigint :canvas_assignment_id
|
18
18
|
t.string :workflow_state
|
19
19
|
|
20
20
|
t.timestamps
|
21
21
|
end
|
22
22
|
|
23
|
-
add_index :context_module_items, :
|
23
|
+
add_index :context_module_items, :canvas_id, unique: true
|
24
24
|
add_index :context_module_items, :canvas_context_module_id
|
25
25
|
end
|
26
26
|
end
|
data/spec/dummy/db/migrate/{20180509194201_create_users.rb → 20190603215718_create_users.rb}
RENAMED
@@ -9,19 +9,19 @@
|
|
9
9
|
class CreateUsers < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :users do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.string :sis_id
|
14
14
|
t.string :email
|
15
15
|
t.string :first_name
|
16
16
|
t.string :last_name
|
17
|
-
t.string :
|
17
|
+
t.string :workflow_state
|
18
18
|
t.string :login_id
|
19
|
-
t.string :
|
19
|
+
t.string :name
|
20
20
|
t.string :sortable_name
|
21
21
|
|
22
22
|
t.timestamps
|
23
23
|
end
|
24
24
|
|
25
|
-
add_index :users, :
|
25
|
+
add_index :users, :canvas_id, unique: true
|
26
26
|
end
|
27
27
|
end
|
data/spec/dummy/db/migrate/{20170906193506_create_terms.rb → 20190603215721_create_terms.rb}
RENAMED
@@ -9,7 +9,7 @@
|
|
9
9
|
class CreateTerms < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :terms do |t|
|
12
|
-
t.integer :
|
12
|
+
t.integer :canvas_id, null: false
|
13
13
|
t.string :name
|
14
14
|
t.datetime :start_at
|
15
15
|
t.datetime :end_at
|
@@ -19,6 +19,6 @@ class CreateTerms < ActiveRecord::Migration[5.1]
|
|
19
19
|
|
20
20
|
t.timestamps
|
21
21
|
end
|
22
|
-
add_index :terms, :
|
22
|
+
add_index :terms, :canvas_id, unique: true
|
23
23
|
end
|
24
24
|
end
|
data/spec/dummy/db/migrate/{20171107213207_create_sections.rb → 20190603215722_create_sections.rb}
RENAMED
@@ -9,19 +9,19 @@
|
|
9
9
|
class CreateSections < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :sections do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.string :sis_id
|
14
14
|
t.bigint :canvas_course_id
|
15
15
|
t.bigint :canvas_nonxlist_course_id
|
16
16
|
t.string :name
|
17
|
-
t.string :
|
18
|
-
t.datetime :
|
19
|
-
t.datetime :
|
17
|
+
t.string :workflow_state
|
18
|
+
t.datetime :start_at
|
19
|
+
t.datetime :end_at
|
20
20
|
|
21
21
|
t.timestamps
|
22
22
|
end
|
23
23
|
|
24
|
-
add_index :sections, :
|
24
|
+
add_index :sections, :canvas_id, unique: true
|
25
25
|
add_index :sections, :canvas_course_id
|
26
26
|
end
|
27
27
|
end
|
data/spec/dummy/db/migrate/{20170914181345_create_courses.rb → 20190603220011_create_courses.rb}
RENAMED
@@ -9,20 +9,19 @@
|
|
9
9
|
class CreateCourses < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :courses do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.string :sis_id
|
14
|
-
t.string :
|
15
|
-
t.string :
|
16
|
-
t.string :
|
14
|
+
t.string :course_code
|
15
|
+
t.string :name
|
16
|
+
t.string :workflow_state
|
17
17
|
t.integer :canvas_account_id
|
18
18
|
t.integer :canvas_term_id
|
19
|
-
t.
|
20
|
-
t.datetime :
|
21
|
-
t.datetime :end_date
|
19
|
+
t.datetime :start_at
|
20
|
+
t.datetime :end_at
|
22
21
|
|
23
22
|
t.timestamps
|
24
23
|
end
|
25
24
|
|
26
|
-
add_index :courses, :
|
25
|
+
add_index :courses, :canvas_id, unique: true
|
27
26
|
end
|
28
27
|
end
|
@@ -9,23 +9,21 @@
|
|
9
9
|
class CreateEnrollments < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :enrollments do |t|
|
12
|
-
t.bigint :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
13
|
t.bigint :canvas_course_id
|
14
14
|
t.string :course_sis_id
|
15
15
|
t.bigint :canvas_user_id
|
16
16
|
t.string :user_sis_id
|
17
17
|
t.string :role
|
18
|
-
t.integer :
|
18
|
+
t.integer :canvas_role_id
|
19
19
|
t.bigint :canvas_section_id
|
20
|
-
t.string :
|
21
|
-
t.string :status
|
20
|
+
t.string :workflow_state
|
22
21
|
t.string :base_role_type
|
23
22
|
|
24
|
-
|
25
23
|
t.timestamps
|
26
24
|
end
|
27
25
|
|
28
|
-
add_index :enrollments, :
|
26
|
+
add_index :enrollments, :canvas_id, unique: true
|
29
27
|
add_index :enrollments, :canvas_course_id
|
30
28
|
add_index :enrollments, :canvas_user_id
|
31
29
|
end
|
data/spec/dummy/db/migrate/{20180220172559_create_accounts.rb → 20190604193942_create_accounts.rb}
RENAMED
@@ -9,15 +9,15 @@
|
|
9
9
|
class CreateAccounts < ActiveRecord::Migration[5.1]
|
10
10
|
def change
|
11
11
|
create_table :accounts do |t|
|
12
|
-
t.bigint :
|
13
|
-
t.string :
|
14
|
-
t.bigint :
|
15
|
-
t.string :
|
12
|
+
t.bigint :canvas_id, null: false
|
13
|
+
t.string :sis_id
|
14
|
+
t.bigint :canvas_parent_account_id
|
15
|
+
t.string :sis_parent_account_id
|
16
16
|
t.string :name
|
17
|
-
t.string :
|
17
|
+
t.string :workflow_state
|
18
18
|
|
19
19
|
t.timestamps
|
20
20
|
end
|
21
|
-
add_index :accounts, :
|
21
|
+
add_index :accounts, :canvas_id, unique: true
|
22
22
|
end
|
23
23
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,25 +10,25 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20190604193942) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
16
|
enable_extension "plpgsql"
|
17
17
|
|
18
18
|
create_table "accounts", force: :cascade do |t|
|
19
|
-
t.bigint "
|
20
|
-
t.string "
|
21
|
-
t.bigint "
|
22
|
-
t.string "
|
19
|
+
t.bigint "canvas_id", null: false
|
20
|
+
t.string "sis_id"
|
21
|
+
t.bigint "canvas_parent_account_id"
|
22
|
+
t.string "sis_parent_account_id"
|
23
23
|
t.string "name"
|
24
|
-
t.string "
|
24
|
+
t.string "workflow_state"
|
25
25
|
t.datetime "created_at", null: false
|
26
26
|
t.datetime "updated_at", null: false
|
27
|
-
t.index ["
|
27
|
+
t.index ["canvas_id"], name: "index_accounts_on_canvas_id", unique: true
|
28
28
|
end
|
29
29
|
|
30
30
|
create_table "admins", force: :cascade do |t|
|
31
|
-
t.bigint "
|
31
|
+
t.bigint "canvas_id", null: false
|
32
32
|
t.string "role_name"
|
33
33
|
t.bigint "canvas_role_id", null: false
|
34
34
|
t.json "user_data"
|
@@ -36,11 +36,11 @@ ActiveRecord::Schema.define(version: 20180725155729) do
|
|
36
36
|
t.string "workflow_state", null: false
|
37
37
|
t.datetime "created_at", null: false
|
38
38
|
t.datetime "updated_at", null: false
|
39
|
-
t.index ["
|
39
|
+
t.index ["canvas_id"], name: "index_admins_on_canvas_id", unique: true
|
40
40
|
end
|
41
41
|
|
42
42
|
create_table "assignment_groups", force: :cascade do |t|
|
43
|
-
t.bigint "
|
43
|
+
t.bigint "canvas_id", null: false
|
44
44
|
t.bigint "canvas_course_id"
|
45
45
|
t.string "name"
|
46
46
|
t.text "rules"
|
@@ -51,33 +51,33 @@ ActiveRecord::Schema.define(version: 20180725155729) do
|
|
51
51
|
t.datetime "canvas_updated_at"
|
52
52
|
t.datetime "created_at", null: false
|
53
53
|
t.datetime "updated_at", null: false
|
54
|
-
t.index ["canvas_assignment_group_id"], name: "index_assignment_groups_on_canvas_assignment_group_id", unique: true
|
55
54
|
t.index ["canvas_course_id"], name: "index_assignment_groups_on_canvas_course_id"
|
55
|
+
t.index ["canvas_id"], name: "index_assignment_groups_on_canvas_id", unique: true
|
56
56
|
end
|
57
57
|
|
58
58
|
create_table "assignments", force: :cascade do |t|
|
59
|
-
t.bigint "
|
59
|
+
t.bigint "canvas_id", null: false
|
60
60
|
t.string "title"
|
61
61
|
t.text "description"
|
62
62
|
t.datetime "due_at"
|
63
63
|
t.datetime "unlock_at"
|
64
64
|
t.datetime "lock_at"
|
65
|
-
t.
|
66
|
-
t.
|
67
|
-
t.
|
68
|
-
t.
|
65
|
+
t.float "points_possible"
|
66
|
+
t.float "min_score"
|
67
|
+
t.float "max_score"
|
68
|
+
t.float "mastery_score"
|
69
69
|
t.string "grading_type"
|
70
70
|
t.string "submission_types"
|
71
71
|
t.string "workflow_state"
|
72
|
-
t.integer "
|
73
|
-
t.string "
|
72
|
+
t.integer "canvas_context_id"
|
73
|
+
t.string "canvas_context_type"
|
74
74
|
t.integer "canvas_assignment_group_id"
|
75
|
-
t.integer "
|
76
|
-
t.integer "
|
75
|
+
t.integer "canvas_grading_scheme_id"
|
76
|
+
t.integer "canvas_grading_standard_id"
|
77
77
|
t.datetime "created_at", null: false
|
78
78
|
t.datetime "updated_at", null: false
|
79
|
-
t.index ["
|
80
|
-
t.index ["
|
79
|
+
t.index ["canvas_context_id", "canvas_context_type"], name: "index_assignments_on_canvas_context_id_and_canvas_context_type"
|
80
|
+
t.index ["canvas_id"], name: "index_assignments_on_canvas_id", unique: true
|
81
81
|
end
|
82
82
|
|
83
83
|
create_table "canvas_sync_job_logs", force: :cascade do |t|
|
@@ -96,21 +96,21 @@ ActiveRecord::Schema.define(version: 20180725155729) do
|
|
96
96
|
end
|
97
97
|
|
98
98
|
create_table "context_module_items", force: :cascade do |t|
|
99
|
-
t.bigint "
|
99
|
+
t.bigint "canvas_id"
|
100
100
|
t.bigint "canvas_context_module_id"
|
101
101
|
t.integer "position"
|
102
|
-
t.
|
103
|
-
t.
|
102
|
+
t.bigint "canvas_content_id"
|
103
|
+
t.string "canvas_content_type"
|
104
104
|
t.bigint "canvas_assignment_id"
|
105
105
|
t.string "workflow_state"
|
106
106
|
t.datetime "created_at", null: false
|
107
107
|
t.datetime "updated_at", null: false
|
108
108
|
t.index ["canvas_context_module_id"], name: "index_context_module_items_on_canvas_context_module_id"
|
109
|
-
t.index ["
|
109
|
+
t.index ["canvas_id"], name: "index_context_module_items_on_canvas_id", unique: true
|
110
110
|
end
|
111
111
|
|
112
112
|
create_table "context_modules", force: :cascade do |t|
|
113
|
-
t.bigint "
|
113
|
+
t.bigint "canvas_id"
|
114
114
|
t.bigint "canvas_context_id"
|
115
115
|
t.string "canvas_context_type"
|
116
116
|
t.integer "position"
|
@@ -121,46 +121,44 @@ ActiveRecord::Schema.define(version: 20180725155729) do
|
|
121
121
|
t.datetime "created_at", null: false
|
122
122
|
t.datetime "updated_at", null: false
|
123
123
|
t.index ["canvas_context_id", "canvas_context_type"], name: "index_context_modules_on_context"
|
124
|
-
t.index ["
|
124
|
+
t.index ["canvas_id"], name: "index_context_modules_on_canvas_id", unique: true
|
125
125
|
end
|
126
126
|
|
127
127
|
create_table "courses", force: :cascade do |t|
|
128
|
-
t.bigint "
|
128
|
+
t.bigint "canvas_id", null: false
|
129
129
|
t.string "sis_id"
|
130
|
-
t.string "
|
131
|
-
t.string "
|
132
|
-
t.string "
|
130
|
+
t.string "course_code"
|
131
|
+
t.string "name"
|
132
|
+
t.string "workflow_state"
|
133
133
|
t.integer "canvas_account_id"
|
134
134
|
t.integer "canvas_term_id"
|
135
|
-
t.
|
136
|
-
t.datetime "
|
137
|
-
t.datetime "end_date"
|
135
|
+
t.datetime "start_at"
|
136
|
+
t.datetime "end_at"
|
138
137
|
t.datetime "created_at", null: false
|
139
138
|
t.datetime "updated_at", null: false
|
140
|
-
t.index ["
|
139
|
+
t.index ["canvas_id"], name: "index_courses_on_canvas_id", unique: true
|
141
140
|
end
|
142
141
|
|
143
142
|
create_table "enrollments", force: :cascade do |t|
|
144
|
-
t.bigint "
|
143
|
+
t.bigint "canvas_id", null: false
|
145
144
|
t.bigint "canvas_course_id"
|
146
145
|
t.string "course_sis_id"
|
147
146
|
t.bigint "canvas_user_id"
|
148
147
|
t.string "user_sis_id"
|
149
148
|
t.string "role"
|
150
|
-
t.integer "
|
149
|
+
t.integer "canvas_role_id"
|
151
150
|
t.bigint "canvas_section_id"
|
152
|
-
t.string "
|
153
|
-
t.string "status"
|
151
|
+
t.string "workflow_state"
|
154
152
|
t.string "base_role_type"
|
155
153
|
t.datetime "created_at", null: false
|
156
154
|
t.datetime "updated_at", null: false
|
157
155
|
t.index ["canvas_course_id"], name: "index_enrollments_on_canvas_course_id"
|
158
|
-
t.index ["
|
156
|
+
t.index ["canvas_id"], name: "index_enrollments_on_canvas_id", unique: true
|
159
157
|
t.index ["canvas_user_id"], name: "index_enrollments_on_canvas_user_id"
|
160
158
|
end
|
161
159
|
|
162
160
|
create_table "roles", force: :cascade do |t|
|
163
|
-
t.integer "
|
161
|
+
t.integer "canvas_id", null: false
|
164
162
|
t.string "label", null: false
|
165
163
|
t.string "base_role_type", null: false
|
166
164
|
t.json "account"
|
@@ -168,45 +166,45 @@ ActiveRecord::Schema.define(version: 20180725155729) do
|
|
168
166
|
t.json "permissions"
|
169
167
|
t.datetime "created_at", null: false
|
170
168
|
t.datetime "updated_at", null: false
|
171
|
-
t.index ["
|
169
|
+
t.index ["canvas_id"], name: "index_roles_on_canvas_id", unique: true
|
172
170
|
end
|
173
171
|
|
174
172
|
create_table "sections", force: :cascade do |t|
|
175
|
-
t.bigint "
|
173
|
+
t.bigint "canvas_id", null: false
|
176
174
|
t.string "sis_id"
|
177
175
|
t.bigint "canvas_course_id"
|
178
176
|
t.bigint "canvas_nonxlist_course_id"
|
179
177
|
t.string "name"
|
180
|
-
t.string "
|
181
|
-
t.datetime "
|
182
|
-
t.datetime "
|
178
|
+
t.string "workflow_state"
|
179
|
+
t.datetime "start_at"
|
180
|
+
t.datetime "end_at"
|
183
181
|
t.datetime "created_at", null: false
|
184
182
|
t.datetime "updated_at", null: false
|
185
183
|
t.index ["canvas_course_id"], name: "index_sections_on_canvas_course_id"
|
186
|
-
t.index ["
|
184
|
+
t.index ["canvas_id"], name: "index_sections_on_canvas_id", unique: true
|
187
185
|
end
|
188
186
|
|
189
187
|
create_table "submissions", force: :cascade do |t|
|
190
|
-
t.bigint "
|
188
|
+
t.bigint "canvas_id", null: false
|
191
189
|
t.bigint "canvas_course_id"
|
192
190
|
t.bigint "canvas_assignment_id"
|
193
191
|
t.bigint "canvas_user_id"
|
194
192
|
t.datetime "submitted_at"
|
195
193
|
t.datetime "graded_at"
|
196
|
-
t.
|
197
|
-
t.
|
194
|
+
t.float "score"
|
195
|
+
t.float "points_possible"
|
198
196
|
t.boolean "excused"
|
199
197
|
t.string "workflow_state"
|
200
198
|
t.datetime "created_at", null: false
|
201
199
|
t.datetime "updated_at", null: false
|
202
200
|
t.index ["canvas_assignment_id"], name: "index_submissions_on_canvas_assignment_id"
|
203
201
|
t.index ["canvas_course_id"], name: "index_submissions_on_canvas_course_id"
|
204
|
-
t.index ["
|
202
|
+
t.index ["canvas_id"], name: "index_submissions_on_canvas_id", unique: true
|
205
203
|
t.index ["canvas_user_id"], name: "index_submissions_on_canvas_user_id"
|
206
204
|
end
|
207
205
|
|
208
206
|
create_table "terms", force: :cascade do |t|
|
209
|
-
t.integer "
|
207
|
+
t.integer "canvas_id", null: false
|
210
208
|
t.string "name"
|
211
209
|
t.datetime "start_at"
|
212
210
|
t.datetime "end_at"
|
@@ -215,22 +213,22 @@ ActiveRecord::Schema.define(version: 20180725155729) do
|
|
215
213
|
t.string "sis_id"
|
216
214
|
t.datetime "created_at", null: false
|
217
215
|
t.datetime "updated_at", null: false
|
218
|
-
t.index ["
|
216
|
+
t.index ["canvas_id"], name: "index_terms_on_canvas_id", unique: true
|
219
217
|
end
|
220
218
|
|
221
219
|
create_table "users", force: :cascade do |t|
|
222
|
-
t.bigint "
|
220
|
+
t.bigint "canvas_id", null: false
|
223
221
|
t.string "sis_id"
|
224
222
|
t.string "email"
|
225
223
|
t.string "first_name"
|
226
224
|
t.string "last_name"
|
227
|
-
t.string "
|
225
|
+
t.string "workflow_state"
|
228
226
|
t.string "login_id"
|
229
|
-
t.string "
|
227
|
+
t.string "name"
|
230
228
|
t.string "sortable_name"
|
231
229
|
t.datetime "created_at", null: false
|
232
230
|
t.datetime "updated_at", null: false
|
233
|
-
t.index ["
|
231
|
+
t.index ["canvas_id"], name: "index_users_on_canvas_id", unique: true
|
234
232
|
end
|
235
233
|
|
236
234
|
end
|