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