|
|
|
@ -280,11 +280,12 @@ class ExerciseQuestionsController < ApplicationController
|
|
|
|
|
if null_choice_text_count >= ex_answer_pre_count
|
|
|
|
|
new_add_choice = null_choice_text_count_array - ex_answer_pre_count_array
|
|
|
|
|
ex_answer_pre_count_array.each do |n|
|
|
|
|
|
standard_option = {
|
|
|
|
|
:exercise_question_id => @exercise_question.id,
|
|
|
|
|
:exercise_choice_id => null_choice_id,
|
|
|
|
|
:answer_text => null_choice_text[n-1]
|
|
|
|
|
@hash_symbol_null_ = {
|
|
|
|
|
:exercise_question_id => @exercise_question.id,
|
|
|
|
|
:exercise_choice_id => null_choice_id,
|
|
|
|
|
:answer_text => null_choice_text[n - 1]
|
|
|
|
|
}
|
|
|
|
|
standard_option = @hash_symbol_null_
|
|
|
|
|
ex_answer_pre[n-1].update(standard_option)
|
|
|
|
|
end
|
|
|
|
|
if new_add_choice.count > 0 #表示有新增的
|
|
|
|
|