Sha256: 1fbbf49c1ecb21684cfc9ba03863fc2811ff4bdd7da413fa4832646670f98790

Contents?: true

Size: 641 Bytes

Versions: 26

Compression:

Stored size: 641 Bytes

Contents

require_relative "./report_processor"

module CanvasSync
  module Processors
    # Processes an assignments report using the bulk importer.
    #
    # @param report_file_path [String]
    # @param options [Hash]
    class AssignmentsProcessor < ReportProcessor
      def self.process(report_file_path, _options)
        new(report_file_path)
      end

      def initialize(report_file_path)
        CanvasSync::Importers::BulkImporter.import(
          report_file_path,
          mapping[:assignments][:report_columns],
          Assignment,
          mapping[:assignments][:conflict_target].to_sym,
        )
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
canvas_sync-0.3.17 lib/canvas_sync/processors/assignments_processor.rb
canvas_sync-0.3.16 lib/canvas_sync/processors/assignments_processor.rb
canvas_sync-0.3.15 lib/canvas_sync/processors/assignments_processor.rb
canvas_sync-0.3.14 lib/canvas_sync/processors/assignments_processor.rb
canvas_sync-0.3.13 lib/canvas_sync/processors/assignments_processor.rb
canvas_sync-0.3.12 lib/canvas_sync/processors/assignments_processor.rb