|
|
|
@ -508,15 +508,14 @@ module ExercisesHelper
|
|
|
|
|
current_user_group_name = course_group.first.name if course_group.present?
|
|
|
|
|
end
|
|
|
|
|
teacher_review = ex_user.subjective_score < 0.0 ? false : true
|
|
|
|
|
if ex_user_exercise_status != 3 || commit_status != 1 #试卷未截止或用户未提交
|
|
|
|
|
# if (user_status != 0 && ex_user_exercise_status != 3)|| commit_status == 0 #不为教师,且试卷未截止;当前用户未提交 不显示分数
|
|
|
|
|
ex_object_score = nil
|
|
|
|
|
ex_subject_score = nil
|
|
|
|
|
score = nil
|
|
|
|
|
else
|
|
|
|
|
if (user_status == 0 && commit_status == 1) || (user_status == 1 && ex_user_exercise_status == 3 && commit_status == 1) #老师都可以看,学生,需在试卷已提交,且已截止的情况下看
|
|
|
|
|
ex_object_score = ex_user.objective_score < 0.0 ? 0.0 : ex_user.objective_score.round(1).to_s
|
|
|
|
|
ex_subject_score = ex_user.subjective_score < 0.0 ? nil : ex_user.subjective_score.round(1).to_s
|
|
|
|
|
score = ex_user.score.present? ? ex_user.score.round(1).to_s : 0.0.to_s
|
|
|
|
|
else
|
|
|
|
|
ex_object_score = nil
|
|
|
|
|
ex_subject_score = nil
|
|
|
|
|
score = nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|