Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: app/views/courses/_member_list.html.erb
This commit is contained in:
commit
060b856b23
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue