试卷第一次调分评语没有出现

dev_cs
SylorHuang 5 years ago
parent f3f29b7a9c
commit cbf0d74eea

@ -525,7 +525,8 @@ class ExerciseQuestionsController < ApplicationController
:score => @c_score,
:answer_text => ""
}
ExerciseAnswer.create(answer_option)
ex_answers = ExerciseAnswer.new(answer_option)
ex_answers.save
ex_answer_old = 0
end
if ex_obj_score <= 0.0
@ -625,7 +626,7 @@ class ExerciseQuestionsController < ApplicationController
@exercise_current_user.update_attributes(ex_scores)
end
comments = params[:comment]
question_comment = @exercise_question.exercise_answer_comments.first
question_comment = @exercise_question.exercise_answer_comments&.first
if question_comment.present?
comment_option = {
:comment => comments.present? ? comments : question_comment.comment,

Loading…
Cancel
Save