实训作业作品列表调整

chromesetting
cxt 5 years ago
parent 0641332a59
commit 3a91fd077c

@ -559,6 +559,7 @@ class StudentWorksController < ApplicationController
if @work.work_status == 0
@work.work_status = 1
@work.commit_time = Time.now
@work.compelete_status = 1 if @homework.homework_type == "practice"
# 分组作业更新分组id
@work.group_id = @homework.max_group_id if @homework.homework_type == "group"
end

@ -43,7 +43,7 @@ elsif @user_course_identity == Course::STUDENT
json.eff_score work_score_format(@work.eff_score, true, @score_open)
json.current_complete_count @work.myshixun.try(:passed_count) if @homework.end_or_late
json.complete_count @work.myshixun&.time_passed_count(@homework.homework_group_setting(@work.user_id)&.end_time)
json.view_answer_count @work.myshixun.try(:view_answer_count)
json.view_answer_count @work.myshixun.try(:view_answer_count).to_i
json.work_status @work.compelete_status
else
json.(@work, :id, :work_status, :update_time, :ultimate_score)
@ -100,7 +100,7 @@ if @homework.homework_type == "practice"
json.cost_time work.myshixun.try(:total_spend_time)
json.current_complete_count work.myshixun.try(:passed_count) if @homework.end_or_late
json.complete_count work.myshixun&.time_passed_count(@homework.homework_group_setting(work.user_id)&.end_time)
json.view_answer_count work.myshixun.try(:view_answer_count)
json.view_answer_count work.myshixun.try(:view_answer_count).to_i
json.user_login work.user.try(:login)
json.user_name work.user.try(:real_name)
json.student_id work.user.try(:student_id)

Loading…
Cancel
Save