修改合并引起的bug

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-12-05 16:21:53 +08:00
parent a51d0e88dc
commit c5a7baa454
2 changed files with 18 additions and 9 deletions

View File

@ -217,6 +217,10 @@ class CoursesController < ApplicationController
group.course_id = @course.id
group.save
end
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@members = searchStudent(@course)
@membercount = @members.count
@course_groups = @course.course_groups
end
@ -228,6 +232,8 @@ class CoursesController < ApplicationController
end
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@members = searchStudent(@course)
@membercount = @members.count
@course_groups = @course.course_groups
end
def join_group
@ -236,7 +242,8 @@ class CoursesController < ApplicationController
member.course_group_id = group.id
member.save
@group = group
@members = searchStudent(@course)
@membercount = @members.count
search_group_members group
end
def unjoin_group
@ -245,7 +252,8 @@ class CoursesController < ApplicationController
member.course_group_id = 0
member.save
@group = group
@members = searchStudent(@course)
@membercount = @members.count
search_group_members group
end
def searchgroupmembers
@ -258,14 +266,16 @@ class CoursesController < ApplicationController
else
@results = searchStudent(@course)
end
@members = searchStudent(@course)
@membercount = @members.count
@results = paginateHelper @results
end
def search_group_members group
@render_file = 'member_list'
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@members = searchStudent(@course)
@membercount = @members.count
@results = searchStudent_by_group(group, @course)
@results = paginateHelper @results
end
@ -284,11 +294,10 @@ class CoursesController < ApplicationController
@members = searchTeacherAndAssistant(@course)
when '2'
@subPage_title = l :label_student_list
if @course_group_id
@members = search_student_in_group(@course, @course_group_id)
else
@members = searchStudent(@course)
end
@membercount = @members.count
else
@subPage_title = ''
@members = @course.member_principals.includes(:roles, :principal).all.sort

View File

@ -22,7 +22,7 @@
validate_groupname_null(value1);
document.getElementsByName('group_name')[0].value = "";
}
</script>"
</script>
<ul>