diff --git a/app/views/exercise/_end_notice.html.erb b/app/views/exercise/_end_notice.html.erb index 25405aa3..fc273c3c 100644 --- a/app/views/exercise/_end_notice.html.erb +++ b/app/views/exercise/_end_notice.html.erb @@ -3,7 +3,6 @@ #popupWrap{left: 673.5px !important;} -
立即截止
diff --git a/db/migrate/20190419101132_update_exerise_user_end_at.rb b/db/migrate/20190419101132_update_exerise_user_end_at.rb index 79a64443..b64d1145 100644 --- a/db/migrate/20190419101132_update_exerise_user_end_at.rb +++ b/db/migrate/20190419101132_update_exerise_user_end_at.rb @@ -4,7 +4,12 @@ class UpdateExeriseUserEndAt < ActiveRecord::Migration exercise.exercise_group_settings.each do |group| if group.end_time.present? && group.end_time < Time.now user_ids = exercise.course.members.where(:course_group_id => group.course_group_id).map(&:user_id) - exercise.exercise_users.where(:commit_status => 1, :user_id => user_ids).update_all(:end_at => group.end_time) + if group.id == 1390 || group.id == 1387 # 黄颖 + exercise.exercise_users.where("end_at < '2019-04-19 01:08:00'").where(:commit_status => 1, :user_id => user_ids).update_all(:end_at => group.end_time) + elsif group.id == 1391 || group.id == 1389 # 黄颖 + exercise.exercise_users.where("end_at < '2019-04-19 02:58:00'").where(:commit_status => 1, :user_id => user_ids).update_all(:end_at => group.end_time) + end + end end end