Sha256: 1b114ed3f7d4ebff9159dad544b1768e93ce91893b91b2f66d8a84c55f9a304e
Contents?: true
Size: 1.08 KB
Versions: 25
Compression:
Stored size: 1.08 KB
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 GradeEvent < CanvasSync::LiveEvents::BaseHandler def process raise "process must be implemented in your subclass" end private def submission Submission.find_by(canvas_submission_id: local_canvas_id(payload[:submission_id])) end def assignment Assignment.find_by(canvas_assignment_id: local_canvas_id(payload[:assignment_id])) end def user User.find_by(canvas_user_id: local_canvas_id(payload[:user_id])) end end class GradeChangedEvent < LiveEvents::GradeEvent; end end
Version data entries
25 entries across 25 versions & 1 rubygems