canvas_sync 0.22.3 → 0.22.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/Rakefile +0 -0
- data/app/controllers/canvas_sync/api/v1/health_check_controller.rb +0 -0
- data/app/controllers/canvas_sync/api/v1/live_events_controller.rb +0 -0
- data/app/models/canvas_sync/job_log.rb +5 -1
- data/app/models/canvas_sync/sync_batch.rb +0 -1
- data/config/initializers/apartment.rb +0 -0
- data/config/routes.rb +0 -0
- data/db/migrate/20170915210836_create_canvas_sync_job_log.rb +0 -0
- data/db/migrate/20180725155729_add_job_id_to_canvas_sync_job_logs.rb +0 -0
- data/db/migrate/20190916154829_add_fork_count_to_canvas_sync_job_logs.rb +0 -0
- data/db/migrate/20201018210836_create_canvas_sync_sync_batches.rb +0 -0
- data/db/migrate/20201030210836_add_full_sync_to_canvas_sync_sync_batch.rb +0 -0
- data/lib/canvas_sync/api_syncable.rb +0 -0
- data/lib/canvas_sync/batch_processor.rb +0 -0
- data/lib/canvas_sync/class_callback_executor.rb +0 -0
- data/lib/canvas_sync/concerns/ability_helper.rb +0 -0
- data/lib/canvas_sync/concerns/account/ancestry.rb +0 -0
- data/lib/canvas_sync/concerns/account/base.rb +0 -0
- data/lib/canvas_sync/concerns/api_syncable.rb +0 -0
- data/lib/canvas_sync/concerns/auto_relations.rb +0 -0
- data/lib/canvas_sync/concerns/legacy_columns.rb +0 -0
- data/lib/canvas_sync/concerns/live_event_sync.rb +0 -0
- data/lib/canvas_sync/concerns/role/base.rb +0 -0
- data/lib/canvas_sync/concerns/sync_mapping.rb +0 -0
- data/lib/canvas_sync/config.rb +0 -0
- data/lib/canvas_sync/engine.rb +0 -0
- data/lib/canvas_sync/generators/install_generator.rb +0 -0
- data/lib/canvas_sync/generators/install_live_events_generator.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_accounts.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_admins.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_assignment_groups.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_assignments.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_context_module_items.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_context_modules.rb +2 -0
- data/lib/canvas_sync/generators/templates/migrations/create_course_nicknames.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb +20 -0
- data/lib/canvas_sync/generators/templates/migrations/create_courses.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_enrollments.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_grading_period_groups.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_group_memberships.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_groups.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_learning_outcomes.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_pseudonyms.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_roles.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_rubric_assessments.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_rubric_associations.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_rubrics.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_sections.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_submissions.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_terms.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_user_observers.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_users.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/account.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/admin.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/assignment.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/assignment_group.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/content_migration.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/context_module.rb +36 -2
- data/lib/canvas_sync/generators/templates/models/context_module_item.rb +11 -3
- data/lib/canvas_sync/generators/templates/models/course.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/course_nickname.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/course_progress.rb +14 -0
- data/lib/canvas_sync/generators/templates/models/enrollment.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/grading_period.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/grading_period_group.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/group.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/group_membership.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/learning_outcome.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/learning_outcome_result.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/pseudonym.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/role.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/rubric.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/rubric_assessment.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/rubric_association.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/section.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/submission.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/term.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/user.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/user_observer.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/assignment_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/assignment_group_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/course_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/course_section_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/enrollment_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/grade_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_item_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/submission_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/syllabus_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/user_event.rb +0 -0
- data/lib/canvas_sync/importers/bulk_importer.rb +3 -0
- data/lib/canvas_sync/importers/legacy_importer.rb +0 -0
- data/lib/canvas_sync/job.rb +0 -0
- data/lib/canvas_sync/job_batches/batch.rb +0 -0
- data/lib/canvas_sync/job_batches/callback.rb +0 -0
- data/lib/canvas_sync/job_batches/chain_builder.rb +24 -3
- data/lib/canvas_sync/job_batches/compat/active_job.rb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/batches_assets/css/styles.less +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/batches_assets/js/batch_tree.js +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/batches_assets/js/util.js +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/helpers.rb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_batch_tree.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_batches_table.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_common.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_jobs_table.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_pagination.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/batch.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/batches.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/pool.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/pools.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web.rb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq.rb +0 -0
- data/lib/canvas_sync/job_batches/compat.rb +0 -0
- data/lib/canvas_sync/job_batches/context_hash.rb +0 -0
- data/lib/canvas_sync/job_batches/hier_batch_ids.lua +0 -0
- data/lib/canvas_sync/job_batches/jobs/base_job.rb +0 -0
- data/lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb +0 -0
- data/lib/canvas_sync/job_batches/jobs/managed_batch_job.rb +4 -0
- data/lib/canvas_sync/job_batches/jobs/serial_batch_job.rb +0 -0
- data/lib/canvas_sync/job_batches/pool.rb +0 -0
- data/lib/canvas_sync/job_batches/pool_refill.lua +0 -0
- data/lib/canvas_sync/job_batches/redis_model.rb +0 -0
- data/lib/canvas_sync/job_batches/redis_script.rb +0 -0
- data/lib/canvas_sync/job_batches/schedule_callback.lua +0 -0
- data/lib/canvas_sync/job_batches/status.rb +1 -0
- data/lib/canvas_sync/job_uniqueness/compat/active_job.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/compat/sidekiq.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/compat.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/configuration.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/job_uniqueness.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/lock_context.rb +15 -3
- data/lib/canvas_sync/job_uniqueness/locksmith.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/base.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/log.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/null_strategy.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/raise.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/reject.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/reschedule.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/base.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_and_while_executing.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_executed.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_executing.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_expired.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/while_executing.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/unique_job_common.rb +0 -0
- data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +0 -0
- data/lib/canvas_sync/jobs/canvas_process_waiter.rb +0 -0
- data/lib/canvas_sync/jobs/report_checker.rb +0 -0
- data/lib/canvas_sync/jobs/report_processor_job.rb +0 -0
- data/lib/canvas_sync/jobs/report_starter.rb +0 -0
- data/lib/canvas_sync/jobs/sync_accounts_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_admins_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_assignment_groups_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_assignments_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_content_migrations_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_context_module_items_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_context_modules_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_course_progresses_job.rb +21 -0
- data/lib/canvas_sync/jobs/sync_provisioning_report_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_roles_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_rubric_assessments_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_rubric_associations_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_rubrics_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_simple_table_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_submissions_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_terms_job.rb +0 -0
- data/lib/canvas_sync/jobs/term_batches_job.rb +4 -1
- data/lib/canvas_sync/live_events/base_handler.rb +0 -0
- data/lib/canvas_sync/live_events/process_event_job.rb +0 -0
- data/lib/canvas_sync/live_events.rb +0 -0
- data/lib/canvas_sync/misc_helper.rb +0 -0
- data/lib/canvas_sync/processors/assignment_groups_processor.rb +0 -0
- data/lib/canvas_sync/processors/assignments_processor.rb +0 -0
- data/lib/canvas_sync/processors/content_migrations_processor.rb +0 -0
- data/lib/canvas_sync/processors/context_module_items_processor.rb +0 -0
- data/lib/canvas_sync/processors/context_modules_processor.rb +0 -0
- data/lib/canvas_sync/processors/course_completion_report_processor.rb +20 -0
- data/lib/canvas_sync/processors/model_mappings.yml +27 -0
- data/lib/canvas_sync/processors/normal_processor.rb +0 -0
- data/lib/canvas_sync/processors/provisioning_report_processor.rb +0 -0
- data/lib/canvas_sync/processors/report_processor.rb +0 -0
- data/lib/canvas_sync/processors/rubric_assessments_processor.rb +0 -0
- data/lib/canvas_sync/processors/rubric_associations_processor.rb +0 -0
- data/lib/canvas_sync/processors/rubrics_processor.rb +0 -0
- data/lib/canvas_sync/processors/submissions_processor.rb +0 -0
- data/lib/canvas_sync/record.rb +0 -0
- data/lib/canvas_sync/sidekiq_job.rb +0 -0
- data/lib/canvas_sync/version.rb +1 -1
- data/lib/canvas_sync.rb +4 -0
- data/spec/canvas_sync/canvas_sync_spec.rb +59 -41
- data/spec/canvas_sync/jobs/canvas_process_waiter_spec.rb +0 -0
- data/spec/canvas_sync/jobs/job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/report_checker_spec.rb +0 -0
- data/spec/canvas_sync/jobs/report_processor_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/report_starter_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_admins_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_assignments_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_content_migrations_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_context_module_items_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_context_modules_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_roles_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_simple_table_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_submissions_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_terms_job_spec.rb +0 -0
- data/spec/canvas_sync/live_events/live_event_sync_spec.rb +0 -0
- data/spec/canvas_sync/live_events/live_events_controller_spec.rb +0 -0
- data/spec/canvas_sync/live_events/process_event_job_spec.rb +0 -0
- data/spec/canvas_sync/misc_helper_spec.rb +0 -0
- data/spec/canvas_sync/models/accounts_spec.rb +0 -0
- data/spec/canvas_sync/models/admins_spec.rb +0 -0
- data/spec/canvas_sync/models/assignment_group_spec.rb +0 -0
- data/spec/canvas_sync/models/assignment_spec.rb +0 -0
- data/spec/canvas_sync/models/context_module_item_spec.rb +0 -0
- data/spec/canvas_sync/models/context_module_spec.rb +0 -0
- data/spec/canvas_sync/models/course_spec.rb +0 -0
- data/spec/canvas_sync/models/enrollment_spec.rb +0 -0
- data/spec/canvas_sync/models/group_membership_spec.rb +0 -0
- data/spec/canvas_sync/models/group_spec.rb +0 -0
- data/spec/canvas_sync/models/roles_spec.rb +0 -0
- data/spec/canvas_sync/models/section_spec.rb +0 -0
- data/spec/canvas_sync/models/submission_spec.rb +0 -0
- data/spec/canvas_sync/models/term_spec.rb +0 -0
- data/spec/canvas_sync/models/user_spec.rb +0 -0
- data/spec/canvas_sync/processors/assignment_groups_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/assignments_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/content_migrations_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/context_module_items_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/context_modules_processor_spec.rb +14 -0
- data/spec/canvas_sync/processors/course_completion_report_processor_spec.rb +47 -0
- data/spec/canvas_sync/processors/normal_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/rubric_assessments_spec.rb +0 -0
- data/spec/canvas_sync/processors/rubric_associations_spec.rb +0 -0
- data/spec/canvas_sync/processors/rubrics_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/submissions_processor_spec.rb +0 -0
- data/spec/canvas_sync/services/module_event_spec.rb +0 -0
- data/spec/canvas_sync/services/module_item_event_spec.rb +0 -0
- data/spec/dummy/README.rdoc +0 -0
- data/spec/dummy/Rakefile +0 -0
- data/spec/dummy/app/models/account.rb +0 -0
- data/spec/dummy/app/models/admin.rb +0 -0
- data/spec/dummy/app/models/application_record.rb +0 -0
- data/spec/dummy/app/models/assignment.rb +0 -0
- data/spec/dummy/app/models/assignment_group.rb +0 -0
- data/spec/dummy/app/models/content_migration.rb +0 -0
- data/spec/dummy/app/models/context_module.rb +36 -2
- data/spec/dummy/app/models/context_module_item.rb +11 -3
- data/spec/dummy/app/models/course.rb +0 -0
- data/spec/dummy/app/models/course_nickname.rb +0 -0
- data/spec/dummy/app/models/course_progress.rb +20 -0
- data/spec/dummy/app/models/enrollment.rb +0 -0
- data/spec/dummy/app/models/grading_period.rb +0 -0
- data/spec/dummy/app/models/grading_period_group.rb +0 -0
- data/spec/dummy/app/models/group.rb +0 -0
- data/spec/dummy/app/models/group_membership.rb +0 -0
- data/spec/dummy/app/models/learning_outcome.rb +0 -0
- data/spec/dummy/app/models/learning_outcome_result.rb +0 -0
- data/spec/dummy/app/models/pseudonym.rb +0 -0
- data/spec/dummy/app/models/role.rb +0 -0
- data/spec/dummy/app/models/rubric.rb +0 -0
- data/spec/dummy/app/models/rubric_assessment.rb +0 -0
- data/spec/dummy/app/models/rubric_association.rb +0 -0
- data/spec/dummy/app/models/section.rb +0 -0
- data/spec/dummy/app/models/submission.rb +0 -0
- data/spec/dummy/app/models/term.rb +0 -0
- data/spec/dummy/app/models/user.rb +0 -0
- data/spec/dummy/app/models/user_observer.rb +0 -0
- data/spec/dummy/app/services/live_events/assignment_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/assignment_event.rb +0 -0
- data/spec/dummy/app/services/live_events/assignment_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/base_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_section_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_section_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_section_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/enrollment_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/enrollment_event.rb +0 -0
- data/spec/dummy/app/services/live_events/enrollment_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/grade_changed_event.rb +0 -0
- data/spec/dummy/app/services/live_events/grade_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_item_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_item_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_item_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/submission_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/submission_event.rb +0 -0
- data/spec/dummy/app/services/live_events/submission_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/syllabus_event.rb +0 -0
- data/spec/dummy/app/services/live_events/syllabus_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/user_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/user_event.rb +0 -0
- data/spec/dummy/app/services/live_events/user_updated_event.rb +0 -0
- data/spec/dummy/config/application.rb +0 -0
- data/spec/dummy/config/boot.rb +0 -0
- data/spec/dummy/config/database.yml +0 -0
- data/spec/dummy/config/environment.rb +0 -0
- data/spec/dummy/config/environments/development.rb +0 -0
- data/spec/dummy/config/environments/test.rb +0 -0
- data/spec/dummy/config/initializers/assets.rb +0 -0
- data/spec/dummy/config/initializers/session_store.rb +0 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/spec/dummy/config/routes.rb +0 -0
- data/spec/dummy/config/secrets.yml +0 -0
- data/spec/dummy/config.ru +0 -0
- data/spec/dummy/db/migrate/20190702203621_create_courses.rb +0 -0
- data/spec/dummy/db/migrate/20190702203622_create_accounts.rb +0 -0
- data/spec/dummy/db/migrate/20190702203623_create_terms.rb +0 -0
- data/spec/dummy/db/migrate/20190702203624_create_enrollments.rb +0 -0
- data/spec/dummy/db/migrate/20190702203625_create_sections.rb +0 -0
- data/spec/dummy/db/migrate/20190702203626_create_assignments.rb +0 -0
- data/spec/dummy/db/migrate/20190702203627_create_submissions.rb +0 -0
- data/spec/dummy/db/migrate/20190702203630_create_assignment_groups.rb +0 -0
- data/spec/dummy/db/migrate/20190702203631_create_context_modules.rb +2 -0
- data/spec/dummy/db/migrate/20190702203632_create_context_module_items.rb +0 -0
- data/spec/dummy/db/migrate/20190927204545_create_roles.rb +0 -0
- data/spec/dummy/db/migrate/20190927204546_create_admins.rb +0 -0
- data/spec/dummy/db/migrate/20200415171620_create_groups.rb +0 -0
- data/spec/dummy/db/migrate/20200416214248_create_group_memberships.rb +0 -0
- data/spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb +0 -0
- data/spec/dummy/db/migrate/20210907233329_create_user_observers.rb +0 -0
- data/spec/dummy/db/migrate/20210907233330_create_grading_periods.rb +0 -0
- data/spec/dummy/db/migrate/20211001184920_create_grading_period_groups.rb +0 -0
- data/spec/dummy/db/migrate/20220308072643_create_content_migrations.rb +0 -0
- data/spec/dummy/db/migrate/20220712210559_create_learning_outcomes.rb +0 -0
- data/spec/dummy/db/migrate/20220926221926_create_users.rb +0 -0
- data/spec/dummy/db/migrate/20240408223326_create_course_nicknames.rb +0 -0
- data/spec/dummy/db/migrate/20240509105100_create_rubrics.rb +0 -0
- data/spec/dummy/db/migrate/20240510094100_create_rubric_associations.rb +0 -0
- data/spec/dummy/db/migrate/20240510101100_create_rubric_assessments.rb +0 -0
- data/spec/dummy/db/migrate/20240523101010_create_learning_outcome_results.rb +0 -0
- data/spec/dummy/db/migrate/20240828161300_create_course_progresses.rb +26 -0
- data/spec/dummy/db/schema.rb +15 -0
- data/spec/factories/account_factory.rb +0 -0
- data/spec/factories/admin_factory.rb +0 -0
- data/spec/factories/assignment_factory.rb +0 -0
- data/spec/factories/assignment_group_factory.rb +0 -0
- data/spec/factories/context_module_factory.rb +0 -0
- data/spec/factories/context_module_item_factory.rb +0 -0
- data/spec/factories/course_factory.rb +0 -0
- data/spec/factories/enrollment_factory.rb +0 -0
- data/spec/factories/group_factory.rb +0 -0
- data/spec/factories/group_membership_factory.rb +0 -0
- data/spec/factories/role_factory.rb +0 -0
- data/spec/factories/section_factory.rb +0 -0
- data/spec/factories/submission_factory.rb +0 -0
- data/spec/factories/term_factory.rb +0 -0
- data/spec/factories/user_factory.rb +0 -0
- data/spec/job_batching/batch_spec.rb +0 -0
- data/spec/job_batching/callback_spec.rb +0 -0
- data/spec/job_batching/compat/active_job_spec.rb +0 -0
- data/spec/job_batching/compat/sidekiq_spec.rb +0 -0
- data/spec/job_batching/context_hash_spec.rb +0 -0
- data/spec/job_batching/flow_spec.rb +0 -0
- data/spec/job_batching/integration/fail_then_succeed.rb +0 -0
- data/spec/job_batching/integration/integration.rb +0 -0
- data/spec/job_batching/integration/nested.rb +0 -0
- data/spec/job_batching/integration/simple.rb +0 -0
- data/spec/job_batching/integration/workflow.rb +0 -0
- data/spec/job_batching/integration_helper.rb +0 -0
- data/spec/job_batching/pool_spec.rb +0 -0
- data/spec/job_batching/status_spec.rb +0 -0
- data/spec/job_batching/support/base_job.rb +0 -0
- data/spec/job_batching/support/sample_callback.rb +0 -0
- data/spec/job_uniqueness/compat/active_job_spec.rb +0 -0
- data/spec/job_uniqueness/compat/sidekiq_spec.rb +0 -0
- data/spec/job_uniqueness/lock_context_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict/log_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict/raise_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict/reschedule_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict_spec.rb +0 -0
- data/spec/job_uniqueness/spec_helper.rb +0 -0
- data/spec/job_uniqueness/strategy/base_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_and_while_executing_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_executed_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_executing_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_expired_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/while_executing_spec.rb +0 -0
- data/spec/job_uniqueness/support/lock_strategy.rb +0 -0
- data/spec/job_uniqueness/support/on_conflict.rb +0 -0
- data/spec/job_uniqueness/support/test_worker.rb +0 -0
- data/spec/job_uniqueness/unique_job_common_spec.rb +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/support/fake_canvas.rb +0 -0
- data/spec/support/fixtures/canvas_responses/admins.json +0 -0
- data/spec/support/fixtures/canvas_responses/module.json +0 -0
- data/spec/support/fixtures/canvas_responses/module_item.json +0 -0
- data/spec/support/fixtures/canvas_responses/roles.json +0 -0
- data/spec/support/fixtures/canvas_responses/terms.json +0 -0
- data/spec/support/fixtures/reports/assignment_groups.csv +0 -0
- data/spec/support/fixtures/reports/assignments.csv +0 -0
- data/spec/support/fixtures/reports/content_migrations.csv +0 -0
- data/spec/support/fixtures/reports/context_module_items.csv +0 -0
- data/spec/support/fixtures/reports/context_modules.csv +3 -3
- data/spec/support/fixtures/reports/course_nicknames.csv +0 -0
- data/spec/support/fixtures/reports/course_progresses.csv +3 -0
- data/spec/support/fixtures/reports/course_progresses_conflict.csv +2 -0
- data/spec/support/fixtures/reports/courses.csv +0 -0
- data/spec/support/fixtures/reports/enrollments.csv +0 -0
- data/spec/support/fixtures/reports/grading_period_groups.csv +0 -0
- data/spec/support/fixtures/reports/grading_periods.csv +0 -0
- data/spec/support/fixtures/reports/group_memberships.csv +0 -0
- data/spec/support/fixtures/reports/groups.csv +0 -0
- data/spec/support/fixtures/reports/learning_outcome_results.csv +0 -0
- data/spec/support/fixtures/reports/learning_outcomes.csv +0 -0
- data/spec/support/fixtures/reports/provisioning_csv +0 -0
- data/spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv +0 -0
- data/spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv +0 -0
- data/spec/support/fixtures/reports/rubric_assessments.csv +0 -0
- data/spec/support/fixtures/reports/rubric_associations.csv +0 -0
- data/spec/support/fixtures/reports/rubrics.csv +0 -0
- data/spec/support/fixtures/reports/sections.csv +0 -0
- data/spec/support/fixtures/reports/submissions.csv +0 -0
- data/spec/support/fixtures/reports/user_observers.csv +0 -0
- data/spec/support/fixtures/reports/users.csv +0 -0
- data/spec/support/fixtures/reports/xlist.csv +0 -0
- metadata +202 -188
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module CanvasSync
|
2
|
+
module Jobs
|
3
|
+
class SyncCourseProgressesJob < ReportStarter
|
4
|
+
# Syncs CourseProgresses
|
5
|
+
#
|
6
|
+
# Starts a report processor for the course completion report
|
7
|
+
# (the proserv_course_completion_csv report must be enabled)
|
8
|
+
#
|
9
|
+
# @param options [Hash]
|
10
|
+
def perform(options)
|
11
|
+
super(
|
12
|
+
'proserv_course_completion_csv',
|
13
|
+
merge_report_params(options),
|
14
|
+
CanvasSync::Processors::CourseCompletionReportProcessor.to_s,
|
15
|
+
{},
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -12,14 +12,17 @@ module CanvasSync
|
|
12
12
|
# Override the delta-syncing date if:
|
13
13
|
# 1. the Term hasn't been synced before or
|
14
14
|
# 2. the Term underwent a period of not syncing
|
15
|
-
term_last_sync = CanvasSync.redis.get(self.class.last_sync_key(term_id))
|
16
15
|
if batch_context[:updated_after]
|
16
|
+
term_last_sync = CanvasSync.redis.get(self.class.last_sync_key(term_id))
|
17
17
|
if !term_last_sync.present? || batch_context[:updated_after] > term_last_sync
|
18
18
|
local_context[:updated_after] = term_last_sync.presence
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
JobBatches::ManagedBatchJob.make_batch(jobs, ordered: false, concurrency: true) do |b|
|
23
|
+
# TODO If we do a Chain UI, this will need to checkin somehow to indicate that the chain forked
|
24
|
+
# Or chain steps just show a summary - eg "Started", "X Jobs Running", "Done" or "X Jobs Running, Y Jobs Done" - and not individual forks
|
25
|
+
# For a step to be considered done, all previous sibling-level steps must be done and no batches pending
|
23
26
|
b.description = "TermBatchJob(#{term_id}) Root"
|
24
27
|
b.context = local_context
|
25
28
|
b.on(:success, "#{self.class.to_s}.batch_finished") unless options[:mark_synced] == false
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative "./report_processor"
|
2
|
+
|
3
|
+
module CanvasSync
|
4
|
+
module Processors
|
5
|
+
# Processes a course completion report using the bulk importer.
|
6
|
+
#
|
7
|
+
# @param report_file_path [String]
|
8
|
+
# @param options [Hash]
|
9
|
+
class CourseCompletionReportProcessor < 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, CourseProgress, options: options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -105,6 +105,27 @@ courses:
|
|
105
105
|
database_column_name: grading_standard_id
|
106
106
|
type: integer
|
107
107
|
|
108
|
+
course_progresses:
|
109
|
+
conflict_target:
|
110
|
+
- student_id
|
111
|
+
- course_id
|
112
|
+
report_columns:
|
113
|
+
student_id:
|
114
|
+
database_column_name: canvas_user_id
|
115
|
+
type: integer
|
116
|
+
course_id:
|
117
|
+
database_column_name: canvas_course_id
|
118
|
+
type: integer
|
119
|
+
requirement_count:
|
120
|
+
database_column_name: requirement_count
|
121
|
+
type: integer
|
122
|
+
requirement_completed_count:
|
123
|
+
database_column_name: requirement_completed_count
|
124
|
+
type: integer
|
125
|
+
completion_date:
|
126
|
+
database_column_name: completion_date
|
127
|
+
type: datetime
|
128
|
+
|
108
129
|
enrollments:
|
109
130
|
conflict_target: canvas_enrollment_id
|
110
131
|
report_columns:
|
@@ -324,6 +345,12 @@ context_modules:
|
|
324
345
|
deleted_at:
|
325
346
|
database_column_name: deleted_at
|
326
347
|
type: datetime
|
348
|
+
completion_requirements:
|
349
|
+
database_column_name: completion_requirements
|
350
|
+
type: yaml
|
351
|
+
prerequisites:
|
352
|
+
database_column_name: prerequisites
|
353
|
+
type: yaml
|
327
354
|
|
328
355
|
context_module_items:
|
329
356
|
conflict_target: canvas_context_module_item_id
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/canvas_sync/record.rb
CHANGED
File without changes
|
File without changes
|
data/lib/canvas_sync/version.rb
CHANGED
data/lib/canvas_sync.rb
CHANGED
@@ -53,6 +53,7 @@ module CanvasSync
|
|
53
53
|
rubrics
|
54
54
|
rubric_associations
|
55
55
|
rubric_assessments
|
56
|
+
course_progresses
|
56
57
|
].freeze
|
57
58
|
|
58
59
|
SUPPORTED_TERM_SCOPE_MODELS = %w[
|
@@ -64,6 +65,7 @@ module CanvasSync
|
|
64
65
|
rubrics
|
65
66
|
rubric_associations
|
66
67
|
rubric_assessments
|
68
|
+
course_progresses
|
67
69
|
].freeze
|
68
70
|
|
69
71
|
DEFAULT_TERM_SCOPE_MODELS = %w[
|
@@ -75,6 +77,7 @@ module CanvasSync
|
|
75
77
|
rubrics
|
76
78
|
rubric_associations
|
77
79
|
rubric_assessments
|
80
|
+
course_progresses
|
78
81
|
].freeze
|
79
82
|
|
80
83
|
SUPPORTED_LIVE_EVENTS = %w[
|
@@ -166,6 +169,7 @@ module CanvasSync
|
|
166
169
|
context_modules: CanvasSync::Jobs::SyncContextModulesJob,
|
167
170
|
context_module_items: CanvasSync::Jobs::SyncContextModuleItemsJob,
|
168
171
|
content_migrations: CanvasSync::Jobs::SyncContentMigrationsJob,
|
172
|
+
course_progresses: CanvasSync::Jobs::SyncCourseProgressesJob,
|
169
173
|
rubrics: CanvasSync::Jobs::SyncRubricsJob,
|
170
174
|
rubric_associations: CanvasSync::Jobs::SyncRubricAssociationsJob,
|
171
175
|
rubric_assessments: CanvasSync::Jobs::SyncRubricAssessmentsJob,
|
@@ -2,18 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe CanvasSync do
|
4
4
|
describe '.provisioning_sync' do
|
5
|
-
it 'invokes the first job in the queue and passes on the rest of the job chain' do
|
6
|
-
expected_job_chain = CanvasSync.default_provisioning_report_chain(['courses'], term_scope: nil).normalize![:args][0]
|
7
|
-
|
8
|
-
expect(CanvasSync::Jobs::BeginSyncChainJob).to receive(:perform_later)
|
9
|
-
.with(
|
10
|
-
expected_job_chain,
|
11
|
-
anything
|
12
|
-
)
|
13
|
-
|
14
|
-
CanvasSync.provisioning_sync(['courses'])
|
15
|
-
end
|
16
|
-
|
17
5
|
context 'an invalid model is passed in' do
|
18
6
|
it 'raises a helpful exception' do
|
19
7
|
expect {
|
@@ -30,22 +18,25 @@ RSpec.describe CanvasSync do
|
|
30
18
|
provisioning: { c: 3 },
|
31
19
|
global: { d: 4 },
|
32
20
|
})
|
33
|
-
expect(chain.normalize!).to
|
21
|
+
expect(chain.normalize!).to match({
|
34
22
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
23
|
+
:chain_link=>String,
|
35
24
|
:args => [
|
36
25
|
[
|
37
26
|
{
|
38
27
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
28
|
+
:chain_link=>String,
|
39
29
|
:args=>[
|
40
30
|
[
|
41
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users"], :b=>2}},
|
31
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["users"], :b=>2}},
|
42
32
|
{
|
43
33
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
34
|
+
:chain_link=>String,
|
44
35
|
:args=>[],
|
45
36
|
:kwargs=>{
|
46
37
|
:term_scope=>"active",
|
47
38
|
:sub_jobs=>[
|
48
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :c=>3}},
|
39
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["courses"], :c=>3}},
|
49
40
|
],
|
50
41
|
},
|
51
42
|
},
|
@@ -62,20 +53,23 @@ RSpec.describe CanvasSync do
|
|
62
53
|
context 'we are syncing users with a term scope' do
|
63
54
|
it 'syncs the users in a separate job that runs first' do
|
64
55
|
chain = CanvasSync.default_provisioning_report_chain(['users', 'courses'], term_scope: :active)
|
65
|
-
expect(chain.normalize!).to
|
56
|
+
expect(chain.normalize!).to match({
|
66
57
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
58
|
+
:chain_link=>String,
|
67
59
|
:args => [[
|
68
60
|
{
|
69
61
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
62
|
+
:chain_link=>String,
|
70
63
|
:args=>[
|
71
64
|
[
|
72
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users"]}},
|
65
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["users"]}},
|
73
66
|
{
|
74
67
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
68
|
+
:chain_link=>String,
|
75
69
|
:args=>[],
|
76
70
|
:kwargs=>{
|
77
71
|
:sub_jobs=>[
|
78
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}
|
72
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["courses"]}}
|
79
73
|
],
|
80
74
|
:term_scope=>"active",
|
81
75
|
}
|
@@ -93,17 +87,20 @@ RSpec.describe CanvasSync do
|
|
93
87
|
context 'we are syncing users without a term scope' do
|
94
88
|
it 'syncs users along with the rest of the provisioning report' do
|
95
89
|
chain = CanvasSync.default_provisioning_report_chain(['users', 'courses'])
|
96
|
-
expect(chain.normalize!).to
|
90
|
+
expect(chain.normalize!).to match({
|
97
91
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
92
|
+
:chain_link=>String,
|
98
93
|
:args => [[
|
99
94
|
{
|
100
95
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
96
|
+
:chain_link=>String,
|
101
97
|
:args=>[[
|
102
98
|
{
|
103
99
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
100
|
+
:chain_link=>String,
|
104
101
|
:args=>[],
|
105
102
|
:kwargs=>{
|
106
|
-
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "courses"]}}],
|
103
|
+
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["users", "courses"]}}],
|
107
104
|
:term_scope=>nil,
|
108
105
|
}
|
109
106
|
}
|
@@ -119,18 +116,21 @@ RSpec.describe CanvasSync do
|
|
119
116
|
context 'we are syncing roles with a term scope' do
|
120
117
|
it 'syncs the roles in a separate job that runs first' do
|
121
118
|
chain = CanvasSync.default_provisioning_report_chain(['roles', 'courses'], term_scope: :active)
|
122
|
-
expect(chain.normalize!).to
|
119
|
+
expect(chain.normalize!).to match({
|
123
120
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
121
|
+
:chain_link=>String,
|
124
122
|
:args => [[
|
125
123
|
{
|
126
124
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
125
|
+
:chain_link=>String,
|
127
126
|
:args=>[[
|
128
|
-
{:job=>"CanvasSync::Jobs::SyncRolesJob", :options=>{}},
|
127
|
+
{:job=>"CanvasSync::Jobs::SyncRolesJob", :chain_link=>String, :options=>{}},
|
129
128
|
{
|
130
129
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
130
|
+
:chain_link=>String,
|
131
131
|
:args=>[],
|
132
132
|
:kwargs=>{
|
133
|
-
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}],
|
133
|
+
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["courses"]}}],
|
134
134
|
:term_scope=>"active",
|
135
135
|
}
|
136
136
|
},
|
@@ -146,18 +146,21 @@ RSpec.describe CanvasSync do
|
|
146
146
|
context 'we are syncing roles without a term scope' do
|
147
147
|
it 'syncs roles separately even with no term scope' do
|
148
148
|
chain = CanvasSync.default_provisioning_report_chain(['roles', 'courses'])
|
149
|
-
expect(chain.normalize!).to
|
149
|
+
expect(chain.normalize!).to match({
|
150
150
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
151
|
+
:chain_link=>String,
|
151
152
|
:args => [[
|
152
153
|
{
|
153
154
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
155
|
+
:chain_link=>String,
|
154
156
|
:args=>[[
|
155
|
-
{:job=>"CanvasSync::Jobs::SyncRolesJob", :options=>{}},
|
157
|
+
{:job=>"CanvasSync::Jobs::SyncRolesJob", :chain_link=>String, :options=>{}},
|
156
158
|
{
|
157
159
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
160
|
+
:chain_link=>String,
|
158
161
|
:args=>[],
|
159
162
|
:kwargs=>{
|
160
|
-
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}],
|
163
|
+
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["courses"]}}],
|
161
164
|
:term_scope=>nil,
|
162
165
|
}
|
163
166
|
}
|
@@ -173,18 +176,21 @@ RSpec.describe CanvasSync do
|
|
173
176
|
context 'we are syncing admins with a term scope' do
|
174
177
|
it 'syncs the admins in a separate job that runs first' do
|
175
178
|
chain = CanvasSync.default_provisioning_report_chain(['admins', 'courses'], term_scope: :active)
|
176
|
-
expect(chain.normalize!).to
|
179
|
+
expect(chain.normalize!).to match({
|
177
180
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
181
|
+
:chain_link=>String,
|
178
182
|
:args => [[
|
179
183
|
{
|
180
184
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
185
|
+
:chain_link=>String,
|
181
186
|
:args=>[[
|
182
|
-
{:job=>"CanvasSync::Jobs::SyncAdminsJob", :options=>{}},
|
187
|
+
{:job=>"CanvasSync::Jobs::SyncAdminsJob", :chain_link=>String, :options=>{}},
|
183
188
|
{
|
184
189
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
190
|
+
:chain_link=>String,
|
185
191
|
:args=>[],
|
186
192
|
:kwargs=>{
|
187
|
-
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}],
|
193
|
+
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["courses"]}}],
|
188
194
|
:term_scope=>"active"
|
189
195
|
}
|
190
196
|
}
|
@@ -200,18 +206,21 @@ RSpec.describe CanvasSync do
|
|
200
206
|
context 'we are syncing admins without a term scope' do
|
201
207
|
it 'syncs admins separately even with no term scope' do
|
202
208
|
chain = CanvasSync.default_provisioning_report_chain(['admins', 'courses'])
|
203
|
-
expect(chain.normalize!).to
|
209
|
+
expect(chain.normalize!).to match({
|
204
210
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
211
|
+
:chain_link=>String,
|
205
212
|
:args => [[
|
206
213
|
{
|
207
214
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
215
|
+
:chain_link=>String,
|
208
216
|
:args=>[[
|
209
|
-
{:job=>"CanvasSync::Jobs::SyncAdminsJob", :options=>{}},
|
217
|
+
{:job=>"CanvasSync::Jobs::SyncAdminsJob", :chain_link=>String, :options=>{}},
|
210
218
|
{
|
211
219
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
220
|
+
:chain_link=>String,
|
212
221
|
:args=>[],
|
213
222
|
:kwargs=>{
|
214
|
-
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}],
|
223
|
+
:sub_jobs=>[{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["courses"]}}],
|
215
224
|
:term_scope=>nil
|
216
225
|
}
|
217
226
|
}
|
@@ -228,19 +237,22 @@ RSpec.describe CanvasSync do
|
|
228
237
|
it "appends the SyncAssignmentsJob" do
|
229
238
|
chain = CanvasSync.default_provisioning_report_chain(%w[users enrollments assignments])
|
230
239
|
|
231
|
-
expect(chain.normalize!).to
|
240
|
+
expect(chain.normalize!).to match({
|
232
241
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
242
|
+
:chain_link=>String,
|
233
243
|
:args => [[
|
234
244
|
{
|
235
245
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
246
|
+
:chain_link=>String,
|
236
247
|
:args=>[[
|
237
248
|
{
|
238
249
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
250
|
+
:chain_link=>String,
|
239
251
|
:args=>[],
|
240
252
|
:kwargs=>{
|
241
253
|
:sub_jobs=>[
|
242
|
-
{:job=>"CanvasSync::Jobs::SyncAssignmentsJob", :options=>{}},
|
243
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"]}}
|
254
|
+
{:job=>"CanvasSync::Jobs::SyncAssignmentsJob", :chain_link=>String, :options=>{}},
|
255
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["users", "enrollments"]}}
|
244
256
|
],
|
245
257
|
:term_scope=>nil
|
246
258
|
}
|
@@ -258,19 +270,22 @@ RSpec.describe CanvasSync do
|
|
258
270
|
it "appends the SyncSubmissionsJob" do
|
259
271
|
chain = CanvasSync.default_provisioning_report_chain(%w[users enrollments submissions])
|
260
272
|
|
261
|
-
expect(chain.normalize!).to
|
273
|
+
expect(chain.normalize!).to match({
|
262
274
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
275
|
+
:chain_link=>String,
|
263
276
|
:args => [[
|
264
277
|
{
|
265
278
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
279
|
+
:chain_link=>String,
|
266
280
|
:args=>[[
|
267
281
|
{
|
268
282
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
283
|
+
:chain_link=>String,
|
269
284
|
:args=>[],
|
270
285
|
:kwargs=>{
|
271
286
|
:sub_jobs=>[
|
272
|
-
{:job=>"CanvasSync::Jobs::SyncSubmissionsJob", :options=>{}},
|
273
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"]}}
|
287
|
+
{:job=>"CanvasSync::Jobs::SyncSubmissionsJob", :chain_link=>String, :options=>{}},
|
288
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["users", "enrollments"]}}
|
274
289
|
],
|
275
290
|
:term_scope=>nil
|
276
291
|
}
|
@@ -288,19 +303,22 @@ RSpec.describe CanvasSync do
|
|
288
303
|
it "appends the SyncAssignmentGroupsJob" do
|
289
304
|
chain = CanvasSync.default_provisioning_report_chain(%w[users enrollments assignment_groups])
|
290
305
|
|
291
|
-
expect(chain.normalize!).to
|
306
|
+
expect(chain.normalize!).to match({
|
292
307
|
:job => "CanvasSync::Jobs::BeginSyncChainJob",
|
308
|
+
:chain_link=>String,
|
293
309
|
:args => [[
|
294
310
|
{
|
295
311
|
:job=>"CanvasSync::JobBatches::ConcurrentBatchJob",
|
312
|
+
:chain_link=>String,
|
296
313
|
:args=>[[
|
297
314
|
{
|
298
315
|
:job=>"CanvasSync::Jobs::SyncTermsJob",
|
316
|
+
:chain_link=>String,
|
299
317
|
:args=>[],
|
300
318
|
:kwargs=>{
|
301
319
|
:sub_jobs=>[
|
302
|
-
{:job=>"CanvasSync::Jobs::SyncAssignmentGroupsJob", :options=>{}},
|
303
|
-
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"]}}
|
320
|
+
{:job=>"CanvasSync::Jobs::SyncAssignmentGroupsJob", :chain_link=>String, :options=>{}},
|
321
|
+
{:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :chain_link=>String, :options=>{:models=>["users", "enrollments"]}}
|
304
322
|
],
|
305
323
|
:term_scope=>nil
|
306
324
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|