|
|
|
@ -968,18 +968,19 @@ module ExercisesHelper
|
|
|
|
|
subjective_score = exercise_user.subjective_score < 0.0 ? 0.0 : exercise_user.subjective_score
|
|
|
|
|
total_score = objective_score + subjective_score
|
|
|
|
|
|
|
|
|
|
if commit_time.nil?
|
|
|
|
|
if exercise.time > 0
|
|
|
|
|
start_time = Time.at(exercise_user.start_at + exercise.time * 60)
|
|
|
|
|
end_time = start_time > exercise_end_time ? exercise_end_time : start_time
|
|
|
|
|
commit_method = start_time > exercise_end_time ? 3 : 2
|
|
|
|
|
else
|
|
|
|
|
commit_method = 3
|
|
|
|
|
end_time = exercise_end_time
|
|
|
|
|
end
|
|
|
|
|
if exercise.time > 0
|
|
|
|
|
start_time = Time.at(exercise_user.start_at + exercise.time * 60)
|
|
|
|
|
end_time = start_time > exercise_end_time ? exercise_end_time : start_time
|
|
|
|
|
commit_method = start_time > exercise_end_time ? 3 : 2
|
|
|
|
|
else
|
|
|
|
|
commit_method = 3
|
|
|
|
|
end_time = exercise_end_time
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
unless commit_time.nil?
|
|
|
|
|
commit_method = 1
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
commit_time = commit_time.present? && end_time > commit_time ? commit_time : end_time
|
|
|
|
|
|
|
|
|
|
commit_option = {
|
|
|
|
|