Sha256: 00621d129bb08face04f71ffa6144e4ced561e3157769e6c0d4df51a957aeea9

Contents?: true

Size: 664 Bytes

Versions: 82

Compression:

Stored size: 664 Bytes

Contents

# <%= autogenerated_model_warning %>

class AssignmentGroup < ApplicationRecord
  include CanvasSync::Record
  include CanvasSync::Concerns::ApiSyncable

  validates :canvas_id, uniqueness: true, presence: true
  belongs_to :course, primary_key: :canvas_id, foreign_key: :canvas_course_id, optional: true
  has_many :assignments, primary_key: :canvas_id, foreign_key: :canvas_assignment_group_id

  serialize :rules

  api_syncable({
    canvas_id: :id,
    name: :name,
    position: :position,
    rules: :rules,
    group_weight: :group_weight,
    workflow_state: ->(p) { 'available' },
  }, -> (api) { api.assignment_group(canvas_course_id, canvas_id) })
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
canvas_sync-0.17.8.beta4 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.8.beta3 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.8.beta2 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.8.beta1 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.7 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.7.beta1 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.6 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.6.beta1 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.5 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.5.beta2 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.5.beta1 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.4 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.3.beta3 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.3.beta2 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.3.beta1 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.2 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.1 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.0 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.0.beta15 lib/canvas_sync/generators/templates/models/assignment_group.rb
canvas_sync-0.17.0.beta14 lib/canvas_sync/generators/templates/models/assignment_group.rb