Sha256: ed674d42df8063138155503783fbee496ac428d6f0d4f5dd135a81d9bd073319

Contents?: true

Size: 1.09 KB

Versions: 23

Compression:

Stored size: 1.09 KB

Contents

# #
# AUTO GENERATED MODEL
# This model 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.
#


class Submission < ApplicationRecord
  include CanvasSync::Record
  include CanvasSync::Concerns::ApiSyncable
  # include CanvasSync::Concerns::LiveEventSync

  canvas_sync_features :defaults

  validates :canvas_id, uniqueness: true, presence: true
  belongs_to :assignment, primary_key: :canvas_id, foreign_key: :canvas_assignment_id, optional: true
  belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id, optional: true
  belongs_to :course, primary_key: :canvas_id, foreign_key: :canvas_course_id, optional: true

  api_syncable({
    canvas_assignment_id: :assignment_id,
    canvas_user_id: :user_id,
    submitted_at: :submitted_at,
    graded_at: :graded_at,
    cached_due_date: :due_at,
    score: :score,
    excused: :excused,
    workflow_state: :workflow_state,
  }, -> (api) { api.user_course_assignment_submission(assignment.context.canvas_id, canvas_assignment_id, canvas_user_id) })
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
canvas_sync-0.22.6 spec/dummy/app/models/submission.rb
canvas_sync-0.22.5 spec/dummy/app/models/submission.rb
canvas_sync-0.22.4 spec/dummy/app/models/submission.rb
canvas_sync-0.22.3 spec/dummy/app/models/submission.rb
canvas_sync-0.22.2 spec/dummy/app/models/submission.rb
canvas_sync-0.22.1 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta8 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta7 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta6 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta5 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta4 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta3 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta2 spec/dummy/app/models/submission.rb
canvas_sync-0.22.0.beta1 spec/dummy/app/models/submission.rb
canvas_sync-0.21.1 spec/dummy/app/models/submission.rb
canvas_sync-0.21.1.beta1 spec/dummy/app/models/submission.rb
canvas_sync-0.21.0 spec/dummy/app/models/submission.rb
canvas_sync-0.21.0.beta5 spec/dummy/app/models/submission.rb
canvas_sync-0.21.0.beta4 spec/dummy/app/models/submission.rb