Conflicts:
	app/views/courses/_member_list.html.erb
This commit is contained in:
sw 2014-12-06 13:46:42 +08:00
commit 060b856b23
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -217,6 +217,7 @@ class MembersController < ApplicationController
joined.each do |join|
join.delete
end
@member.course_group_id = 0
end
if role.allowed_to?(:is_manager)
@courseInfo = CourseInfos.new(:user_id => @member.user_id, :course_id => @course.id)