|
|
|
@ -18,7 +18,7 @@ class Migrate3176ExerciseScore < ActiveRecord::Migration[5.2]
|
|
|
|
|
answer_status = 1
|
|
|
|
|
end
|
|
|
|
|
ex_shixun_answer_content = exercise_cha.exercise_shixun_answers.find_by(user_id:user.id,exercise_question_id:q.id)
|
|
|
|
|
if ex_shixun_answer_content.present? && !ex_shixun_answer_content.score >0 #把关卡的答案存入试卷的实训里
|
|
|
|
|
if ex_shixun_answer_content.present? && !(ex_shixun_answer_content.score >0) #把关卡的答案存入试卷的实训里
|
|
|
|
|
ex_shixun_answer_content.update_attributes!(score:exercise_cha_score.round(1),status:answer_status)
|
|
|
|
|
end
|
|
|
|
|
score5 += exercise_cha_score
|
|
|
|
|