Sha256: f122da1ee8d7112fe6a572cc138f05113d544f7ff74a0717f55bcca5e46fb74b
Contents?: true
Size: 1.11 KB
Versions: 126
Compression:
Stored size: 1.11 KB
Contents
module CanvasSync module Jobs class SyncSimpleTableJob < ReportStarter # # Starts a report processor for the specified report # (the specified report must be enabled) # # @param options [Hash] { # report_name: "", # Name of the report in the Canvas API # model: , # Model to map the report results as # mapping: {} # Mapping to describe how to convert the report to the Model, # klass: , # params: {}, # List of params to pass to the report # } def perform(options) start_report(report_params(options), options) end def start_report(params, options) CanvasSync::Jobs::ReportStarter.perform_later( options[:report_name], params, CanvasSync::Processors::NormalProcessor.to_s, options, ) end def report_params(options, canvas_term_id = options[:canvas_term_id] || batch_context[:canvas_term_id]) params = options[:params] || {} params["parameters[enrollment_term_id]"] = canvas_term_id if canvas_term_id params end end end end
Version data entries
126 entries across 126 versions & 1 rubygems