Class: LiveEvents::SubmissionEvent
- Inherits:
-
BaseEvent
- Object
- ActiveJob::Base
- CanvasSync::Job
- BaseEvent
- LiveEvents::SubmissionEvent
- Defined in:
- lib/canvas_sync/generators/templates/services/live_events/submission_event.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseEvent
#metadata, #payload, #raw_payload
Attributes inherited from CanvasSync::Job
Instance Method Summary collapse
Methods inherited from BaseEvent
Methods inherited from CanvasSync::Job
#create_job_log, #report_checker_wait_time, #update_or_create_model
Instance Method Details
#process ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/canvas_sync/generators/templates/services/live_events/submission_event.rb', line 6 def process submission = Submission.where(canvas_id: local_canvas_id(payload["submission_id"])).first_or_initialize submission.canvas_assignment_id = local_canvas_id(payload["assignment_id"]) submission.canvas_user_id = local_canvas_id(payload["user_id"]) submission.canvas_course_id = submission.assignment.context.canvas_id submission.sync_from_api end |