Class: LiveEvents::SyllabusEvent
- Inherits:
-
BaseEvent
- Object
- ActiveJob::Base
- CanvasSync::Job
- BaseEvent
- LiveEvents::SyllabusEvent
- Defined in:
- lib/canvas_sync/generators/templates/services/live_events/syllabus/syllabus_event.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#perform(event_payload) ⇒ Object
The following is provided in the live events call: { course_id: course.global_id, syllabus_body: LiveEvents.truncate(course.syllabus_body), old_syllabus_body: LiveEvents.truncate(old_syllabus_body) }.
Methods inherited from BaseEvent
Methods inherited from CanvasSync::Job
#create_job_log, #report_checker_wait_time
Instance Method Details
#perform(event_payload) ⇒ Object
The following is provided in the live events call:
course_id: course.global_id,
syllabus_body: LiveEvents.truncate(course.syllabus_body),
old_syllabus_body: LiveEvents.truncate(old_syllabus_body)
13 14 15 16 17 18 19 20 |
# File 'lib/canvas_sync/generators/templates/services/live_events/syllabus/syllabus_event.rb', line 13 def perform(event_payload) super attrs = { course_id: course.try(:id), syllabus_body: payload[:syllabus_body], } create_or_update(attrs) end |