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-7.12.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.12.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.11.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.11.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.10.5 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.10.4 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.10.3 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.10.2 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.10.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.10.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.9.2 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.9.1 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.9.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.7.6 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.7.5 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.7.4 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.8.0 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.7.3 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.7.2 app/helpers/concerns/with_student_path_navigation.rb
mumuki-laboratory-7.7.1 app/helpers/concerns/with_student_path_navigation.rb