From bc06f54ce92ea73c9434fd4258713b6134c4c8f0 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 2 Sep 2019 16:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercises_controller.rb | 1 + app/controllers/graduation_tasks_controller.rb | 1 + app/controllers/polls_controller.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 5db704fce..3be35345e 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -354,6 +354,7 @@ class ExercisesController < ApplicationController # question_bank = QuestionBank.new ques_params # question_bank.save # end + exercise.update_attributes!(exercise_bank_id: current_ex_bank.id) end # 试卷的问题的输入 exercise.exercise_questions.each do |q| diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index 727bdb77e..fe7511e29 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -301,6 +301,7 @@ class GraduationTasksController < ApplicationController course_list_id: @course.course_list_id) task_bank.save! + task.update_attributes!(gtask_bank_id: task_bank.id) end task.attachments.each do |attachment| att = attachment.copy diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index bc549cf1d..7cb7ee800 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -562,6 +562,7 @@ class PollsController < ApplicationController question_bank = QuestionBank.new ques_params question_bank.save end + poll.update_attributes!(exercise_bank_id: current_ex_bank.id) end # 问卷的问题的输入 poll.poll_questions.each do |f|