Sha256: e8aa235429b9143cad370408c9f4a476da322946f41e72d2a6b4566a7e3ec950

Contents?: true

Size: 620 Bytes

Versions: 81

Compression:

Stored size: 620 Bytes

Contents

module WithStudentPathNavigation
  def next_button(navigable)
    return unless navigable
    ContinueNavigation.new(self).button(navigable) || RevisitNavigation.new(self).button(navigable) || FinishNavigation.new(self).button(navigable)
    #TODO Refactor this
  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)
  end

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

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
mumuki-laboratory-9.0.6 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-9.0.5 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-9.0.4 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-9.0.3 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-9.0.2 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-9.0.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-9.0.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.6.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.6.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.5.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.4.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.3.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.2.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.2.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.1.3 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.1.2 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.1.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.1.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.12.3 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-8.0.0 app/helpers/concerns/with_student_path_navigation.rb