作业的状态过滤

chromesetting
cxt 5 years ago
parent 9c3bff5e9f
commit 3130adbb31

@ -167,7 +167,11 @@ class HomeworkCommonsController < ApplicationController
if params[:work_status].present?
params_work_status = params[:work_status]
work_status = params_work_status.map{|status| status.to_i}
@student_works = @student_works.where(compelete_status: work_status)
if @homework.homework_type == "practice"
@student_works = @student_works.where(compelete_status: work_status)
else
@student_works = @student_works.where(work_status: work_status)
end
end
# 分班情况

Loading…
Cancel
Save