canvas_sync 0.17.17.beta1 → 0.17.23.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -1
  3. data/lib/canvas_sync/concerns/sync_mapping.rb +112 -0
  4. data/lib/canvas_sync/generators/install_generator.rb +1 -0
  5. data/lib/canvas_sync/generators/templates/migrations/create_grading_period_groups.rb +22 -0
  6. data/lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb +22 -0
  7. data/lib/canvas_sync/generators/templates/migrations/create_user_observers.rb +17 -0
  8. data/lib/canvas_sync/generators/templates/models/grading_period.rb +8 -0
  9. data/lib/canvas_sync/generators/templates/models/grading_period_group.rb +9 -0
  10. data/lib/canvas_sync/generators/templates/models/user_observer.rb +11 -0
  11. data/lib/canvas_sync/importers/bulk_importer.rb +27 -16
  12. data/lib/canvas_sync/job_batches/batch.rb +9 -0
  13. data/lib/canvas_sync/job_batches/chain_builder.rb +9 -1
  14. data/lib/canvas_sync/job_batches/hier_batch_ids.lua +25 -0
  15. data/lib/canvas_sync/job_batches/sidekiq/web/batches_assets/css/styles.less +178 -0
  16. data/lib/canvas_sync/job_batches/sidekiq/web/batches_assets/js/batch_tree.js +106 -0
  17. data/lib/canvas_sync/job_batches/sidekiq/web/batches_assets/js/util.js +2 -0
  18. data/lib/canvas_sync/job_batches/sidekiq/web/views/_batch_tree.erb +6 -0
  19. data/lib/canvas_sync/job_batches/sidekiq/web/views/_common.erb +13 -0
  20. data/lib/canvas_sync/job_batches/sidekiq/web/views/batch.erb +15 -88
  21. data/lib/canvas_sync/job_batches/sidekiq/web.rb +93 -0
  22. data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +1 -1
  23. data/lib/canvas_sync/jobs/report_checker.rb +37 -4
  24. data/lib/canvas_sync/jobs/report_starter.rb +2 -2
  25. data/lib/canvas_sync/processors/assignment_groups_processor.rb +1 -7
  26. data/lib/canvas_sync/processors/assignments_processor.rb +1 -7
  27. data/lib/canvas_sync/processors/context_module_items_processor.rb +1 -7
  28. data/lib/canvas_sync/processors/context_modules_processor.rb +1 -7
  29. data/lib/canvas_sync/processors/model_mappings.yml +68 -0
  30. data/lib/canvas_sync/processors/normal_processor.rb +3 -3
  31. data/lib/canvas_sync/processors/provisioning_report_processor.rb +21 -63
  32. data/lib/canvas_sync/processors/report_processor.rb +14 -9
  33. data/lib/canvas_sync/processors/submissions_processor.rb +1 -7
  34. data/lib/canvas_sync/record.rb +4 -0
  35. data/lib/canvas_sync/version.rb +1 -1
  36. data/lib/canvas_sync.rb +4 -1
  37. data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +40 -0
  38. data/spec/dummy/app/models/grading_period.rb +14 -0
  39. data/spec/dummy/app/models/grading_period_group.rb +15 -0
  40. data/spec/dummy/app/models/user_observer.rb +17 -0
  41. data/spec/dummy/db/migrate/20210907233329_create_user_observers.rb +23 -0
  42. data/spec/dummy/db/migrate/20210907233330_create_grading_periods.rb +28 -0
  43. data/spec/dummy/db/migrate/20210907233331_create_grading_period_groups.rb +28 -0
  44. data/spec/dummy/db/schema.rb +42 -1
  45. data/spec/dummy/log/development.log +1167 -0
  46. data/spec/dummy/log/test.log +2775 -0
  47. data/spec/support/fixtures/reports/grading_period_groups.csv +2 -0
  48. data/spec/support/fixtures/reports/grading_periods.csv +3 -0
  49. data/spec/support/fixtures/reports/user_observers.csv +3 -0
  50. metadata +38 -17
