parent
b5d007ccf7
commit
03a8d8ccc9
|
@ -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
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
<% end %>
|
||||
<span style="font-size: 18px; float: left; margin-right: 35px"><%= l(:label_current_group)%>: <%= @group.name %></span>
|
||||
<% 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 %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if members.any? %>
|
||||
|
|
Loading…
Reference in New Issue