|
|
|
@ -350,8 +350,9 @@ class ExerciseQuestionsController < ApplicationController
|
|
|
|
|
@exercise_question.shixun_name = shixun_name
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#当标准答案修改时,如有已提交的学生,需重新计算分数
|
|
|
|
|
if st_count > 0
|
|
|
|
|
#当试卷已发布时(试卷的总状态),当标准答案修改时,如有已提交的学生,需重新计算分数.
|
|
|
|
|
|
|
|
|
|
if @exercise.exercise_status == 2
|
|
|
|
|
ex_users_committed = @exercise.exercise_users.exercise_user_committed
|
|
|
|
|
if ex_users_committed.size > 0
|
|
|
|
|
ex_users_committed.each do |ex_user|
|
|
|
|
@ -587,15 +588,15 @@ class ExerciseQuestionsController < ApplicationController
|
|
|
|
|
if @exercise_question.present?
|
|
|
|
|
@exercise = @exercise_question.exercise
|
|
|
|
|
if @exercise.blank?
|
|
|
|
|
tip_exception(404)
|
|
|
|
|
tip_exception(404,"试卷不存在")
|
|
|
|
|
else
|
|
|
|
|
@course = @exercise.course
|
|
|
|
|
if @course.blank?
|
|
|
|
|
tip_exception(404)
|
|
|
|
|
tip_exception(404,"课堂不存在")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
tip_exception(404)
|
|
|
|
|
tip_exception(404,"试卷问题不存在")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|