|
|
|
@ -680,8 +680,9 @@ class ExerciseQuestionsController < ApplicationController
|
|
|
|
|
normal_status(-1,"已发布/已截止,不允许增删答案!")
|
|
|
|
|
elsif standard_answer.present?
|
|
|
|
|
if @exercise_question.question_type == Exercise::COMPLETION
|
|
|
|
|
exercise_answers_text = standard_answer.map{|a| a[:answer_text]}.sum.uniq
|
|
|
|
|
unless (standard_answer.count == exercise_choice_ids.count) && (standard_answers_text.count == exercise_answers_text.count)
|
|
|
|
|
# exercise_answers_text = standard_answer.map{|a| a[:answer_text]}.sum.uniq
|
|
|
|
|
# unless (standard_answer.count == exercise_choice_ids.count) && (standard_answers_text.count == exercise_answers_text.count)
|
|
|
|
|
unless standard_answer.count == exercise_choice_ids.count
|
|
|
|
|
normal_status(-1,"已发布/已截止,不允许增删标准答案!")
|
|
|
|
|
end
|
|
|
|
|
elsif @exercise_question.question_type == Exercise::SUBJECTIVE
|
|
|
|
|