app/models/bit_player/navigator.rb in bit_player-0.4.4 vs app/models/bit_player/navigator.rb in bit_player-0.4.9
- old
+ new
@@ -53,13 +53,13 @@
initialize_context(context)
end
end
def fetch_previous_content
- if previous_content?
- @status.decrement_content_position
- end
+ return unless previous_content?
+
+ @status.decrement_content_position
end
def previous_content?
current_content_provider.exists?(content_position - 1)
end
@@ -81,12 +81,13 @@
@status.save
end
def current_module
@current_module ||= nil
+ arm = @participant.active_group.arm
module_attrs = {
- bit_core_tool_id: BitCore::Tool.find_by_title(context).try(:id),
+ bit_core_tool_id: arm.bit_core_tools.find_by_title(context).try(:id),
position: module_position
}
if current_module_stale?
@current_module = BitCore::ContentModule.where(module_attrs).first