@@ -0,0 +1,2 @@
1
+ grading_period_group_id,canvas_course_id,canvas_account_id,title,weighted,display_totals_for_all_grading_periods,status
2
+ 1,,1,Test Group,false,false,active
@@ -0,0 +1,3 @@
1
+ grading_period_id,title,weight,start_date,end_date,close_date,grading_period_group_id,status
2
+ 1,Period 1,0.2,2019-07-01 06:00:00 UTC,2019-08-01 05:59:59 UTC,2019-08-01 05:59:59 UTC,1,active
3
+ 2,Period 2,0.8,2019-08-01 06:00:00 UTC,2019-09-01 05:59:59 UTC,2019-09-01 05:59:59 UTC,1,deleted
@@ -0,0 +1,3 @@
1
+ canvas_observer_id,observer_id,canvas_student_id,student_id,status,created_by_sis
2
+ 21,,3,"bravo:test:sis Hello World",active,false
3
+ 21,,2,2,active,false
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.17.beta1
4
+ version: 0.17.23.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.17'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.17'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rails
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -386,6 +372,7 @@ files:
386
372
  - lib/canvas_sync/concerns/account/ancestry.rb
387
373
  - lib/canvas_sync/concerns/api_syncable.rb
388
374
  - lib/canvas_sync/concerns/legacy_columns.rb
375
+ - lib/canvas_sync/concerns/sync_mapping.rb
389
376
  - lib/canvas_sync/config.rb
390
377
  - lib/canvas_sync/engine.rb
391
378
  - lib/canvas_sync/generators/install_generator.rb
@@ -398,6 +385,8 @@ files:
398
385
  - lib/canvas_sync/generators/templates/migrations/create_context_modules.rb
399
386
  - lib/canvas_sync/generators/templates/migrations/create_courses.rb
400
387
  - lib/canvas_sync/generators/templates/migrations/create_enrollments.rb
388
+ - lib/canvas_sync/generators/templates/migrations/create_grading_period_groups.rb
389
+ - lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb
401
390
  - lib/canvas_sync/generators/templates/migrations/create_group_memberships.rb
402
391
  - lib/canvas_sync/generators/templates/migrations/create_groups.rb
403
392
  - lib/canvas_sync/generators/templates/migrations/create_pseudonyms.rb
@@ -405,6 +394,7 @@ files:
405
394
  - lib/canvas_sync/generators/templates/migrations/create_sections.rb
406
395
  - lib/canvas_sync/generators/templates/migrations/create_submissions.rb
407
396
  - lib/canvas_sync/generators/templates/migrations/create_terms.rb
397
+ - lib/canvas_sync/generators/templates/migrations/create_user_observers.rb
408
398
  - lib/canvas_sync/generators/templates/migrations/create_users.rb
409
399
  - lib/canvas_sync/generators/templates/models/account.rb
410
400
  - lib/canvas_sync/generators/templates/models/admin.rb
@@ -414,6 +404,8 @@ files:
414
404
  - lib/canvas_sync/generators/templates/models/context_module_item.rb
415
405
  - lib/canvas_sync/generators/templates/models/course.rb
416
406
  - lib/canvas_sync/generators/templates/models/enrollment.rb
407
+ - lib/canvas_sync/generators/templates/models/grading_period.rb
408
+ - lib/canvas_sync/generators/templates/models/grading_period_group.rb
417
409
  - lib/canvas_sync/generators/templates/models/group.rb
418
410
  - lib/canvas_sync/generators/templates/models/group_membership.rb
419
411
  - lib/canvas_sync/generators/templates/models/pseudonym.rb
@@ -422,6 +414,7 @@ files:
422
414
  - lib/canvas_sync/generators/templates/models/submission.rb
423
415
  - lib/canvas_sync/generators/templates/models/term.rb
424
416
  - lib/canvas_sync/generators/templates/models/user.rb
417
+ - lib/canvas_sync/generators/templates/models/user_observer.rb
425
418
  - lib/canvas_sync/generators/templates/services/live_events/assignment_event.rb
