Sha256: 208ed34338d0e8ded249d53f604c1d827a106c4b1111e6f8daf3302a4d75e07e

Contents?: true

Size: 1.06 KB

Versions: 117

Compression:

Stored size: 1.06 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 < LiveEvents::BaseEvent

    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

117 entries across 117 versions & 1 rubygems

Version Path
canvas_sync-0.17.3.beta3 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.3.beta2 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.3.beta1 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.2 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.1 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta15 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta14 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta13 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta12 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta11 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta10 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta9 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta8 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta7 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta6 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta5 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.11.1 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.17.0.beta4 spec/dummy/app/services/live_events/grade_event.rb
canvas_sync-0.16.5 spec/dummy/app/services/live_events/grade_event.rb