From f83354dc9dd63fcc65a9a307c3c03dfa5c99b415 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 11 Mar 2020 21:33:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=9A=84=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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index cf67746ac..73bd07954 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -774,10 +774,11 @@ class ExercisesController < ApplicationController ex_group_setting = exercise.exercise_group_settings old_exercise_groups = ex_group_setting.find_in_exercise_group("course_group_id", g_course) #试卷的分组设置 left_course_groups = teacher_course_group_ids - g_course + all_left_groups = all_course_group_ids - g_course left_exercise_groups = ex_group_setting.find_in_exercise_group("course_group_id", left_course_groups) if left_exercise_groups.blank? && exercise.unified_setting - if left_course_groups.size > 0 #开始为统一设置,但是立即截止为分班。则创建没有立即截止的班级的exercise_group_setting - left_course_groups.each do |g| + if all_left_groups.size > 0 #开始为统一设置,但是立即截止为分班。则创建没有立即截止的班级的exercise_group_setting + all_left_groups.each do |g| ex_group_options = { :exercise_id => exercise.id, :course_group_id => g,