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