试卷选用题库没保存实训名称

dev_course
daiao 5 years ago
parent dcec641b5b
commit 97ffdc47df

@ -178,6 +178,7 @@ class QuestionBanksController < ApplicationController
:question_type => q.question_type || 1, :question_type => q.question_type || 1,
:question_number => q.question_number, :question_number => q.question_number,
:question_score => q.question_score, :question_score => q.question_score,
:shixun_name => q.shixun_name,
:shixun_id => q.shixun_id :shixun_id => q.shixun_id
} }
exercise_question = new_exercise.exercise_questions.new option exercise_question = new_exercise.exercise_questions.new option
@ -190,7 +191,8 @@ class QuestionBanksController < ApplicationController
# 复制标准答案(填空题和问答题) 多空填空题的话应该是原标准答案的exercise_choice_id即为题空的位置。 # 复制标准答案(填空题和问答题) 多空填空题的话应该是原标准答案的exercise_choice_id即为题空的位置。
q.exercise_bank_standard_answers.try(:each) do |answer| q.exercise_bank_standard_answers.try(:each) do |answer|
exercise_question.exercise_standard_answers.new({exercise_choice_id: answer.exercise_bank_choice_id, answer_text: answer.answer_text}) exercise_question.exercise_standard_answers.new({exercise_choice_id: answer.exercise_bank_choice_id,
answer_text: answer.answer_text})
end end
else else
# 复制实训题 # 复制实训题

Loading…
Cancel
Save