|
|
|
@ -34,7 +34,7 @@ elsif @user_course_identity == Course::STUDENT
|
|
|
|
|
|
|
|
|
|
if @homework.homework_type == "practice"
|
|
|
|
|
json.(@work, :id, :update_time, :ultimate_score)
|
|
|
|
|
myshixun = @work.myshixun || @shixun.find_by(user_id: @work.user_id)
|
|
|
|
|
myshixun = @work.myshixun || @shixun.myshixuns.find_by(user_id: @work.user_id)
|
|
|
|
|
json.calculation_time @work.calculation_time
|
|
|
|
|
json.late_penalty @work.late_penalty if @homework.allow_late
|
|
|
|
|
json.cost_time @work.myshixun.try(:total_spend_time)
|
|
|
|
@ -91,7 +91,7 @@ if @homework.homework_type == "practice"
|
|
|
|
|
|
|
|
|
|
json.student_works @student_works.each do |work|
|
|
|
|
|
json.(work, :id, :update_time, :ultimate_score, :myshixun_id)
|
|
|
|
|
myshixun = work.myshixun || @shixun.find_by(user_id: work.user_id)
|
|
|
|
|
myshixun = work.myshixun || @shixun.myshixuns.find_by(user_id: work.user_id)
|
|
|
|
|
|
|
|
|
|
json.late_penalty work.late_penalty if @homework.allow_late
|
|
|
|
|
json.work_score work_score_format(work.work_score, @current_user == work.user, @score_open)
|
|
|
|
|