Module: WithStudentPathNavigation

Included in:
ApplicationHelper
Defined in:
app/helpers/concerns/with_student_path_navigation.rb,
app/helpers/concerns/with_student_path_navigation/navigation.rb,
app/helpers/concerns/with_student_path_navigation/finish_navigation.rb,
app/helpers/concerns/with_student_path_navigation/revisit_navigation.rb,
app/helpers/concerns/with_student_path_navigation/continue_navigation.rb,
app/helpers/concerns/with_student_path_navigation/next_parent_navigation.rb

Defined Under Namespace

Classes: ContinueNavigation, FinishNavigation, Navigation, NextParentNavigation, RevisitNavigation

Instance Method Summary collapse

Instance Method Details

#close_modal_buttonObject



15
16
17
# File 'app/helpers/concerns/with_student_path_navigation.rb', line 15

def close_modal_button
  %Q{<button class="btn btn-complementary w-100 mu-close-modal">#{t :keep_learning}</button>}.html_safe
end

#next_button(navigable) ⇒ Object



2
3
4
5
# File 'app/helpers/concerns/with_student_path_navigation.rb', line 2

def next_button(navigable)
  return unless navigable
  navigation_flows.lazy.map { |it| it.new(self).button(navigable) }.find(&:present?)
end

#next_exercise_button(exercise) ⇒ Object



11
12
13
# File 'app/helpers/concerns/with_student_path_navigation.rb', line 11

def next_exercise_button(exercise)
  next_button(exercise) || next_button(exercise.guide.lesson) if show_content_element?
end

#next_lesson_button(guide) ⇒ Object



7
8
9
# File 'app/helpers/concerns/with_student_path_navigation.rb', line 7

def next_lesson_button(guide)
  next_button(guide.lesson) || chapter_finished(guide.chapter)
end