dev_chen
cxt 5 years ago
parent 278cec416d
commit 075d40bf14

@ -83,7 +83,7 @@ class ExaminationBanksController < ApplicationController
end
def send_to_course
tip_exception(403, "无权限") unless @exam.public || @exam.user == current_user
# tip_exception(403, "无权限") unless @exam.public || @exam.user == current_user
course = Course.find params[:course_id]
exercise = Exercise.new(user_id: current_user.id, course_id: course.id)
exercise = ExaminationBanks::SendToCourseService.call(@exam, exercise)

@ -340,6 +340,12 @@ class ExerciseQuestionsController < ApplicationController
@exercise_question.question_score = question_score
@exercise_question.shixun_name = shixun_name
@exercise_question.save!
# elsif @exercise_question.question_type == Exercise::PROGRAM
# question_score = 0
# shixun_name = params[:shixun_name] || @exercise_question.shixun_name
# @exercise_question.question_score = question_score
# @exercise_question.shixun_name = shixun_name
# @exercise_question.save!
end
#当试卷已发布时(试卷的总状态),当标准答案修改时,如有已提交的学生,需重新计算分数.

Loading…
Cancel
Save