canvas_sync 0.19.2 → 0.19.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/canvas_sync/generators/templates/migrations/create_learning_outcomes.rb +1 -0
  3. data/lib/canvas_sync/generators/templates/migrations/create_rubric_assessments.rb +31 -0
  4. data/lib/canvas_sync/generators/templates/migrations/create_rubric_associations.rb +36 -0
  5. data/lib/canvas_sync/generators/templates/migrations/create_rubrics.rb +38 -0
  6. data/lib/canvas_sync/generators/templates/models/course.rb +1 -0
  7. data/lib/canvas_sync/generators/templates/models/rubric.rb +29 -0
  8. data/lib/canvas_sync/generators/templates/models/rubric_assessment.rb +18 -0
  9. data/lib/canvas_sync/generators/templates/models/rubric_association.rb +14 -0
  10. data/lib/canvas_sync/generators/templates/models/user.rb +1 -0
  11. data/lib/canvas_sync/jobs/sync_rubric_assessments_job.rb +15 -0
  12. data/lib/canvas_sync/jobs/sync_rubric_associations_job.rb +15 -0
  13. data/lib/canvas_sync/jobs/sync_rubrics_job.rb +15 -0
  14. data/lib/canvas_sync/processors/model_mappings.yml +174 -0
  15. data/lib/canvas_sync/processors/rubric_assessments_processor.rb +19 -0
  16. data/lib/canvas_sync/processors/rubric_associations_processor.rb +19 -0
  17. data/lib/canvas_sync/processors/rubrics_processor.rb +19 -0
  18. data/lib/canvas_sync/version.rb +1 -1
  19. data/lib/canvas_sync.rb +12 -0
  20. data/spec/canvas_sync/processors/rubric_assessments_spec.rb +16 -0
  21. data/spec/canvas_sync/processors/rubric_associations_spec.rb +16 -0
  22. data/spec/canvas_sync/processors/rubrics_processor_spec.rb +17 -0
  23. data/spec/dummy/app/models/course.rb +1 -0
  24. data/spec/dummy/app/models/rubric.rb +35 -0
  25. data/spec/dummy/app/models/rubric_assessment.rb +23 -0
  26. data/spec/dummy/app/models/rubric_association.rb +20 -0
  27. data/spec/dummy/db/migrate/20220712210559_create_learning_outcomes.rb +1 -0
  28. data/spec/dummy/db/migrate/20240509105100_create_rubrics.rb +44 -0
  29. data/spec/dummy/db/migrate/20240510094100_create_rubric_associations.rb +42 -0
  30. data/spec/dummy/db/migrate/20240510101100_create_rubric_assessments.rb +37 -0
  31. data/spec/dummy/db/schema.rb +89 -1
  32. data/spec/support/fixtures/reports/learning_outcomes.csv +3 -3
  33. data/spec/support/fixtures/reports/rubric_assessments.csv +3 -0
  34. data/spec/support/fixtures/reports/rubric_associations.csv +3 -0
  35. data/spec/support/fixtures/reports/rubrics.csv +3 -0
  36. metadata +39 -7
  37. data/spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv +0 -3
  38. data/spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e59715757e9cf413cdef16b5a9eea3ac036e3c056297b220c6873a876c34b8e0
4
- data.tar.gz: 22b8fa27e51f8f7e47cc3fcab76a435f047642bd800efb497646203c60fff47b
3
+ metadata.gz: 2417f54c93b2d0f6da94c33dfda0d3d340ab1653b307a446e0452f75c5ac0116
4
+ data.tar.gz: c36937a45cfcdcff87a87538770e88fec325a56f93ef31758c9991736521d4bd
5
5
  SHA512:
6
- metadata.gz: ee5b127167a45d8c13afaa3ad179478b30b61bf088144ec905d0e42adca5291c5fef91fe7f970c6f7c80ebdd37c1004c5cf6d833f929a09c54fb12f760e2cfad
7
- data.tar.gz: 2b32dc91e6f5326623b5eba4913eb1eb9722aa47b1064e6431238cbe68d4e83d8e9533609d7e65863d15f066d45568b21740dd61143809d14259de68e21f350f
6
+ metadata.gz: 969a326ca5b4bf90a4d20c64350d72ef7b0fd4021dc7a84caa39b41779e35f3f7a59cdc6ad7197cd13c9dada4cdf063535d50dfd480a69731d6ecc79977092ce
7
+ data.tar.gz: 2639eeb485a287c2d2f74051eb5458fa30a136f2721f1248fdeeac7a2296001382301c1ab401ee2b74573955fc0f7ec4b42c9f7e5d7a680f7c9b91f41e3bfdcc
@@ -20,6 +20,7 @@ class CreateLearningOutcomes < ActiveRecord::Migration[5.1]
20
20
  t.integer :outcome_import_id
21
21
  t.integer :root_account_ids, array: true, default: []
22
22
  t.text :description
23
+ t.text :short_description
23
24
 
24
25
  t.timestamps
25
26
  end