426
419
  - lib/canvas_sync/generators/templates/services/live_events/assignment_group_event.rb
427
420
  - lib/canvas_sync/generators/templates/services/live_events/base_event.rb
@@ -442,6 +435,7 @@ files:
442
435
  - lib/canvas_sync/job_batches/callback.rb
443
436
  - lib/canvas_sync/job_batches/chain_builder.rb
444
437
  - lib/canvas_sync/job_batches/context_hash.rb
438
+ - lib/canvas_sync/job_batches/hier_batch_ids.lua
445
439
  - lib/canvas_sync/job_batches/hincr_max.lua
446
440
  - lib/canvas_sync/job_batches/jobs/base_job.rb
447
441
  - lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb
@@ -453,8 +447,13 @@ files:
453
447
  - lib/canvas_sync/job_batches/schedule_callback.lua
454
448
  - lib/canvas_sync/job_batches/sidekiq.rb
455
449
  - lib/canvas_sync/job_batches/sidekiq/web.rb
450
+ - lib/canvas_sync/job_batches/sidekiq/web/batches_assets/css/styles.less
451
+ - lib/canvas_sync/job_batches/sidekiq/web/batches_assets/js/batch_tree.js
452
+ - lib/canvas_sync/job_batches/sidekiq/web/batches_assets/js/util.js
456
453
  - lib/canvas_sync/job_batches/sidekiq/web/helpers.rb
454
+ - lib/canvas_sync/job_batches/sidekiq/web/views/_batch_tree.erb
457
455
  - lib/canvas_sync/job_batches/sidekiq/web/views/_batches_table.erb
456
+ - lib/canvas_sync/job_batches/sidekiq/web/views/_common.erb
458
457
  - lib/canvas_sync/job_batches/sidekiq/web/views/_jobs_table.erb
459
458
  - lib/canvas_sync/job_batches/sidekiq/web/views/_pagination.erb
460
459
  - lib/canvas_sync/job_batches/sidekiq/web/views/batch.erb
@@ -540,6 +539,8 @@ files:
540
539
  - spec/dummy/app/models/context_module_item.rb
541
540
  - spec/dummy/app/models/course.rb
542
541
  - spec/dummy/app/models/enrollment.rb
542
+ - spec/dummy/app/models/grading_period.rb
543
+ - spec/dummy/app/models/grading_period_group.rb
543
544
  - spec/dummy/app/models/group.rb
544
545
  - spec/dummy/app/models/group_membership.rb
545
546
  - spec/dummy/app/models/pseudonym.rb
@@ -548,6 +549,7 @@ files:
548
549
  - spec/dummy/app/models/submission.rb
549
550
  - spec/dummy/app/models/term.rb
550
551
  - spec/dummy/app/models/user.rb
552
+ - spec/dummy/app/models/user_observer.rb
551
553
  - spec/dummy/app/services/live_events/assignment_created_event.rb
552
554
  - spec/dummy/app/services/live_events/assignment_event.rb
553
555
  - spec/dummy/app/services/live_events/assignment_updated_event.rb
@@ -606,7 +608,12 @@ files:
606
608
  - spec/dummy/db/migrate/20200415171620_create_groups.rb
607
609
  - spec/dummy/db/migrate/20200416214248_create_group_memberships.rb
608
610
  - spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb
611
+ - spec/dummy/db/migrate/20210907233329_create_user_observers.rb
612
+ - spec/dummy/db/migrate/20210907233330_create_grading_periods.rb
613
+ - spec/dummy/db/migrate/20210907233331_create_grading_period_groups.rb
609
614
  - spec/dummy/db/schema.rb
615
+ - spec/dummy/log/development.log
616
+ - spec/dummy/log/test.log
610
617
  - spec/factories/account_factory.rb
611
618
  - spec/factories/admin_factory.rb
612
619
  - spec/factories/assignment_factory.rb
@@ -650,6 +657,8 @@ files:
650
657
  - spec/support/fixtures/reports/context_modules.csv
651
658
  - spec/support/fixtures/reports/courses.csv
