dev_forum
cxt 6 years ago
parent aaf492e34a
commit 7d50b915cb

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

Loading…
Cancel
Save