diff --git a/app/controllers/exercise_questions_controller.rb b/app/controllers/exercise_questions_controller.rb index 3718e18d5..52915a8ba 100644 --- a/app/controllers/exercise_questions_controller.rb +++ b/app/controllers/exercise_questions_controller.rb @@ -339,10 +339,11 @@ class ExerciseQuestionsController < ApplicationController @exercise_question.exercise_shixun_challenges.each_with_index do |challenge, index| challenge.question_score = params[:question_scores][index].to_f.round(1) challenge.save - question_score += challenge.question_score + question_score += params[:question_scores][index].to_f.round(1) end @exercise_question.question_score = question_score @exercise_question.shixun_name = shixun_name + @exercise_question.save end #当试卷已发布时(试卷的总状态),当标准答案修改时,如有已提交的学生,需重新计算分数.