Sha256: 381fbe7359efdca805dba8bd7e3931a34f0f2c805aa7c67b6d5508858f66079e
Contents?: true
Size: 933 Bytes
Versions: 117
Compression:
Stored size: 933 Bytes
Contents
# # # AUTO GENERATED LIVE EVENT # This was auto generated by the CanvasSync Gem. # You can customize it as needed, but make sure you test # any changes you make to the auto generated methods. # # LiveEvent message formats can be found at https://canvas.instructure.com/doc/api/file.live_events.html # In the general case, LiveEvent message content should not be trusted - it is highly possible that events may # arrive out of order. Most of the CanvasSync LiveEvent templates solve this by always fetching the object from the API. # module LiveEvents class ModuleEvent < LiveEvents::BaseEvent def process return unless payload["context_type"] == "Course" context_module = ContextModule.find_or_initialize_by(canvas_id: payload["module_id"]) context_module.sync_from_api end end class ModuleCreatedEvent < LiveEvents::ModuleEvent; end class ModuleUpdatedEvent < LiveEvents::ModuleEvent; end end
Version data entries
117 entries across 117 versions & 1 rubygems