Add archived to dashboard and change homepage to only show active (ie not archived) courses
This commit is contained in:
@@ -6,6 +6,8 @@ class Course < ApplicationRecord
|
||||
# we them independently to avoid re-importing lectures.
|
||||
has_many :recordings, dependent: :destroy
|
||||
|
||||
scope :active, -> { where(archived: false) }
|
||||
|
||||
def lectures_and_work_items
|
||||
(lectures + work_items).sort_by(&:start_time)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user