@@ -0,0 +1,31 @@
1
+ # <%= autogenerated_migration_warning %>
2
+
3
+ class CreateRubricAssessments < ActiveRecord::Migration[5.1]
4
+ def change
5
+ create_table :rubric_assessments do |t|
6
+ t.bigint :canvas_id
7
+ t.bigint :canvas_user_id
8
+ t.bigint :canvas_rubric_id
9
+ t.bigint :canvas_rubric_association_id
10
+ t.float :score
11
+ t.text :data
12
+ t.bigint :canvas_artifact_id
13
+ t.string :canvas_artifact_type
14
+ t.string :assessment_type
15
+ t.bigint :canvas_assessor_id
16
+ t.integer :artifact_attempt
17
+ t.boolean :hide_points
18
+ t.bigint :canvas_root_account_id
19
+
20
+ t.timestamps
21
+ end
22
+
23
+ add_index :rubric_assessments, [:canvas_id], name: :index_rubric_assessments_on_canvas_id, unique: true
24
+ add_index :rubric_assessments, [:canvas_artifact_id, :canvas_artifact_type], name: :index_rubric_assessments_on_canvas_aid_and_canvas_atype
25
+ add_index :rubric_assessments, [:canvas_assessor_id], name: :index_rubric_assessments_on_canvas_assessor_id
26
+ add_index :rubric_assessments, [:canvas_rubric_association_id], name: :index_rubric_assessments_on_canvas_rubric_association_id
27
+ add_index :rubric_assessments, [:canvas_rubric_id], name: :index_rubric_assessments_on_canvas_rubric_id
28
+ add_index :rubric_assessments, [:canvas_user_id], name: :index_rubric_assessments_on_canvas_user_id
29
+ add_index :rubric_assessments, [:canvas_root_account_id], name: :index_rubric_assessments_on_canvas_root_account_id
30
+ end
31
+ end
@@ -0,0 +1,36 @@
1
+ # <%= autogenerated_migration_warning %>
2
+
3
+ class CreateRubricAssociations < ActiveRecord::Migration[5.1]
4
+ def change
5
+ create_table :rubric_associations do |t|
6
+ t.bigint :canvas_id, null: false
7
+ t.bigint :canvas_rubric_id
8
+ t.bigint :canvas_association_id
9
+ t.string :canvas_association_type
10
+ t.boolean :use_for_grading
11
+ t.string :title
12
+ t.text :description
13
+ t.text :summary_data
14
+ t.string :purpose
15
+ t.string :url
16
+ t.bigint :canvas_context_id
17
+ t.string :canvas_context_type
18
+ t.boolean :hide_score_total
19
+ t.boolean :bookmarked
20
+ t.string :context_code
21
+ t.boolean :hide_points
22
+ t.boolean :hide_outcome_results
23
+ t.bigint :canvas_root_account_id
24
+ t.string :workflow_state
25
+
26
+ t.timestamps
27
+ end
28
+
29
+ add_index :rubric_associations, [:canvas_id], :name => :index_rubric_associations_on_canvas_id, unique: true
30
+ add_index :rubric_associations, [:canvas_association_id, :canvas_association_type], :name => :index_rubric_associations_on_canvas_aid_and_canvas_atype
31
+ add_index :rubric_associations, [:context_code], :name => :index_rubric_associations_on_context_code
32
+ add_index :rubric_associations, [:canvas_context_id, :canvas_context_type], :name => :index_rubric_associations_on_canvas_cid_and_canvas_ctype
33
+ add_index :rubric_associations, [:canvas_rubric_id], :name => :index_rubric_associations_on_canvas_rubric_id
34
+ add_index :rubric_associations, [:canvas_root_account_id], :name => :index_rubric_associations_on_canvas_root_account_id
35
+ end
36
+ end
@@ -0,0 +1,38 @@
1
+ # <%= autogenerated_model_warning %>
2
+
3
+ class CreateRubrics < ActiveRecord::Migration[5.1]
4
+ def change
5
+ create_table :rubrics do |t|
6
+ t.bigint :canvas_id, null: false
7
+ t.bigint :canvas_user_id
8
+ t.bigint :canvas_rubric_id
9
+ t.bigint :canvas_context_id
10
+ t.string :canvas_context_type
11
+ t.text :data
12
+ t.float :points_possible
13
+ t.string :title
14
+ t.text :description
15
+ t.boolean :reusable
16
+ t.boolean :public
17
+ t.boolean :read_only
18
+ t.integer :association_count
19
+ t.boolean :free_form_criterion_comments
20
+ t.string :context_code
21
+ t.string :migration_id
22
+ t.boolean :hide_score_total
23
+ t.string :workflow_state
24
+ t.bigint :canvas_root_account_id
25
+ t.boolean :hide_points
26
+ t.string :rating_order
27
+ t.string :button_display
28
+
29
+ t.timestamps
30
+ end
31
+
32
+ add_index :rubrics, [:canvas_id], unique: true
33
+ add_index :rubrics, [:canvas_context_id, :canvas_context_type]
34
+ add_index :rubrics, [:canvas_rubric_id]
35
+ add_index :rubrics, [:canvas_user_id]
36
+ add_index :rubrics, [:canvas_root_account_id]
37
+ end
38
+ end
@@ -14,6 +14,7 @@ class Course < ApplicationRecord
14
14
  has_many :submissions, primary_key: :canvas_id, foreign_key: :canvas_course_id
15
15
  has_many :assignment_groups, primary_key: :canvas_id, foreign_key: :canvas_course_id
16
16
  has_many :groups, primary_key: :canvas_id, foreign_key: :canvas_course_id
17
+ has_many :rubrics, as: :context, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type
17
18
 
