|
|
|
@ -816,7 +816,7 @@ class ExercisesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
ex_user_ids = exercise_users.pluck(:id)
|
|
|
|
|
|
|
|
|
|
EndExerciseCalculateJob.perform_later(ex_user_ids, exercise, Time.now.to_s, true, 4)
|
|
|
|
|
EndExerciseCalculateJob.perform_later(ex_user_ids, exercise.id, Time.now.to_s, true, 4)
|
|
|
|
|
# exercise_users.each do |user|
|
|
|
|
|
# if user.commit_status == 0 && user.start_at.present?
|
|
|
|
|
# objective_score = calculate_student_score(exercise,user.user)[:total_score]
|
|
|
|
@ -1194,7 +1194,7 @@ class ExercisesController < ApplicationController
|
|
|
|
|
start_time = Time.current - @exercise.time * 60
|
|
|
|
|
ex_user_ids = @exercise_users_list.where("start_at <= '#{Time.at(start_time)}' and commit_status = 0").pluck(:id)
|
|
|
|
|
if ex_user_ids.size > 0
|
|
|
|
|
EndExerciseCalculateJob.perform_later(ex_user_ids, @exercise, Time.now.to_s, false, 2)
|
|
|
|
|
EndExerciseCalculateJob.perform_later(ex_user_ids, @exercise.id, Time.now.to_s, false, 2)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|