Class: CanvasSync::Processors::ReportProcessor
- Inherits:
-
Object
- Object
- CanvasSync::Processors::ReportProcessor
- Defined in:
- lib/canvas_sync/processors/report_processor.rb
Overview
Base report processing class
Direct Known Subclasses
AssignmentGroupsProcessor, AssignmentsProcessor, ContentMigrationsProcessor, ContextModuleItemsProcessor, ContextModulesProcessor, CourseCompletionReportProcessor, NormalProcessor, ProvisioningReportProcessor, RubricAssessmentsProcessor, RubricAssociationsProcessor, RubricsProcessor, SubmissionsProcessor
Instance Method Summary collapse
- #do_bulk_import(report_file_path, model, options: {}, mapping_key: nil, &blk) ⇒ Object
- #mapping ⇒ Object
- #mapping_for(model, key = nil) ⇒ Object
Instance Method Details
#do_bulk_import(report_file_path, model, options: {}, mapping_key: nil, &blk) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/canvas_sync/processors/report_processor.rb', line 15 def do_bulk_import(report_file_path, model, options: {}, mapping_key: nil, &blk) m = mapping_for(model, mapping_key) CanvasSync::Importers::BulkImporter.import( report_file_path, m[:columns], model, m[:conflict_target], import_args: , &blk ) end |
#mapping ⇒ Object
7 8 9 |
# File 'lib/canvas_sync/processors/report_processor.rb', line 7 def mapping CanvasSync::Concerns::SyncMapping::Mapping.default_mappings end |
#mapping_for(model, key = nil) ⇒ Object
11 12 13 |
# File 'lib/canvas_sync/processors/report_processor.rb', line 11 def mapping_for(model, key = nil) CanvasSync::Concerns::SyncMapping.mapping_for(model, key) end |