diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 71da15386..324e5bde3 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -110,9 +110,9 @@ class AccountsController < ApplicationController if user.save! sucess_status end - # rescue Exception => e - # uid_logger_error(e.message) - # tip_exception("密码重置失败,请稍后再试") + rescue Exception => e + uid_logger_error(e.message) + tip_exception("密码重置失败") end end diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index fc9c8df45..6bf3d2f8a 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -78,10 +78,10 @@ class GraduationTasksController < ApplicationController # 教师评阅搜索 0: 未评, 1 已评 unless params[:teacher_comment].blank? graduation_work_ids = GraduationWorkScore.where(graduation_work_id: @work_list.map(&:id)).pluck(:graduation_work_id) - if params[:teacher_comment] == 0 - @work_list = @work_list.where.not(id: graduation_work_ids) - elsif params[:teacher_comment] == 1 - @work_list = @work_list.where(id: graduation_work_ids).where.not(work_status: 0) + if params[:teacher_comment].to_i == 0 + @work_list = @work_list.where("work_status != 0") + elsif params[:teacher_comment].to_i == 1 + @work_list = @work_list.where("work_status != 0").where(id: graduation_work_ids) end end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index f5a2436c9..99f6ca405 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -521,6 +521,8 @@ class ShixunsController < ApplicationController min_challenges = @shixun.challenges.pluck(:id , :st) + Rails.logger.info("11111111112#{current_myshixun.try(:id)}") + if current_myshixun games = current_myshixun.games # 如果TPM和TPI的管卡数不相等或者关卡顺序错了,说明实训被极大的改动,需要重置,实训发布前打过的实训都需要重置 @@ -827,5 +829,9 @@ private games.size != min_challenges.size || games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first} || modify_shixun + + Rails.logger.info("11111111113#{modify_shixun.try(:id)}") + Rails.logger.info("11111111114#{games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first}}") + Rails.logger.info("11111111115#{games.size != min_challenges.size}") end end diff --git a/app/services/concerns/elasticsearch_able.rb b/app/services/concerns/elasticsearch_able.rb index 59c2c890b..c1640470c 100644 --- a/app/services/concerns/elasticsearch_able.rb +++ b/app/services/concerns/elasticsearch_able.rb @@ -22,8 +22,6 @@ module ElasticsearchAble fragment_size: EduSetting.get('es_highlight_fragment_size') || 30, tag: '', fields: { - name: { type: 'plain' }, - subject: { type: 'plain' }, challenge_names: { type: 'plain' }, challenge_tag_names: { type: 'plain' }, description: { type: 'plain' }, diff --git a/config/sidekiq.yml b/config/sidekiq.yml index a2b3fc0be..1c7a4e2cd 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -3,4 +3,5 @@ :logfile: log/sidekiq.log :queues: - [default, 3] + - [searchkick, 10] - [notify, 100] \ No newline at end of file