diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index f83a5657f..8eab83fef 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -199,6 +199,7 @@ class CoursesController < ApplicationController end def searchmembers + @subPage_title = l :label_student_list @render_file = 'member_list' @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' @is_remote = true @@ -211,6 +212,7 @@ class CoursesController < ApplicationController end def addgroups + @subPage_title = l :label_student_list if params[:group_name] group = CourseGroup.new group.name = params[:group_name] @@ -225,6 +227,7 @@ class CoursesController < ApplicationController end def updategroupname + @subPage_title = l :label_student_list if params[:group_name] group = CourseGroup.find(params[:group_id]) group.name = params[:group_name] @@ -237,6 +240,7 @@ class CoursesController < ApplicationController @course_groups = @course.course_groups end def join_group + @subPage_title = l :label_student_list group = CourseGroup.find(params[:object_id]) member = Member.where(:course_id => @course.id, :user_id => User.current.id).first member.course_group_id = group.id @@ -248,6 +252,7 @@ class CoursesController < ApplicationController search_group_members group end def unjoin_group + @subPage_title = l :label_student_list group = CourseGroup.find(params[:object_id]) member = Member.where(:course_id => @course.id, :user_id => User.current.id).first member.course_group_id = 0 @@ -259,6 +264,7 @@ class CoursesController < ApplicationController search_group_members group end def searchgroupmembers + @subPage_title = l :label_student_list @render_file = 'member_list' @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' @is_remote = true @@ -273,6 +279,7 @@ class CoursesController < ApplicationController @results = paginateHelper @results end def search_group_members group + @subPage_title = l :label_student_list @render_file = 'member_list' @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' @is_remote = true diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index 6de228fd2..b7a3926f8 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -5,12 +5,13 @@ <% end %>    <%= l(:label_current_group)%>: <%= @group.name %> <% end %> + <% if @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"%> <%= submit_tag l(:label_search), :class => "f_2"%> <%#= link_to l(:label_search),'' , :class => 'f_2' %> <% end %> - + <% end %>
<% if members.any? %>