Sha256: 7c3eedf4172086a0fae538a39b2ffb7f8fb74e4bcc39d6a85c8d180dbbddca5e
Contents?: true
Size: 797 Bytes
Versions: 8
Compression:
Stored size: 797 Bytes
Contents
module CoalescingPanda class Course < ActiveRecord::Base belongs_to :account, foreign_key: :coalescing_panda_lti_account_id, class_name: 'CoalescingPanda::LtiAccount' belongs_to :term, foreign_key: :coalescing_panda_term_id, class_name: 'CoalescingPanda::Term' has_many :sections, foreign_key: :coalescing_panda_course_id, class_name: 'CoalescingPanda::Section' has_many :enrollments, through: :sections has_many :assignments, foreign_key: :coalescing_panda_course_id, class_name: 'CoalescingPanda::Assignment' has_many :submissions, through: :assignments has_many :users, through: :sections, source: :users, class_name: 'CoalescingPanda::User' validates :coalescing_panda_lti_account_id, presence: true validates :canvas_course_id, presence: true end end
Version data entries
8 entries across 8 versions & 1 rubygems