Class: LiveEvents::CourseSectionEvent
- Inherits:
-
BaseEvent
- Object
- ActiveJob::Base
- CanvasSync::Job
- BaseEvent
- LiveEvents::CourseSectionEvent
- Defined in:
- lib/canvas_sync/generators/templates/services/live_events/course_section/course_section_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_section_id: section.id, sis_source_id: section.sis_source_id, sis_batch_id: section.sis_batch_id, course_id: section.course_id, root_account_id: section.root_account_id, enrollment_term_id: section.enrollment_term_id, name: section.name, default_section: section.default_section, accepting_enrollments: section.accepting_enrollments, can_manually_enroll: section.can_manually_enroll, start_at: section.start_at, end_at: section.end_at, workflow_state: section.workflow_state, restrict_enrollments_to_section_dates: section.restrict_enrollments_to_section_dates, nonxlist_course_id: section.nonxlist_course_id, stuck_sis_fields: section.stuck_sis_fields, integration_id: section.integration_id }.
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_section_id: section.id,
sis_source_id: section.sis_source_id,
sis_batch_id: section.sis_batch_id,
course_id: section.course_id,
root_account_id: section.root_account_id,
enrollment_term_id: section.enrollment_term_id,
name: section.name,
default_section: section.default_section,
accepting_enrollments: section.accepting_enrollments,
can_manually_enroll: section.can_manually_enroll,
start_at: section.start_at,
end_at: section.end_at,
workflow_state: section.workflow_state,
restrict_enrollments_to_section_dates: section.restrict_enrollments_to_section_dates,
nonxlist_course_id: section.nonxlist_course_id,
stuck_sis_fields: section.stuck_sis_fields,
integration_id: section.integration_id
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/canvas_sync/generators/templates/services/live_events/course_section/course_section_event.rb', line 26 def perform(_event_payload) super attrs = { canvas_section_id: local_canvas_id(payload[:course_section_id]), canvas_course_id: local_canvas_id(payload[:course_id]), name: payload[:name], status: payload[:workflow_state], start_date: payload[:start_at], end_date: payload[:end_at], canvas_nonxlist_course_id: payload[:nonxlist_course_id], } create_or_update(attrs) end |