From 97ffdc47dfa2949ba2f4ca008a469f6d8ff1d0a2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 25 Jun 2019 14:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E9=80=89=E7=94=A8=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E6=B2=A1=E4=BF=9D=E5=AD=98=E5=AE=9E=E8=AE=AD=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/question_banks_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/question_banks_controller.rb b/app/controllers/question_banks_controller.rb index bf55db9dd..0a999e1f3 100644 --- a/app/controllers/question_banks_controller.rb +++ b/app/controllers/question_banks_controller.rb @@ -178,6 +178,7 @@ class QuestionBanksController < ApplicationController :question_type => q.question_type || 1, :question_number => q.question_number, :question_score => q.question_score, + :shixun_name => q.shixun_name, :shixun_id => q.shixun_id } exercise_question = new_exercise.exercise_questions.new option @@ -190,7 +191,8 @@ class QuestionBanksController < ApplicationController # 复制标准答案(填空题和问答题) 多空填空题的话,应该是原标准答案的exercise_choice_id,即为题空的位置。 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 else # 复制实训题