diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 788237444..326ae0f42 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -207,9 +207,9 @@ class CoursesController < ApplicationController
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
if params[:incourse]
@results = searchStudent_by_name(@course, q)
- else
- group = CourseGroup.find(params[:search_group_id])
- @results = searchgroupstudent_by_name(group, @course, q)
+ elsif params[:ingroup]
+ @group = CourseGroup.find(params[:search_group_id])
+ @results = searchgroupstudent_by_name(@group, @course, q)
end
@result_count = @results.count
@results = paginateHelper @results
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index bf3810030..a1199a55a 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -184,7 +184,7 @@ module CoursesHelper
end
members
end
- def searchgroupstudent_by_name(group, project, q)
+ def searchgroupstudent_by_name(group, project, name)
members = []
group.members.each do |m|
if m && m.user && m.user.allowed_to?(:as_student,project)
diff --git a/app/views/courses/_groups_name.html.erb b/app/views/courses/_groups_name.html.erb
index 68baa2ccd..ca0fed9c2 100644
--- a/app/views/courses/_groups_name.html.erb
+++ b/app/views/courses/_groups_name.html.erb
@@ -1,40 +1,4 @@
-
diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb
index b77d359d0..c6c20b542 100644
--- a/app/views/courses/_member_list.html.erb
+++ b/app/views/courses/_member_list.html.erb
@@ -9,10 +9,10 @@
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%>
<% if @group %>
- <%= hidden_field "#{@group.id}", params[:search_group_id], name: 'search_group_id' %>
- <%= submit_tag l(:label_search), :name => "ingroup",:class => "f_2"%>
+ <%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
+ <%= submit_tag l(:label_search_member_in_group), :name => "ingroup",:class => "f_2"%>
<% end %>
- <%= submit_tag l(:label_search), :name => 'incourse',:class => "f_2"%>
+ <%= submit_tag l(:label_search_member_in_course), :name => 'incourse',:onclick => "checkclass('group_name_0')",:class => "f_2"%>
<%#= link_to l(:label_search),'' , :class => 'f_2' %>
<% end %>
<% end %>
diff --git a/app/views/courses/member.html.erb b/app/views/courses/member.html.erb
index fb317acf6..b426e4a3e 100644
--- a/app/views/courses/member.html.erb
+++ b/app/views/courses/member.html.erb
@@ -1,3 +1,40 @@
+
<%= stylesheet_link_tag 'course_group', :media => 'all' %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index f7ff4374a..fccf78563 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -570,6 +570,8 @@ zh:
label_role_new: 新建角色
label_role_and_permissions: 角色和权限
label_member: 成员
+ label_search_member_in_group: 班内搜索
+ label_search_member_in_course: 课内搜索
label_search_member_count: 共搜索到
label_member_people: 人
label_delete_group: 确定删除分班?