|
|
|
@ -514,6 +514,9 @@ class ExercisesController < ApplicationController
|
|
|
|
|
if exercise_group.present? && (exercise_group.first.publish_time < Time.now) && (exercise_publish_time != exercise_group.first.publish_time)
|
|
|
|
|
error_count += 1
|
|
|
|
|
end
|
|
|
|
|
if exercise_group.present? && (exercise_group.first.publish_time < Time.now && exercise_group.first.end_time > Time.now) && (exercise_end_time < Time.now)
|
|
|
|
|
error_count += 1
|
|
|
|
|
end
|
|
|
|
|
if error_count == 0
|
|
|
|
|
common_group = exercise_groups_ids & course_id #传入的班级与问卷已存在的班级的交集,即表示已有分班的
|
|
|
|
|
new_group_ids = course_id - common_group #新传入的班级id
|
|
|
|
|