分组作业添加成员

This commit is contained in:
cxt 2016-09-06 17:51:13 +08:00
parent e2aef37114
commit 7b2ce93acc
1 changed files with 1 additions and 1 deletions

View File

@ -1126,7 +1126,7 @@ class StudentWorkController < ApplicationController
end
all_students = User.where("id in #{all_student_ids}")
student_work_id = @homework.student_work_projects.where("user_id=? and student_work_id is not null",User.current.id).first.nil? ? -1 : @homework.student_work_projects.where("user_id=?",User.current.id).first.student_work_id
@commit_student_ids = @homework.student_works.has_committed.where("id != #{student_work_id}").map{|student| student.user_id}
@commit_student_ids = @homework.student_works.where("id != #{student_work_id}").map{|student| student.user_id}
@users = searchstudent_by_name all_students,name
respond_to do |format|
format.js