|
|
|
@ -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,
|
|
|
|
|