diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index d5ebb4c05..61bce8b36 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -218,7 +218,7 @@ class CoursesController < ApplicationController @group = CourseGroup.find(params[:search_group_id]) @results =searchgroupmember_by_name(student_homework_score, @group, q) end - + @is_remote = true @result_count = @results.count @results = paginateHelper @results @@ -313,7 +313,7 @@ class CoursesController < ApplicationController else @results = student_homework_score end - @@result = @results + @members = searchStudent(@course) @membercount = @members.count @@ -328,6 +328,7 @@ class CoursesController < ApplicationController @teachers= searchTeacherAndAssistant(@course) @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' @role = params[:role] + @is_remote = false @course_groups = @course.course_groups if @course.course_groups @show_serch = params[:role] == '2' case params[:role] @@ -346,7 +347,7 @@ class CoursesController < ApplicationController @subPage_title = '' @members = @course.member_principals.includes(:roles, :principal).all.sort end - @@result = @members + @members = paginateHelper @members render :layout => 'base_courses' else @@ -356,19 +357,19 @@ class CoursesController < ApplicationController end def member_score_sort - @teachers= searchTeacherAndAssistant(@course) - @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' - @role = params[:role] - @course_groups = @course.course_groups if @course.course_groups - @show_serch = params[:role] == '2' - @subPage_title = l :label_student_list - @render_file = 'member_list' - - unless @@result.nil? - @results = @@result.reverse - @@result = @results - end - @results = paginateHelper @results + # @teachers= searchTeacherAndAssistant(@course) + # @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' + # @role = params[:role] + # @course_groups = @course.course_groups if @course.course_groups + # @show_serch = params[:role] == '2' + # @subPage_title = l :label_student_list + # @render_file = 'member_list' + # @results = params[:result] if params[:result] + # unless @result.nil? + # @results = @result.reverse + # + # end + # @results = paginateHelper @results end # 显示每个学生的作业评分详情 def show_member_score diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index 860c86ba4..7e6407aa5 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -3,9 +3,11 @@ var classname = document.getElementById(id).className if(classname == 'st_up') { document.getElementById(id).className = 'st_down' + } else document.getElementById(id).className = 'st_up' + }
diff --git a/app/views/courses/_searchmembers.html.erb b/app/views/courses/_searchmembers.html.erb new file mode 100644 index 000000000..426c52ca5 --- /dev/null +++ b/app/views/courses/_searchmembers.html.erb @@ -0,0 +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 %> + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/courses/member.html.erb b/app/views/courses/member.html.erb index 91d8badcc..313e50748 100644 --- a/app/views/courses/member.html.erb +++ b/app/views/courses/member.html.erb @@ -57,20 +57,10 @@ <%= stylesheet_link_tag 'course_group', :media => 'all' %>