修正课程成员搜索bug
This commit is contained in:
parent
db1cd8851c
commit
4b3621905e
|
@ -240,21 +240,10 @@ class CoursesController < ApplicationController
|
||||||
@subPage_title = l :label_student_list
|
@subPage_title = l :label_student_list
|
||||||
@render_file = 'member_list'
|
@render_file = 'member_list'
|
||||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||||
|
|
||||||
case params[:role]
|
|
||||||
when '1'
|
|
||||||
@subPage_title = l :label_teacher_list
|
|
||||||
#@members = searchTeacherAndAssistant(@course)
|
|
||||||
when '2'
|
|
||||||
@subPage_title = l :label_student_list
|
|
||||||
#@members = searchStudent(@course)
|
|
||||||
else
|
|
||||||
@subPage_title = ''
|
|
||||||
#@members = @course.member_principals.includes(:roles, :principal).all.sort
|
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@score_sort_by = "desc"
|
@score_sort_by = "desc"
|
||||||
q = "#{params[:name].strip}"
|
q = "#{params[:name].strip}"
|
||||||
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||||
if params[:incourse]
|
if params[:incourse]
|
||||||
@results = searchmember_by_name(student_homework_score(0,0,0,"desc"), q)
|
@results = searchmember_by_name(student_homework_score(0,0,0,"desc"), q)
|
||||||
|
|
||||||
|
@ -266,14 +255,6 @@ class CoursesController < ApplicationController
|
||||||
@result_count = @results.count
|
@result_count = @results.count
|
||||||
@results = paginateHelper @results
|
@results = paginateHelper @results
|
||||||
|
|
||||||
cs = CoursesService.new
|
|
||||||
@members = cs.course_teacher_or_student_list(params,@course,User.current)
|
|
||||||
@members = paginateHelper @members
|
|
||||||
render :layout => 'base_courses'
|
|
||||||
end
|
|
||||||
if e.message == '403'
|
|
||||||
render_403
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def addgroups
|
def addgroups
|
||||||
|
|
Loading…
Reference in New Issue