From 6a887e21e3b1507ee5eee75fa72fad5ca2075e57 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 21 Jun 2019 16:01:19 +0800 Subject: [PATCH] =?UTF-8?q?D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_works_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index 9eec32521..aa0a0f171 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -44,7 +44,7 @@ class StudentWorksController < ApplicationController # 统一设置的作业取所有学生,否则取已发布的分班学生 students = @homework.unified_setting? ? @course.students : @course.students.where(course_group_id: @homework.published_settings.pluck(:course_group_id)) unless params[:search].blank? - @members = students.joins(user: :user_extension).where("user_id != #{current_user.id} and (concat(users.lastname, users.firstname) + @members = students.joins(user: :user_extension).where("course_members.user_id != #{current_user.id} and (concat(users.lastname, users.firstname) like ? or user_extensions.student_id like ?)", "%#{params[:search]}%", "%#{params[:search]}%") else