18
19
  api_syncable({
19
20
  sis_id: :sis_course_id,
@@ -0,0 +1,29 @@
1
+ # <%= autogenerated_model_warning %>
2
+
3
+ class Rubric < ApplicationRecord
4
+ include CanvasSync::Record
5
+ include CanvasSync::Concerns::ApiSyncable
6
+
7
+ canvas_sync_features :defaults
8
+
9
+ validates :canvas_id, uniqueness: true, presence: true
10
+ belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id
11
+ belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id # based on another rubric
12
+ belongs_to :context, polymorphic: true, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type
13
+
14
+ has_many :rubric_associations, primary_key: :canvas_id, foreign_key: :canvas_association_id, foreign_type: :canvas_association_type
15
+ has_many :rubric_assessments, through: :rubric_associations, dependent: :destroy
16
+
17
+ api_syncable({
18
+ canvas_id: :id,
19
+ title: :title,
20
+ canvas_context_id: :context_id,
21
+ canvas_context_type: :context_type,
22
+ points_possible: :points_possible,
23
+ reusable: :reusable,
24
+ read_only: :read_only,
25
+ free_form_criterion_comments: :free_form_criterion_comments,
26
+ hide_score_total: :hide_score_total,
27
+ data: :data,
28
+ }, -> (api) { api.rubrics("self", canvas_id) })
29
+ end
@@ -0,0 +1,18 @@
1
+ # <%= autogenerated_model_warning %>
2
+
3
+ class RubricAssessment < ApplicationRecord
4
+ include CanvasSync::Record
5
+ include CanvasSync::Concerns::ApiSyncable
6
+
7
+ canvas_sync_features :defaults
8
+
9
+ validates :canvas_id, uniqueness: true, presence: true
10
+
11
+ belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id, optional: true
12
+ belongs_to :rubric_association, primary_key: :canvas_id, foreign_key: :canvas_rubric_association_id, optional: true
13
+ belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id, optional: true
14
+ belongs_to :assessor, class_name: "User", primary_key: :canvas_id, foreign_key: :canvas_assessor_id, optional: true
15
+ belongs_to :artifact, polymorphic: true, primary_key: :canvas_id, foreign_type: :canvas_artifact_type, foreign_key: :canvas_artifact_id, optional: true
16
+
17
+ serialize :data
18
+ end
@@ -0,0 +1,14 @@
1
+ # <%= autogenerated_model_warning %>
2
+
3
+ class RubricAssociation < ApplicationRecord
4
+ include CanvasSync::Record
5
+ include CanvasSync::Concerns::ApiSyncable
6
+
7
+ canvas_sync_features :defaults
8
+
9
+ validates :canvas_id, uniqueness: true, presence: true
10
+ belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id, optional: true
11
+ belongs_to :association_object, polymorphic: true, primary_key: :canvas_id, foreign_type: :canvas_association_type, optional: true
12
+ belongs_to :context, polymorphic: true, primary_key: :canvas_id, foreign_key: :canvas_context_id, optional: true
13
+ has_many :rubric_assessments
14
+ end
@@ -13,6 +13,7 @@ class User < ApplicationRecord
13
13
  has_many :admin_roles, through: :admins, source: :role
14
14
  has_many :submissions, primary_key: :canvas_id, foreign_key: :canvas_user_id
15
15
  has_many :group_memberships, primary_key: :canvas_id, foreign_key: :canvas_user_id
16
+ has_many :rubrics, primary_key: :canvas_id, foreign_key: :canvas_user_id
16
17
 
17
18
  api_syncable({
18
19
  sis_id: :sis_user_id,
@@ -0,0 +1,15 @@
1
+ module CanvasSync
2
+ module Jobs
3
+ class SyncRubricAssessmentsJob < ReportStarter
4
+ # @param options [Hash]
5
+ def perform(options)
6
+ super(
7
+ "rubric_assessments_csv",
8
+ merge_report_params(options),
9
+ CanvasSync::Processors::RubricAssessmentsProcessor.to_s,
10
+ {},
11
+ )
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module CanvasSync
2
+ module Jobs
3
+ class SyncRubricAssociationsJob < ReportStarter
4
+ # @param options [Hash]
5
+ def perform(options)
6
+ super(
7
+ "rubric_associations_csv",
8
+ merge_report_params(options),
9
+ CanvasSync::Processors::RubricAssociationsProcessor.to_s,
10
+ {},
11
+ )
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module CanvasSync
2
+ module Jobs
3
+ class SyncRubricsJob < ReportStarter
4
+ # @param options [Hash]
5
+ def perform(options)
6
+ super(
7
+ "rubrics_csv",
8
+ merge_report_params(options),
9
+ CanvasSync::Processors::RubricsProcessor.to_s,
10
+ {},
11
+ )
12
+ end
13
+ end
14
+ end
15
+ end
@@ -565,6 +565,9 @@ learning_outcomes:
565
565
  description:
566
566
  database_column_name: description
567
567
  type: string
568
+ short_description:
569
+ database_column_name: short_description
570
+ type: text
568
571
 
569
572
  course_nicknames:
570
573
  conflict_target:
@@ -583,3 +586,174 @@ course_nicknames:
583
586
  nickname:
584
587
  database_column_name: nickname
585
588
  type: string
589
+
590
+ rubrics:
591
+ conflict_target: id
592
+ report_columns:
593
+ id:
594
+ database_column_name: canvas_id
595
+ type: integer
596
+ user_id:
597
+ database_column_name: canvas_user_id
598
+ type: integer
599
+ rubric_id:
600
+ database_column_name: canvas_rubric_id
601
+ type: integer
602
+ context_id:
603
+ database_column_name: canvas_context_id
604
+ type: integer
605
+ context_type:
606
+ database_column_name: canvas_context_type
607
+ type: string
608
+ data:
609
+ database_column_name: data
610
+ type: text
611
+ points_possible:
612
+ database_column_name: points_possible
613
+ type: float
614
+ title:
615
+ database_column_name: title
616
+ type: string
617
+ description:
618
+ database_column_name: description
619
+ type: text
620
+ created_at:
621
+ database_column_name: created_at
622
+ type: datetime
623
+ reusable:
624
+ database_column_name: reusable
625
+ type: boolean
626
+ public:
627
+ database_column_name: public
628
+ type: boolean
629
+ read_only:
630
+ database_column_name: read_only
631
+ type: boolean
632
+ association_count:
633
+ database_column_name: association_count
634
+ type: integer
635
+ free_form_criterion_comments:
636
+ database_column_name: free_form_criterion_comments
637
+ type: boolean
638
+ context_code:
639
+ database_column_name: context_code
640
+ type: string
641
+ migration_id:
642
+ database_column_name: migration_id
643
+ type: string
644
+ hide_score_total:
645
+ database_column_name: hide_score_total
646
+ type: boolean
647
+ workflow_state:
648
+ database_column_name: workflow_state
649
+ type: string
650
+ root_account_id:
651
+ database_column_name: canvas_root_account_id
652
+ type: integer
653
+
654
+ rubric_associations:
655
+ conflict_target: id
656
+ report_columns:
657
+ id:
658
+ database_column_name: canvas_id
659
+ type: integer
660
+ rubric_id:
661
+ database_column_name: canvas_rubric_id
662
+ type: integer
663
+ association_id:
664
+ database_column_name: canvas_association_id
665
+ type: integer
666
+ association_type:
667
+ database_column_name: canvas_association_type
668
+ type: string
669
+ use_for_grading:
670
+ database_column_name: use_for_grading
671
+ type: boolean
672
+ created_at:
673
+ database_column_name: created_at
674
+ type: datetime
675
+ title:
676
+ database_column_name: title
677
+ type: string
678
+ summary_data:
679
+ database_column_name: summary_data
680
+ type: text
681
+ purpose:
682
+ database_column_name: purpose
683
+ type: string
684
+ url:
685
+ database_column_name: url
686
+ type: string
687
+ context_id:
688
+ database_column_name: canvas_context_id
689
+ type: integer
690
+ context_type:
691
+ database_column_name: canvas_context_type
692
+ type: string
693
+ hide_score_total:
694
+ database_column_name: hide_score_total
695
+ type: boolean
696
+ bookmarked:
697
+ database_column_name: bookmarked
698
+ type: boolean
699
+ context_code:
700
+ database_column_name: context_code
701
+ type: string
702
+ hide_points:
703
+ database_column_name: hide_points
704
+ type: boolean
705
+ hide_outcome_results:
706
+ database_column_name: hide_outcome_results
707
+ type: boolean
708
+ root_account_id:
709
+ database_column_name: canvas_root_account_id
710
+ type: integer
711
+ workflow_state:
712
+ database_column_name: workflow_state
713
+ type: string
714
+
715
+ rubric_assessments:
716
+ conflict_target: id
717
+ report_columns:
718
+ id:
719
+ database_column_name: canvas_id
720
+ type: integer
721
+ user_id:
722
+ database_column_name: canvas_user_id
723
+ type: integer
724
+ rubric_id:
725
+ database_column_name: canvas_rubric_id
726
+ type: integer
727
+ rubric_association_id:
728
+ database_column_name: canvas_rubric_association_id
729
+ type: integer
730
+ score:
731
+ database_column_name: score
732
+ type: float
733
+ data:
734
+ database_column_name: data
735
+ type: text
736
+ created_at:
737
+ database_column_name: created_at
738
+ type: datetime
739
+ artifact_id:
740
+ database_column_name: canvas_artifact_id
741
+ type: integer
742
+ artifact_type:
743
+ database_column_name: canvas_artifact_type
744
+ type: string
745
+ assessment_type:
746
+ database_column_name: assessment_type
747
+ type: string
748
+ assessor_id:
749
+ database_column_name: canvas_assessor_id
750
+ type: integer
751
+ artifact_attempt:
752
+ database_column_name: artifact_attempt
753
+ type: integer
754
+ hide_points:
755
+ database_column_name: hide_points
756
+ type: boolean
757
+ root_account_id:
758
+ database_column_name: canvas_root_account_id
759
+ type: integer
@@ -0,0 +1,19 @@
1
+ require_relative "./report_processor"
2
+
3
+ module CanvasSync
4
+ module Processors
5
+ # Processes a rubric assessments report using the bulk importer.
6
+ #
7
+ # @param report_file_path [String]
8
+ # @param options [Hash]
9
+ class RubricAssessmentsProcessor < ReportProcessor
10
+ def self.process(report_file_path, _options, report_id)
11
+ new(report_file_path, _options)
12
+ end
13
+
14
+ def initialize(report_file_path, options)
15
+ do_bulk_import(report_file_path, RubricAssessment, options: options)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "./report_processor"
2
+
3
+ module CanvasSync
4
+ module Processors
5
+ # Processes a rubric association report using the bulk importer.
6
+ #
7
+ # @param report_file_path [String]
8
+ # @param options [Hash]
9
+ class RubricAssociationsProcessor < ReportProcessor
10
+ def self.process(report_file_path, _options, report_id)
11
+ new(report_file_path, _options)
12
+ end
13
+
14
+ def initialize(report_file_path, options)
15
+ do_bulk_import(report_file_path, RubricAssociation, options: options)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative "./report_processor"
2
+
3
+ module CanvasSync
4
+ module Processors
5
+ # Processes a rubrics report using the bulk importer.
6
+ #
7
+ # @param report_file_path [String]
8
+ # @param options [Hash]
9
+ class RubricsProcessor < ReportProcessor
10
+ def self.process(report_file_path, _options, report_id)
11
+ new(report_file_path, _options)
12
+ end
13
+
14
+ def initialize(report_file_path, options)
15
+ do_bulk_import(report_file_path, Rubric, options: options)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.19.2".freeze
2
+ VERSION = "0.19.6".freeze
3
3
  end
data/lib/canvas_sync.rb CHANGED
@@ -47,6 +47,9 @@ module CanvasSync
47
47
  content_migrations
48
48
  learning_outcomes
49
49
  course_nicknames
50
+ rubrics
51
+ rubric_associations
52
+ rubric_assessments
50
53
  ].freeze
51
54
 
52
55
  SUPPORTED_TERM_SCOPE_MODELS = %w[
@@ -55,6 +58,9 @@ module CanvasSync
55
58
  assignment_groups
56
59
  context_modules
57
60
  context_module_items
61
+ rubrics
62
+ rubric_associations
63
+ rubric_assessments
58
64
  ].freeze
59
65
 
60
66
  DEFAULT_TERM_SCOPE_MODELS = %w[
@@ -63,6 +69,9 @@ module CanvasSync
63
69
  assignment_groups
64
70
  context_modules
65
71
  context_module_items
72
+ rubrics
73
+ rubric_associations
74
+ rubric_assessments
66
75
  ].freeze
67
76
 
68
77
  SUPPORTED_LIVE_EVENTS = %w[
@@ -154,6 +163,9 @@ module CanvasSync
154
163
  context_modules: CanvasSync::Jobs::SyncContextModulesJob,
155
164
  context_module_items: CanvasSync::Jobs::SyncContextModuleItemsJob,
156
165
  content_migrations: CanvasSync::Jobs::SyncContentMigrationsJob,
166
+ rubrics: CanvasSync::Jobs::SyncRubricsJob,
167
+ rubric_associations: CanvasSync::Jobs::SyncRubricAssociationsJob,
168
+ rubric_assessments: CanvasSync::Jobs::SyncRubricAssessmentsJob,
157
169
  }.with_indifferent_access
158
170
 
159
171
  root_chain = base_canvas_sync_chain(**kwargs, globals: options[:global] || kwargs[:globals])
@@ -0,0 +1,16 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Processors::RubricAssessmentsProcessor do
4
+ let(:subject) { CanvasSync::Processors::RubricAssessmentsProcessor }
5
+
6
+ describe "#process" do
7
+ it 'processes rubric assessments' do
8
+ expect {
9
+ subject.process('spec/support/fixtures/reports/rubric_assessments.csv', { models: ['rubric_assessments'] }, 1)
10
+ }.to change { RubricAssessment.count }.by(2)
11
+ rubric_assessment = RubricAssessment.first
12
+ expect(rubric_assessment.canvas_rubric_association_id).to eq(1)
13
+ expect(rubric_assessment.score).to eq(10)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Processors::RubricAssociationsProcessor do
4
+ let(:subject) { CanvasSync::Processors::RubricAssociationsProcessor }
5
+
6
+ describe "#process" do
7
+ it 'processes rubric associations' do
8
+ expect {
9
+ subject.process('spec/support/fixtures/reports/rubric_associations.csv', { models: ['rubric_associations'] }, 1)
10
+ }.to change { RubricAssociation.count }.by(2)
11
+ rubric_association = RubricAssociation.first
12
+ expect(rubric_association.title).to eq("Rubric Association Title")
13
+ expect(rubric_association.summary_data).to eq("Rubric Association Summary Data")
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Processors::RubricsProcessor do
4
+ let(:subject) { CanvasSync::Processors::RubricsProcessor }
5
+
6
+ describe "#process" do
7
+ it 'inserts rubrics' do
8
+ expect {
9
+ subject.process('spec/support/fixtures/reports/rubrics.csv', { models: ['rubrics'] }, 1)
10
+ }.to change { Rubric.count }.by(2)
11
+ rubric = Rubric.first
12
+ expect(rubric.title).to eq("Assignment 1")
13
+ expect(rubric.description).to eq("Assignment 1 description")
14
+ end
15
+
16
+ end
17
+ end
@@ -20,6 +20,7 @@ class Course < ApplicationRecord
20
20
  has_many :submissions, primary_key: :canvas_id, foreign_key: :canvas_course_id
21
21
  has_many :assignment_groups, primary_key: :canvas_id, foreign_key: :canvas_course_id
22
22
  has_many :groups, primary_key: :canvas_id, foreign_key: :canvas_course_id
23
+ has_many :rubrics, as: :context, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type
23
24
 
24
25
  api_syncable({
25
26
  sis_id: :sis_course_id,
@@ -0,0 +1,35 @@
1
+ # #
2
+ # AUTO GENERATED MODEL
3
+ # This model was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ class Rubric < ApplicationRecord
10
+ include CanvasSync::Record
11
+ include CanvasSync::Concerns::ApiSyncable
12
+
13
+ canvas_sync_features :defaults
14
+
15
+ validates :canvas_id, uniqueness: true, presence: true
16
+ belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id, optional: true
17
+ belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id , optional: true # based on another rubric
18
+ belongs_to :context, polymorphic: true, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type, optional: true
19
+
20
+ has_many :rubric_associations, primary_key: :canvas_id, foreign_key: :canvas_association_id, foreign_type: :canvas_association_type
21
+ has_many :rubric_assessments, through: :rubric_associations, dependent: :destroy
22
+
23
+ api_syncable({
24
+ canvas_id: :id,
25
+ title: :title,
26
+ canvas_context_id: :context_id,
27
+ canvas_context_type: :context_type,
28
+ points_possible: :points_possible,
29
+ reusable: :reusable,
30
+ read_only: :read_only,
31
+ free_form_criterion_comments: :free_form_criterion_comments,
32
+ hide_score_total: :hide_score_total,
33
+ data: :data,
34
+ }, -> (api) { api.get("api/v1/accounts/#{canvas_root_account_id}/rubrics/#{canvas_id}") })
35
+ end
@@ -0,0 +1,23 @@
1
+ # #
2
+ # AUTO GENERATED MODEL
3
+ # This model was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ class RubricAssessment < ApplicationRecord
10
+ include CanvasSync::Record
11
+
12
+ canvas_sync_features :defaults
13
+
14
+ validates :canvas_id, uniqueness: true, presence: true
15
+
16
+ belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id, optional: true
17
+ belongs_to :rubric_association, primary_key: :canvas_id, foreign_key: :canvas_rubric_association_id, optional: true
18
+ belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id, optional: true
19
+ belongs_to :assessor, class_name: "User", primary_key: :canvas_id, foreign_key: :canvas_assessor_id, optional: true
20
+ belongs_to :artifact, polymorphic: true, primary_key: :canvas_id, foreign_type: :canvas_artifact_type, foreign_key: :canvas_artifact_id, optional: true
21
+
22
+ serialize :data
23
+ end
@@ -0,0 +1,20 @@
1
+ # #
2
+ # AUTO GENERATED MODEL
3
+ # This model was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ class RubricAssociation < ApplicationRecord
10
+ include CanvasSync::Record
11
+
12
+ canvas_sync_features :defaults
13
+
14
+ validates :canvas_id, uniqueness: true, presence: true
15
+ belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id, optional: true
16
+ belongs_to :association_object, polymorphic: true, primary_key: :canvas_id, foreign_type: :canvas_association_type, foreign_key: :canvas_association_id, optional: true
17
+ belongs_to :context, polymorphic: true, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type, optional: true
18
+
19
+ has_many :rubric_assessments
20
+ end
@@ -26,6 +26,7 @@ class CreateLearningOutcomes < ActiveRecord::Migration[5.1]
26
26
  t.integer :outcome_import_id
27
27
  t.integer :root_account_ids, array: true, default: []
28
28
  t.text :description
29
+ t.text: :short_description
29
30
 
30
31
  t.timestamps
31
32
  end
@@ -0,0 +1,44 @@
1
+ # #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ class CreateRubrics < ActiveRecord::Migration[5.1]
10
+ def change
11
+ create_table :rubrics do |t|
12
+ t.bigint :canvas_id, null: false
13
+ t.bigint :canvas_user_id
14
+ t.bigint :canvas_rubric_id
15
+ t.bigint :canvas_context_id
16
+ t.string :canvas_context_type
17
+ t.text :data
18
+ t.float :points_possible
19
+ t.string :title
20
+ t.text :description
21
+ t.boolean :reusable
22
+ t.boolean :public
23
+ t.boolean :read_only
24
+ t.integer :association_count
25
+ t.boolean :free_form_criterion_comments
26
+ t.string :context_code
27
+ t.string :migration_id
28
+ t.boolean :hide_score_total
29
+ t.string :workflow_state
30
+ t.bigint :canvas_root_account_id
31
+ t.boolean :hide_points
32
+ t.string :rating_order
33
+ t.string :button_display
34
+
35
+ t.timestamps
36
+ end
37
+
38
+ add_index :rubrics, [:canvas_id], unique: true
39
+ add_index :rubrics, [:canvas_context_id, :canvas_context_type]
40
+ add_index :rubrics, [:canvas_rubric_id]
41
+ add_index :rubrics, [:canvas_user_id]
42
+ add_index :rubrics, [:canvas_root_account_id]
43
+ end
44
+ end
@@ -0,0 +1,42 @@
1
+ # #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ class CreateRubricAssociations < ActiveRecord::Migration[5.1]
10
+ def change
11
+ create_table :rubric_associations do |t|
12
+ t.bigint :canvas_id, null: false
13
+ t.bigint :canvas_rubric_id
14
+ t.bigint :canvas_association_id
15
+ t.string :canvas_association_type
16
+ t.boolean :use_for_grading
17
+ t.string :title
18
+ t.text :description
19
+ t.text :summary_data
20
+ t.string :purpose
21
+ t.string :url
22
+ t.bigint :canvas_context_id
23
+ t.string :canvas_context_type
24
+ t.boolean :hide_score_total
25
+ t.boolean :bookmarked
26
+ t.string :context_code
27
+ t.boolean :hide_points
28
+ t.boolean :hide_outcome_results
29
+ t.bigint :canvas_root_account_id
30
+ t.string :workflow_state
31
+
32
+ t.timestamps
33
+ end
34
+
35
+ add_index :rubric_associations, [:canvas_id], :name => :index_rubric_associations_on_canvas_id, unique: true
36
+ add_index :rubric_associations, [:canvas_association_id, :canvas_association_type], :name => :index_rubric_associations_on_canvas_aid_and_canvas_atype
37
+ add_index :rubric_associations, [:context_code], :name => :index_rubric_associations_on_context_code
38
+ add_index :rubric_associations, [:canvas_context_id, :canvas_context_type], :name => :index_rubric_associations_on_canvas_cid_and_canvas_ctype
39
+ add_index :rubric_associations, [:canvas_rubric_id], :name => :index_rubric_associations_on_canvas_rubric_id
40
+ add_index :rubric_associations, [:canvas_root_account_id], :name => :index_rubric_associations_on_canvas_root_account_id
41
+ end
42
+ end
@@ -0,0 +1,37 @@
1
+ # #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ class CreateRubricAssessments < ActiveRecord::Migration[5.1]
10
+ def change
11
+ create_table :rubric_assessments do |t|
12
+ t.bigint :canvas_id
13
+ t.bigint :canvas_user_id
14
+ t.bigint :canvas_rubric_id
15
+ t.bigint :canvas_rubric_association_id
16
+ t.float :score
17
+ t.text :data
18
+ t.bigint :canvas_artifact_id
19
+ t.string :canvas_artifact_type
20
+ t.string :assessment_type
21
+ t.bigint :canvas_assessor_id
22
+ t.integer :artifact_attempt
23
+ t.boolean :hide_points
24
+ t.bigint :canvas_root_account_id
25
+
26
+ t.timestamps
27
+ end
28
+
29
+ add_index :rubric_assessments, [:canvas_id], name: :index_rubric_assessments_on_canvas_id, unique: true
30
+ add_index :rubric_assessments, [:canvas_artifact_id, :canvas_artifact_type], name: :index_rubric_assessments_on_canvas_aid_and_canvas_atype
31
+ add_index :rubric_assessments, [:canvas_assessor_id], name: :index_rubric_assessments_on_canvas_assessor_id
32
+ add_index :rubric_assessments, [:canvas_rubric_association_id], name: :index_rubric_assessments_on_canvas_rubric_association_id
33
+ add_index :rubric_assessments, [:canvas_rubric_id], name: :index_rubric_assessments_on_canvas_rubric_id
34
+ add_index :rubric_assessments, [:canvas_user_id], name: :index_rubric_assessments_on_canvas_user_id
35
+ add_index :rubric_assessments, [:canvas_root_account_id], name: :index_rubric_assessments_on_canvas_root_account_id
36
+ end
37
+ end
@@ -10,7 +10,7 @@
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: 2024_04_08_223326) do
13
+ ActiveRecord::Schema.define(version: 2024_05_10_101100) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -275,6 +275,7 @@ ActiveRecord::Schema.define(version: 2024_04_08_223326) do
275
275
  t.integer "outcome_import_id"
276
276
  t.integer "root_account_ids", default: [], array: true
277
277
  t.text "description"
278
+ t.text "short_description"
278
279
  t.datetime "created_at", null: false
279
280
  t.datetime "updated_at", null: false
280
281
  t.index ["canvas_context_id", "canvas_context_type"], name: "index_learning_outcomes_on_context"
@@ -306,6 +307,93 @@ ActiveRecord::Schema.define(version: 2024_04_08_223326) do
306
307
  t.index ["canvas_id"], name: "index_roles_on_canvas_id", unique: true
307
308
  end
308
309
 
310
+ create_table "rubrics", force: :cascade do |t|
311
+ t.bigint "canvas_id", null: false
312
+ t.bigint "canvas_user_id"
313
+ t.bigint "canvas_rubric_id"
314
+ t.bigint "canvas_context_id"
315
+ t.string "canvas_context_type"
316
+ t.text "data"
317
+ t.float "points_possible"
318
+ t.string "title"
319
+ t.text "description"
320
+ t.boolean "reusable"
321
+ t.boolean "public"
322
+ t.boolean "read_only"
323
+ t.integer "association_count"
324
+ t.boolean "free_form_criterion_comments"
325
+ t.string "context_code"
326
+ t.string "migration_id"
327
+ t.boolean "hide_score_total"
328
+ t.string "workflow_state"
329
+ t.bigint "canvas_root_account_id"
330
+ t.boolean "hide_points"
331
+ t.string "rating_order"
332
+ t.string "button_display"
333
+ t.datetime "created_at", null: false
334
+ t.datetime "updated_at", null: false
335
+ t.index "canvas_id", name: "index_rubrics_on_canvas_id", unique: true
336
+ t.index ["canvas_context_id", "canvas_context_type"], name: "index_rubrics_on_canvas_context_id_and_canvas_context_type"
337
+ t.index "canvas_rubric_id", name: "index_rubrics_on_canvas_rubric_id"
338
+ t.index "canvas_user_id", name: "index_rubrics_on_canvas_user_id"
339
+ t.index "canvas_root_account_id", name: "index_rubrics_on_canvas_root_account_id"
340
+ end
341
+
342
+ create_table "rubric_associations", force: :cascade do |t|
343
+ t.integer "canvas_id", null: false
344
+ t.integer "canvas_rubric_id"
345
+ t.integer "canvas_association_id"
346
+ t.string "canvas_association_type"
347
+ t.boolean "use_for_grading"
348
+ t.datetime "created_at"
349
+ t.datetime "updated_at"
350
+ t.string "title"
351
+ t.text "description"
352
+ t.text "summary_data"
353
+ t.string "purpose"
354
+ t.string "url"
355
+ t.integer "canvas_context_id"
356
+ t.string "canvas_context_type"
357
+ t.boolean "hide_score_total"
358
+ t.string "context_code"
359
+ t.boolean "bookmarked"
360
+ t.boolean "hide_points"
361
+ t.boolean "hide_outcome_results"
362
+ t.bigint "canvas_root_account_id"
363
+ t.string "workflow_state"
364
+ t.index ["canvas_id"], name: "index_rubric_associations_on_canvas_id", unique: true
365
+ t.index ["canvas_association_id", "canvas_association_type"], name: "index_rubric_associations_on_canvas_aid_and_canvas_atype"
366
+ t.index ["context_code"], name: "index_rubric_associations_on_context_code"
367
+ t.index ["canvas_context_id", "canvas_context_type"], name: "index_rubric_associations_on_canvas_cid_and_canvas_ctype"
368
+ t.index ["canvas_rubric_id"], name: "index_rubric_associations_on_canvas_rubric_id"
369
+ t.index ["canvas_root_account_id"], name: "index_rubric_associations_on_canvas_root_account_id"
370
+ end
371
+
372
+ create_table "rubric_assessments", force: :cascade do |t|
373
+ t.bigint "canvas_id"
374
+ t.bigint "canvas_user_id"
375
+ t.bigint "canvas_rubric_id"
376
+ t.bigint "canvas_rubric_association_id"
377
+ t.float "score"
378
+ t.text "data"
379
+ t.datetime "created_at"
380
+ t.datetime "updated_at"
381
+ t.bigint "canvas_artifact_id"
382
+ t.string "canvas_artifact_type"
383
+ t.string "assessment_type"
384
+ t.bigint "canvas_assessor_id"
385
+ t.integer "artifact_attempt"
386
+ t.boolean "hide_points"
387
+ t.bigint "canvas_root_account_id"
388
+ t.index ["canvas_id"], name: "index_rubric_assessments_on_canvas_id", unique: true
389
+ t.index ["canvas_artifact_id", "canvas_artifact_type"], name: "index_rubric_assessments_on_canvas_aid_and_canvas_atype"
390
+ t.index ["canvas_assessor_id"], name: "index_rubric_assessments_on_canvas_assessor_id"
391
+ t.index ["canvas_rubric_association_id"], name: "index_rubric_assessments_on_canvas_rubric_association_id"
392
+ t.index ["canvas_rubric_id"], name: "index_rubric_assessments_on_canvas_rubric_id"
393
+ t.index ["canvas_user_id"], name: "index_rubric_assessments_on_canvas_user_id"
394
+ t.index ["canvas_root_account_id"], name: "index_rubric_assessments_on_canvas_root_account_id"
395
+ end
396
+
309
397
  create_table "sections", force: :cascade do |t|
310
398
  t.bigint "canvas_id", null: false
311
399
  t.string "sis_id"
@@ -1,3 +1,3 @@
1
- learning_outcome_id,context_id,context_type,name,friendly_name,workflow_state,created_at,updated_at,migration_id,vendor_guid,low_grade,high_grade,calculation_method,calculation_int,outcome_import_id,root_account_ids,description
2
- 1,1,Course,Course Outcome,"",active,2021-08-12 21:11:40 UTC,2021-08-13 01:05:40 UTC,,,,,decaying_average,65,,[1],<p>description</p>
3
- 2,1,Account,Account Outcome,Friendly Name,active,2021-08-12 21:11:40 UTC,2021-08-13 01:05:40 UTC,,,,,decaying_average,65,,[1],<p>description</p>
1
+ learning_outcome_id,context_id,context_type,name,friendly_name,workflow_state,created_at,updated_at,migration_id,vendor_guid,low_grade,high_grade,calculation_method,calculation_int,outcome_import_id,root_account_ids,description,short_description
2
+ 1,1,Course,Course Outcome,"",active,2021-08-12 21:11:40 UTC,2021-08-13 01:05:40 UTC,,,,,decaying_average,65,,[1],<p>description</p>,Short description
3
+ 2,1,Account,Account Outcome,Friendly Name,active,2021-08-12 21:11:40 UTC,2021-08-13 01:05:40 UTC,,,,,decaying_average,65,,[1],<p>description</p>,Short description2
@@ -0,0 +1,3 @@
1
+ id,user_id,rubric_id,rubric_association_id,score,data,created_at,updated_at,artifact_id,artifact_type,assessment_type,assessor_id,artifact_attempt,hide_points,root_account_id,
2
+ 1,1,1,1,10,"","2019-09-0900:00:00","2019-09-0900:00:00",1,"Assignment","grading",1,1,0,1
3
+ 2,2,2,2,5,"","2019-09-0900:00:00","2019-09-0900:00:00",1,"Assignment","grading",1,1,0,1
@@ -0,0 +1,3 @@
1
+ id,rubric_id,association_id,association_type,use_for_grading,created_at,updated_at,title,summary_data,purpose,url,context_id,context_type,hide_score_total,bookmarked,context_code,hide_points,hide_outcome_results,root_account_id,workflow_state
2
+ 1,1,1,Assignment,0,2024-01-01T00:00:00Z,2024-01-01T00:00:00Z,"Rubric Association Title","Rubric Association Summary Data","Rubric Association Purpose","Rubric Association URL",1,Course,0,0,"Context Code",0,0,1,active
3
+ 2,2,2,Assignment,0,2024-01-01T00:00:00Z,2024-01-01T00:00:00Z,"Rubric Association Title 2","Rubric Association Summary Data 2","Rubric Association Purpose","Rubric Association URL",1,Course,0,0,"Context Code",0,0,1,active
@@ -0,0 +1,3 @@
1
+ id,user_id,rubric_id,context_id,context_type,data,points_possible,title,description,created_at,updated_at,reusable,public,read_only,association_count,free_form_criterion_comments,context_code,migration_id,hide_score_total,workflow_state,root_account_id
2
+ 1,1,1,1,Assignment,,"10","Assignment 1","Assignment 1 description","2013-01-01 00:00:00","2013-01-01 00:00:00",0,0,0,0,0,"Context code 1",1,0,0,1
3
+ 2,1,1,1,Assignment,,"10","Assignment 2","Assignment 2 description","2013-01-01 00:00:00","2013-01-01 00:00:00",0,0,0,0,0,"Context code 2",2,0,0,2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.19.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-09 00:00:00.000000000 Z
11
+ date: 2024-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -439,6 +439,9 @@ files:
439
439
  - lib/canvas_sync/generators/templates/migrations/create_learning_outcomes.rb
440
440
  - lib/canvas_sync/generators/templates/migrations/create_pseudonyms.rb
441
441
  - lib/canvas_sync/generators/templates/migrations/create_roles.rb
442
+ - lib/canvas_sync/generators/templates/migrations/create_rubric_assessments.rb
443
+ - lib/canvas_sync/generators/templates/migrations/create_rubric_associations.rb
444
+ - lib/canvas_sync/generators/templates/migrations/create_rubrics.rb
442
445
  - lib/canvas_sync/generators/templates/migrations/create_sections.rb
443
446
  - lib/canvas_sync/generators/templates/migrations/create_submissions.rb
444
447
  - lib/canvas_sync/generators/templates/migrations/create_terms.rb
@@ -461,6 +464,9 @@ files:
461
464
  - lib/canvas_sync/generators/templates/models/learning_outcome.rb
462
465
  - lib/canvas_sync/generators/templates/models/pseudonym.rb
463
466
  - lib/canvas_sync/generators/templates/models/role.rb
467
+ - lib/canvas_sync/generators/templates/models/rubric.rb
468
+ - lib/canvas_sync/generators/templates/models/rubric_assessment.rb
469
+ - lib/canvas_sync/generators/templates/models/rubric_association.rb
464
470
  - lib/canvas_sync/generators/templates/models/section.rb
465
471
  - lib/canvas_sync/generators/templates/models/submission.rb
466
472
  - lib/canvas_sync/generators/templates/models/term.rb
@@ -526,6 +532,9 @@ files:
526
532
  - lib/canvas_sync/jobs/sync_context_modules_job.rb
527
533
  - lib/canvas_sync/jobs/sync_provisioning_report_job.rb
528
534
  - lib/canvas_sync/jobs/sync_roles_job.rb
535
+ - lib/canvas_sync/jobs/sync_rubric_assessments_job.rb
536
+ - lib/canvas_sync/jobs/sync_rubric_associations_job.rb
537
+ - lib/canvas_sync/jobs/sync_rubrics_job.rb
529
538
  - lib/canvas_sync/jobs/sync_simple_table_job.rb
530
539
  - lib/canvas_sync/jobs/sync_submissions_job.rb
531
540
  - lib/canvas_sync/jobs/sync_terms_job.rb
@@ -540,6 +549,9 @@ files:
540
549
  - lib/canvas_sync/processors/normal_processor.rb
541
550
  - lib/canvas_sync/processors/provisioning_report_processor.rb
542
551
  - lib/canvas_sync/processors/report_processor.rb
552
+ - lib/canvas_sync/processors/rubric_assessments_processor.rb
553
+ - lib/canvas_sync/processors/rubric_associations_processor.rb
554
+ - lib/canvas_sync/processors/rubrics_processor.rb
543
555
  - lib/canvas_sync/processors/submissions_processor.rb
544
556
  - lib/canvas_sync/record.rb
545
557
  - lib/canvas_sync/sidekiq_job.rb
@@ -584,6 +596,9 @@ files:
584
596
  - spec/canvas_sync/processors/context_modules_processor_spec.rb
585
597
  - spec/canvas_sync/processors/normal_processor_spec.rb
586
598
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
599
+ - spec/canvas_sync/processors/rubric_assessments_spec.rb
600
+ - spec/canvas_sync/processors/rubric_associations_spec.rb
601
+ - spec/canvas_sync/processors/rubrics_processor_spec.rb
587
602
  - spec/canvas_sync/processors/submissions_processor_spec.rb
588
603
  - spec/canvas_sync/services/module_event_spec.rb
589
604
  - spec/canvas_sync/services/module_item_event_spec.rb
@@ -607,6 +622,9 @@ files:
607
622
  - spec/dummy/app/models/learning_outcome.rb
608
623
  - spec/dummy/app/models/pseudonym.rb
609
624
  - spec/dummy/app/models/role.rb
625
+ - spec/dummy/app/models/rubric.rb
626
+ - spec/dummy/app/models/rubric_assessment.rb
627
+ - spec/dummy/app/models/rubric_association.rb
610
628
  - spec/dummy/app/models/section.rb
611
629
  - spec/dummy/app/models/submission.rb
612
630
  - spec/dummy/app/models/term.rb
@@ -676,6 +694,9 @@ files:
676
694
  - spec/dummy/db/migrate/20220712210559_create_learning_outcomes.rb
677
695
  - spec/dummy/db/migrate/20220926221926_create_users.rb
678
696
  - spec/dummy/db/migrate/20240408223326_create_course_nicknames.rb
697
+ - spec/dummy/db/migrate/20240509105100_create_rubrics.rb
698
+ - spec/dummy/db/migrate/20240510094100_create_rubric_associations.rb
699
+ - spec/dummy/db/migrate/20240510101100_create_rubric_assessments.rb
679
700
  - spec/dummy/db/schema.rb
680
701
  - spec/factories/account_factory.rb
681
702
  - spec/factories/admin_factory.rb
@@ -729,8 +750,9 @@ files:
729
750
  - spec/support/fixtures/reports/groups.csv
730
751
  - spec/support/fixtures/reports/learning_outcomes.csv
731
752
  - spec/support/fixtures/reports/provisioning_csv
732
- - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
733
- - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
753
+ - spec/support/fixtures/reports/rubric_assessments.csv
754
+ - spec/support/fixtures/reports/rubric_associations.csv
755
+ - spec/support/fixtures/reports/rubrics.csv
734
756
  - spec/support/fixtures/reports/sections.csv
735
757
  - spec/support/fixtures/reports/submissions.csv
736
758
  - spec/support/fixtures/reports/user_observers.csv
@@ -754,7 +776,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
754
776
  - !ruby/object:Gem::Version
755
777
  version: '0'
756
778
  requirements: []
757
- rubygems_version: 3.5.4
779
+ rubygems_version: 3.4.10
758
780
  signing_key:
759
781
  specification_version: 4
760
782
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
@@ -799,6 +821,9 @@ test_files:
799
821
  - spec/canvas_sync/processors/context_modules_processor_spec.rb
800
822
  - spec/canvas_sync/processors/normal_processor_spec.rb
801
823
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
824
+ - spec/canvas_sync/processors/rubric_assessments_spec.rb
825
+ - spec/canvas_sync/processors/rubric_associations_spec.rb
826
+ - spec/canvas_sync/processors/rubrics_processor_spec.rb
802
827
  - spec/canvas_sync/processors/submissions_processor_spec.rb
803
828
  - spec/canvas_sync/services/module_event_spec.rb
804
829
  - spec/canvas_sync/services/module_item_event_spec.rb
@@ -822,6 +847,9 @@ test_files:
822
847
  - spec/dummy/app/models/learning_outcome.rb
823
848
  - spec/dummy/app/models/pseudonym.rb
824
849
  - spec/dummy/app/models/role.rb
850
+ - spec/dummy/app/models/rubric.rb
851
+ - spec/dummy/app/models/rubric_assessment.rb
852
+ - spec/dummy/app/models/rubric_association.rb
825
853
  - spec/dummy/app/models/section.rb
826
854
  - spec/dummy/app/models/submission.rb
827
855
  - spec/dummy/app/models/term.rb
@@ -891,6 +919,9 @@ test_files:
891
919
  - spec/dummy/db/migrate/20220712210559_create_learning_outcomes.rb
892
920
  - spec/dummy/db/migrate/20220926221926_create_users.rb
893
921
  - spec/dummy/db/migrate/20240408223326_create_course_nicknames.rb
922
+ - spec/dummy/db/migrate/20240509105100_create_rubrics.rb
923
+ - spec/dummy/db/migrate/20240510094100_create_rubric_associations.rb
924
+ - spec/dummy/db/migrate/20240510101100_create_rubric_assessments.rb
894
925
  - spec/dummy/db/schema.rb
895
926
  - spec/factories/account_factory.rb
896
927
  - spec/factories/admin_factory.rb
@@ -944,8 +975,9 @@ test_files:
944
975
  - spec/support/fixtures/reports/groups.csv
945
976
  - spec/support/fixtures/reports/learning_outcomes.csv
946
977
  - spec/support/fixtures/reports/provisioning_csv
947
- - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
948
- - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
978
+ - spec/support/fixtures/reports/rubric_assessments.csv
979
+ - spec/support/fixtures/reports/rubric_associations.csv
980
+ - spec/support/fixtures/reports/rubrics.csv
949
981
  - spec/support/fixtures/reports/sections.csv
950
982
  - spec/support/fixtures/reports/submissions.csv
951
983
  - spec/support/fixtures/reports/user_observers.csv
@@ -1,3 +0,0 @@
1
- canvas_course_id,course_id,integration_id,short_name,long_name,canvas_account_id,account_id,canvas_term_id,term_id,status,start_date,end_date,course_format,created_by_sis
2
- 1,course_sis_id_1,,C1,Course #1,1,,1,term_sis_id_1,active,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE
3
- 2,course_sis_id_2,,C2,Course #2,1,,1,term_sis_id_2,unpublished,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE
@@ -1,4 +0,0 @@
1
- canvas_user_id,user_id,integration_id,authentication_provider_id,login_id,first_name,last_name,full_name,sortable_name,short_name,email,status,created_by_sis
2
- 1,sis_id_1,,123,spiderdude1337,Patches,the Spider,Patches the Spider,"the Spider, Patches",,poorbastard@yharnam.com,active,FALSE
3
- 2,sis_id_2,,1234,retireddude109,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
4
- 2,sis_id_2,,1234,retireddude110,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE