From 94abdac63563fe300851aa623d4484fa35d637f3 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 28 Jun 2019 13:44:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 4bc69dd5..c35b7911 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1176,19 +1176,19 @@ class CoursesController < ApplicationController def export_course_member_excel q = params[:name] ? "#{params[:name].strip}" : "" - filename="#{@course.teacher.show_real_name.to_s }_#{@course.name}_#{l(:excel_member_list)}"; - if params[:group_id] && params[:group_id] != "0" && params[:group_id] != "-1" - group = CourseGroup.find params[:group_id] - unless group.nil? - @all_members = searchmember_by_name(student_homework_score(group.id,0,0,"desc"), q) - filename="#{@course.teacher.show_real_name.to_s }_#{@course.name}_#{group.name}_#{l(:excel_member_list)}" - end - elsif params[:group_id] && params[:group_id] == "0" - @all_members = searchmember_by_name(student_homework_score(-1, 0, 10,"desc"), q) - filename="#{@course.teacher.show_real_name.to_s }_#{@course.name}_未分班_#{l(:excel_member_list)}" - else - @all_members = searchmember_by_name(student_homework_score(0, 0, 10,"desc"), q) - end + filename="#{@course.teacher.show_real_name.to_s }_#{@course.name}_#{l(:excel_member_list)}" + # if params[:group_id] && params[:group_id] != "0" && params[:group_id] != "-1" + # group = CourseGroup.find params[:group_id] + # unless group.nil? + # @all_members = searchmember_by_name(student_homework_score(group.id,0,0,"desc"), q) + # filename="#{@course.teacher.show_real_name.to_s }_#{@course.name}_#{group.name}_#{l(:excel_member_list)}" + # end + # elsif params[:group_id] && params[:group_id] == "0" + # @all_members = searchmember_by_name(student_homework_score(-1, 0, 10,"desc"), q) + # filename="#{@course.teacher.show_real_name.to_s }_#{@course.name}_未分班_#{l(:excel_member_list)}" + # else + # @all_members = searchmember_by_name(student_homework_score(0, 0, 10,"desc"), q) + # end @homeworks = @course.homework_commons.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc") @exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")