用户评测时更新作业分数(为迁移数据做处理)

dev_haigong
cxt 6 years ago
parent 312403cfc3
commit 213dc6a0af

@ -6793,7 +6793,9 @@ def update_myshixun_work_score myshixun
end
work.update_time = Time.now
work.final_score = final_score
# 为迁移的数据做特殊处理, 若分数小于当前通关分数则不更新
work.final_score = final_score if work.final_score.nil? || final_score > work.final_score
score = work.final_score + work.eff_score - work.late_penalty
work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) unless work.ultimate_score
#logger.info("#############work_score: #{score}")

Loading…
Cancel
Save