|
|
|
@ -29,8 +29,9 @@ elsif @user_course_identity == Course::STUDENT
|
|
|
|
|
json.left_time left_time @homework, @current_user.id
|
|
|
|
|
|
|
|
|
|
if @homework.homework_type == "practice"
|
|
|
|
|
json.(@work, :id, :work_status, :update_time, :late_penalty, :ultimate_score)
|
|
|
|
|
json.(@work, :id, :work_status, :update_time, :ultimate_score)
|
|
|
|
|
|
|
|
|
|
json.late_penalty @work.late_penalty if @homework.allow_late
|
|
|
|
|
json.cost_time @work.myshixun.try(:total_cost_time)
|
|
|
|
|
json.work_score work_score_format(@work.work_score, true, @homework.score_open)
|
|
|
|
|
json.final_score work_score_format(@work.final_score, true, @homework.score_open)
|
|
|
|
@ -38,7 +39,7 @@ elsif @user_course_identity == Course::STUDENT
|
|
|
|
|
json.eff_score work_score_format(@work.eff_score, true, @homework.score_open)
|
|
|
|
|
json.complete_count @work.myshixun.try(:passed_count)
|
|
|
|
|
else
|
|
|
|
|
json.(@work, :id, :work_status, :update_time, :late_penalty, :absence_penalty, :appeal_penalty, :ultimate_score)
|
|
|
|
|
json.(@work, :id, :work_status, :update_time, :ultimate_score)
|
|
|
|
|
|
|
|
|
|
json.work_score work_score_format(@work.work_score, true, @homework.score_open)
|
|
|
|
|
json.final_score work_score_format(@work.final_score, true, @homework.score_open)
|
|
|
|
@ -48,13 +49,17 @@ elsif @user_course_identity == Course::STUDENT
|
|
|
|
|
|
|
|
|
|
json.ta_comment_count @work.ta_comment_count
|
|
|
|
|
|
|
|
|
|
json.late_penalty @work.late_penalty if @homework.allow_late
|
|
|
|
|
|
|
|
|
|
if @homework.anonymous_comment
|
|
|
|
|
json.student_comment_count @work.student_comment_num
|
|
|
|
|
json.absence_penalty @work.absence_penalty
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if @homework.anonymous_appeal
|
|
|
|
|
json.appeal_all_count @work.appeal_all_count
|
|
|
|
|
json.appeal_deal_count @work.appeal_deal_count
|
|
|
|
|
json.appeal_penalty @work.appeal_penalty
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if @homework.homework_type == "group"
|
|
|
|
@ -76,8 +81,9 @@ if @homework.homework_type == "practice"
|
|
|
|
|
json.work_efficiency @homework.work_efficiency
|
|
|
|
|
|
|
|
|
|
json.student_works @student_works.each do |work|
|
|
|
|
|
json.(work, :id, :work_status, :update_time, :late_penalty, :ultimate_score)
|
|
|
|
|
json.(work, :id, :work_status, :update_time, :ultimate_score)
|
|
|
|
|
|
|
|
|
|
json.late_penalty work.late_penalty if @homework.allow_late
|
|
|
|
|
json.work_score work_score_format(work.work_score, @current_user == work.user, @homework.score_open)
|
|
|
|
|
json.final_score work_score_format(work.final_score, @current_user == work.user, @homework.score_open)
|
|
|
|
|
json.efficiency work_score_format(work.efficiency, @current_user == work.user, @homework.score_open)
|
|
|
|
@ -103,8 +109,9 @@ elsif @homework.homework_type == "group" || @homework.homework_type == "normal"
|
|
|
|
|
# json.student_comment_count anon_comments(@current_user, work.id).count
|
|
|
|
|
else
|
|
|
|
|
json.(work, :id, :work_status, :update_time, :work_score, :final_score, :teacher_score, :student_score,
|
|
|
|
|
:teaching_asistant_score, :late_penalty, :absence_penalty, :appeal_penalty, :ultimate_score)
|
|
|
|
|
:teaching_asistant_score, :ultimate_score)
|
|
|
|
|
|
|
|
|
|
json.late_penalty work.late_penalty if @homework.allow_late
|
|
|
|
|
json.work_score work_score_format(work.work_score, @current_user == work.user, @homework.score_open)
|
|
|
|
|
json.final_score work_score_format(work.final_score, @current_user == work.user, @homework.score_open)
|
|
|
|
|
json.teacher_score work_score_format(work.teacher_score, @current_user == work.user, @homework.score_open)
|
|
|
|
@ -117,6 +124,7 @@ elsif @homework.homework_type == "group" || @homework.homework_type == "normal"
|
|
|
|
|
# 作品匿评条数
|
|
|
|
|
if @homework.anonymous_comment
|
|
|
|
|
json.student_comment_count @homework_detail_manual.comment_status > 2 ? work.student_comment_num : 0
|
|
|
|
|
json.absence_penalty work.absence_penalty
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
json.student_id work.user.try(:student_id)
|
|
|
|
@ -133,6 +141,7 @@ elsif @homework.homework_type == "group" || @homework.homework_type == "normal"
|
|
|
|
|
if @homework.anonymous_appeal
|
|
|
|
|
json.appeal_all_count work.appeal_all_count
|
|
|
|
|
json.appeal_deal_count work.appeal_deal_count
|
|
|
|
|
json.appeal_penalty work.appeal_penalty
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
json.user_login @is_evaluation ? "--" : work.user.try(:login)
|
|
|
|
|