You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/homework_commons/code_review_detail.json.jbu...

43 lines
1.6 KiB

6 years ago
json.course_id @course.id
json.course_name @course.name
json.homework_common_id @homework.id
json.homework_common_name @homework.name
json.work_id @student_work.id
6 years ago
json.work_name @student_work.name
json.username @user.full_name
json.user_id @user.id
json.user_login @user.login
json.work_score @student_work.work_score
6 years ago
if @student_work.ultimate_score
json.adjust_score @student_work.work_score < 0 ? 0 : number_with_precision(@student_work.work_score, precision: 1)
else
json.final_score @student_work.final_score
json.late_penalty @student_work.late_penalty
json.score @student_work.work_score < 0 ? 0 : number_with_precision(@student_work.work_score, precision: 1)
if @homework.work_efficiency
json.eff_score_full number_with_precision @homework.eff_score, precision: 1
6 years ago
json.eff_score number_with_precision @student_work.eff_score, precision: 1
json.challenge_score_full number_with_precision (100 - @homework.eff_score), precision: 1
6 years ago
json.challenge_score number_with_precision @student_work.final_score, precision: 1
end
6 years ago
end
json.challenge_list do
json.array! @challenges do |challenge|
json.id challenge[:id]
json.position challenge[:position]
json.subject challenge[:subject]
json.end_time challenge[:end_time]
json.final_score challenge[:final_score]
json.username challenge[:username]
json.all_score challenge[:all_score]
json.copy_user_id challenge[:copy_user_id]
6 years ago
json.copy_username challenge[:copy_username]
json.copy_end_time challenge[:copy_end_time]
json.code_rate challenge[:code_rate]
json.code_list challenge[:code_list]
end
end