From 2f187e1a84884a57edec55d56a698125d06e43e2 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Mon, 19 Aug 2019 11:28:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=9A=84=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=95=8A=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercise_questions_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #当试卷已发布时(试卷的总状态),当标准答案修改时,如有已提交的学生,需重新计算分数.