From af2f6ae95e4581c1aeebfc76055911fb1c23ea28 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Wed, 3 Jul 2019 13:46:52 +0800 Subject: [PATCH] fix bug --- app/controllers/zips_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/zips_controller.rb b/app/controllers/zips_controller.rb index 984bef6d2..3b9fa7c02 100644 --- a/app/controllers/zips_controller.rb +++ b/app/controllers/zips_controller.rb @@ -101,14 +101,12 @@ class ZipsController < ApplicationController @course = @homework.course ##7。2 -hs新增 @member = @course.course_member(current_user.id) - @all_student_works = @homework.teacher_works(@member) + @all_student_works = @homework.teacher_works(@member).where("work_status > 0") work_status = params[:work_status] group_id = params[:course_group] - if work_status.present? && !work_status.include?(0) + if work_status.present? @all_student_works = @all_student_works.where(work_status:work_status) - elsif work_status.present? && work_status.include?(0) - normal_status(-1,"仅支持导出已提交的学生!") end if group_id.present?