652
659
  - spec/support/fixtures/reports/enrollments.csv
660
+ - spec/support/fixtures/reports/grading_period_groups.csv
661
+ - spec/support/fixtures/reports/grading_periods.csv
653
662
  - spec/support/fixtures/reports/group_memberships.csv
654
663
  - spec/support/fixtures/reports/groups.csv
655
664
  - spec/support/fixtures/reports/provisioning_csv
@@ -657,6 +666,7 @@ files:
657
666
  - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
658
667
  - spec/support/fixtures/reports/sections.csv
659
668
  - spec/support/fixtures/reports/submissions.csv
669
+ - spec/support/fixtures/reports/user_observers.csv
660
670
  - spec/support/fixtures/reports/users.csv
661
671
  - spec/support/fixtures/reports/xlist.csv
662
672
  homepage: https://instructure.com
@@ -677,7 +687,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
677
687
  - !ruby/object:Gem::Version
678
688
  version: 1.3.1
679
689
  requirements: []
680
- rubygems_version: 3.0.3.1
690
+ rubygems_version: 3.0.3
681
691
  signing_key:
682
692
  specification_version: 4
683
693
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
@@ -732,6 +742,8 @@ test_files:
732
742
  - spec/dummy/app/models/context_module_item.rb
733
743
  - spec/dummy/app/models/course.rb
734
744
  - spec/dummy/app/models/enrollment.rb
745
+ - spec/dummy/app/models/grading_period.rb
746
+ - spec/dummy/app/models/grading_period_group.rb
735
747
  - spec/dummy/app/models/group.rb
736
748
  - spec/dummy/app/models/group_membership.rb
737
749
  - spec/dummy/app/models/pseudonym.rb
@@ -740,6 +752,7 @@ test_files:
740
752
  - spec/dummy/app/models/submission.rb
741
753
  - spec/dummy/app/models/term.rb
742
754
  - spec/dummy/app/models/user.rb
755
+ - spec/dummy/app/models/user_observer.rb
743
756
  - spec/dummy/app/services/live_events/assignment_created_event.rb
744
757
  - spec/dummy/app/services/live_events/assignment_event.rb
745
758
  - spec/dummy/app/services/live_events/assignment_updated_event.rb
@@ -798,7 +811,12 @@ test_files:
798
811
  - spec/dummy/db/migrate/20200415171620_create_groups.rb
799
812
  - spec/dummy/db/migrate/20200416214248_create_group_memberships.rb
800
813
  - spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb
814
+ - spec/dummy/db/migrate/20210907233329_create_user_observers.rb
815
+ - spec/dummy/db/migrate/20210907233330_create_grading_periods.rb
816
+ - spec/dummy/db/migrate/20210907233331_create_grading_period_groups.rb
801
817
  - spec/dummy/db/schema.rb
818
+ - spec/dummy/log/development.log
819
+ - spec/dummy/log/test.log
802
820
  - spec/factories/account_factory.rb
803
821
  - spec/factories/admin_factory.rb
804
822
  - spec/factories/assignment_factory.rb
@@ -842,6 +860,8 @@ test_files:
842
860
  - spec/support/fixtures/reports/context_modules.csv
843
861
  - spec/support/fixtures/reports/courses.csv
844
862
  - spec/support/fixtures/reports/enrollments.csv
863
+ - spec/support/fixtures/reports/grading_period_groups.csv
864
+ - spec/support/fixtures/reports/grading_periods.csv
845
865
  - spec/support/fixtures/reports/group_memberships.csv
846
866
  - spec/support/fixtures/reports/groups.csv
847
867
  - spec/support/fixtures/reports/provisioning_csv
@@ -849,5 +869,6 @@ test_files:
849
869
  - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
850
870
  - spec/support/fixtures/reports/sections.csv
851
871
  - spec/support/fixtures/reports/submissions.csv
872
+ - spec/support/fixtures/reports/user_observers.csv
852
873
  - spec/support/fixtures/reports/users.csv
853
874
  - spec/support/fixtures/reports/xlist.csv