Sha256: 66007f7fccc7b535c82f79d23e40ec51aa32cf6b6fd099f2df80fac70735edfc

Contents?: true

Size: 815 Bytes

Versions: 7

Compression:

Stored size: 815 Bytes

Contents

module CanvasSync
  module Jobs
    class SyncSubmissionsJob < ReportStarter
      # Syncs Submissions
      #
      # Starts a report processor for the submission report
      # (the proserv_student_submissions_csv report must be enabled)
      #
      # @param job_chain [Hash]
      # @param options [Hash]
      def perform(job_chain, _options)
        report_params = if job_chain[:global_options][:term_id].present?
                          { enrollment_term_id: job_chain[:global_options][:term_id] }
                        else
                          {}
                        end

        super(
          job_chain,
          "proserv_student_submissions_csv",
          report_params,
          CanvasSync::Processors::SubmissionsProcessor.to_s,
          {},
        )
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
canvas_sync-0.3.20 lib/canvas_sync/jobs/sync_submissions_job.rb
canvas_sync-0.3.19 lib/canvas_sync/jobs/sync_submissions_job.rb
canvas_sync-0.3.18 lib/canvas_sync/jobs/sync_submissions_job.rb
canvas_sync-0.3.17 lib/canvas_sync/jobs/sync_submissions_job.rb
canvas_sync-0.3.16 lib/canvas_sync/jobs/sync_submissions_job.rb
canvas_sync-0.3.15 lib/canvas_sync/jobs/sync_submissions_job.rb
canvas_sync-0.3.14 lib/canvas_sync/jobs/sync_submissions_job.rb