Sha256: 03d1fa8e172527571ba1fd9f884f14be9800a96b09447f0ddfc7fcc4bac7f11a
Contents?: true
Size: 687 Bytes
Versions: 16
Compression:
Stored size: 687 Bytes
Contents
module WithStudentPathNavigation def next_button(navigable) return unless navigable navigation_flows.lazy.map { |it| it.new(self).button(navigable) }.find(&:present?) end def next_lesson_button(guide) next_button(guide.lesson) || chapter_finished(guide.chapter) end def next_exercise_button(exercise) next_button(exercise) || next_button(exercise.guide.lesson) if show_content_element? end def close_modal_button %Q{<button class="btn btn-complementary w-100 mu-close-modal">#{t :keep_learning}</button>}.html_safe end private def navigation_flows [ContinueNavigation, RevisitNavigation, NextParentNavigation, FinishNavigation] end end
Version data entries
16 entries across 16 versions & 1 rubygems