|
|
|
@ -9,15 +9,15 @@ if @shixun
|
|
|
|
|
json.overall_appraisal @work.overall_appraisal
|
|
|
|
|
json.myself_experience @work.myshixun.try(:total_score).to_i
|
|
|
|
|
json.total_experience @shixun.all_score
|
|
|
|
|
json.work_score number_with_precision @work.work_score, precision: 1
|
|
|
|
|
json.work_score number_with_precision @work.work_score.to_f.round(2), precision: 1
|
|
|
|
|
json.all_work_score number_with_precision 100, precision: 1
|
|
|
|
|
json.time_consuming @work.myshixun_consume
|
|
|
|
|
json.evaluate_count @user_evaluate_count.to_i
|
|
|
|
|
if @homework.work_efficiency
|
|
|
|
|
json.eff_score_full number_with_precision @homework.eff_score, precision: 1
|
|
|
|
|
json.eff_score number_with_precision @work.eff_score, precision: 1
|
|
|
|
|
json.eff_score number_with_precision @work.eff_score.to_f.round(2), precision: 1
|
|
|
|
|
json.challenge_score_full number_with_precision (100 - @homework.eff_score), precision: 1
|
|
|
|
|
json.challenge_score number_with_precision @work.final_score, precision: 1
|
|
|
|
|
json.challenge_score number_with_precision @work.final_score.to_f.round(2), precision: 1
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 阶段成绩
|
|
|
|
@ -53,7 +53,7 @@ if @shixun
|
|
|
|
|
json.username @user.real_name
|
|
|
|
|
json.student_id @user.student_id
|
|
|
|
|
json.image_url url_to_avatar(@user)
|
|
|
|
|
json.complete_count @work.myshixun&.passed_count
|
|
|
|
|
json.complete_count @work.myshixun&.passed_count.to_i
|
|
|
|
|
json.challenges_count @shixun.challenges_count
|
|
|
|
|
json.efficiency @homework.work_efficiency ? number_with_precision(@work.efficiency, precision: 2) : nil
|
|
|
|
|
json.max_efficiency @homework.work_efficiency ? number_with_precision(@homework.max_efficiency, precision: 2) : nil
|
|
|
|
|