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