From c6470bc69b2b9abbb39b32bd4239fd7d24ad506c Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Dec 2015 15:31:15 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=88=86=E7=BB=84=E6=88=90=E5=91=98=E6=97=B6?= =?UTF-8?q?=E8=8B=A5=E6=9F=90=E4=B8=80=E4=B8=AA=E5=AD=A6=E7=94=9F=E5=B7=B2?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=88=B0=E5=85=B6=E4=BB=96=E5=88=86=E7=BB=84?= =?UTF-8?q?=E5=88=99=E4=B8=8D=E5=8F=AF=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 1 + app/views/student_work/search_course_students.js.erb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index f79646ade..86e521b55 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -687,6 +687,7 @@ class StudentWorkController < ApplicationController end all_student_ids = "(" + @homework.course.student.map{|student| student.student_id}.join(",") + ")" all_students = User.where("id in #{all_student_ids}") + @commit_student_ids = @homework.student_work_projects.map{|student| student.user_id} @users = searchstudent_by_name all_students,name respond_to do |format| format.js diff --git a/app/views/student_work/search_course_students.js.erb b/app/views/student_work/search_course_students.js.erb index fb595e51f..1cea9f27e 100644 --- a/app/views/student_work/search_course_students.js.erb +++ b/app/views/student_work/search_course_students.js.erb @@ -18,7 +18,7 @@ $("#all_students_list").empty(); } } } - <% if user.id.to_i != User.current.id.to_i %> + <% if user.id.to_i != User.current.id.to_i && (@commit_student_ids.find{|e| e.to_i == user.id.to_i}).nil? %> if (str.indexOf(<%=user.id.to_s %>) < 0) { $("#student_<%=user.id %>").one("click",function choose_student() { var li = "
  • + if (str.indexOf(<%=user.id.to_s %>) < 0) { + $("#student_<%=user.id %>").attr("title","该学生已加入其它分组"); + } <% end %> <% end %> \ No newline at end of file From 03318aac97d23e101926b693f2dc152e9d419a92 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 11 Dec 2015 15:36:59 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8D=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E4=BF=AE=E6=94=B9=E8=A6=81=E5=8F=98=E6=88=90=E7=81=B0?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index fa9171496..b95c8f049 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -30,7 +30,7 @@
  •