搜素学生后内容清空

This commit is contained in:
sw 2015-03-26 10:25:54 +08:00
parent 41b4d96173
commit cfe487e217
3 changed files with 16 additions and 27 deletions

View File

@ -274,7 +274,7 @@ class CoursesController < ApplicationController
end
def searchgroupmembers
@subPage_title = l :label_student_list
@render_file = 'member_list'
@render_file = 'new_member_list'
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@score_sort_by = "desc"
@ -293,7 +293,7 @@ class CoursesController < ApplicationController
## 有角色参数的才是课程,没有的就是项目
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
@render_file = 'member_list'
@render_file = 'new_member_list'
@score_sort_by = "desc"
@canShowCode = User.current.allowed_to?(:as_teacher,@course) && params[:role] != '1'
@role = params[:role].nil? ? '2':params[:role]
@ -337,7 +337,7 @@ class CoursesController < ApplicationController
def member_score_sort
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@subPage_title = l :label_student_list
@render_file = 'member_list'
@render_file = 'new_member_list'
@is_remote = true
@score_sort_by = params[:sort_by] if params[:sort_by]
@search_name = params[:search_name] if params[:search_name]
@ -842,7 +842,7 @@ class CoursesController < ApplicationController
#当加入,退出分班时查询分班的学生
def search_group_members group
@subPage_title = l :label_student_list
@render_file = 'member_list'
@render_file = 'new_member_list'
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@score_sort_by = "desc"

View File

@ -1,16 +1,6 @@
<div class="st_list">
<div class="st_search">
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true,:id => "search_student") do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 'st_search_input', :placeholder => '输入学生姓名、学号进行搜索'%>
<% if @group %>
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
<input type="hidden" name="ingroup">
<% else %>
<input type="hidden" name="incourse">
<% end %>
<% end %>
<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>
<%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'),:class=>'xls'%>
<div class="st_search" id="search_members">
<%= render :partial => 'searchmembers' %>
</div>
<div class="cl"></div>

View File

@ -1,12 +1,11 @@
<% if @subPage_title && @subPage_title == l(:label_student_list)%>
<%= 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; float: left;"%>
<% if @group %>
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
<%= submit_tag l(:label_search_member), :name => "ingroup",:class => "f_2", :style => "float: left "%>
<% else %>
<%= submit_tag l(:label_search_member),:style => "float: left", :name => 'incourse',:onclick => "checkclass('group_name_0')",:class => "f_2"%>
<% end %>
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true,:id => "search_student") do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 'st_search_input', :placeholder => '输入学生姓名、学号进行搜索'%>
<% if @group %>
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
<input type="hidden" name="ingroup">
<% else %>
<input type="hidden" name="incourse">
<% end %>
<%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'),:class=>'xls'%>
<% end %>
<% end %>
<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>
<%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'),:class=>'xls'%>