module Concerns # Determines whether a participant can access a lesson module Accessibility def accessible? available_for_learning_on <= Time.zone.today end def available_for_learning_on membership.start_date + start_day - 1 end end end