dev_forum
SylorHuang 5 years ago
parent 87f7cd3853
commit 0576924ab6

@ -636,7 +636,7 @@ module ExercisesHelper
exercise_answers = q.exercise_answers.search_exercise_answer("user_id",ex_answerer_id) #试卷用户的回答 exercise_answers = q.exercise_answers.search_exercise_answer("user_id",ex_answerer_id) #试卷用户的回答
end end
if student_status == 2 #当前为老师,或为学生且已提交 if student_status == 2 #当前为老师,或为学生且已提交
user_score_pre = exercise_answers.score_reviewed.pluck(:score).sum user_score_pre = exercise_answers.score_reviewed
user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : nil user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : nil
end end

Loading…
Cancel
Save