@ -195,7 +195,6 @@ class HomeworkCommonsController < ApplicationController
end
if params[:format] == "xlsx"
@work_excel = @work_excel.includes(:student_works_scores, user: :user_extension, myshixun: :games)
complete_works = @work_excel.present? ? @work_excel.where("work_status > 0").size : 0
if @user_course_identity >= Course::STUDENT
tip_exception(403, "无权限操作")
@ -109,11 +109,11 @@ class ZipsController < ApplicationController
work_status = params[:work_status]
group_id = params[:course_group]
if work_status.present?
unless work_status.blank?
@all_student_works = @all_student_works.where(work_status:work_status)
if group_id.present?
unless group_id.blank?
group_user_ids = @course.students.where(course_group_id: params[:course_group]).pluck(:user_id)
@all_student_works = @all_student_works.where(user_id: group_user_ids)