|
|
@ -178,22 +178,19 @@ class CoursesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
def searchmembers
|
|
|
|
def searchmembers
|
|
|
|
@subPage_title = l :label_student_list
|
|
|
|
@subPage_title = l :label_student_list
|
|
|
|
@render_file = 'member_list'
|
|
|
|
@canShowCode = User.current.allowed_to?(:as_teacher,@course) && params[:role] != '1'
|
|
|
|
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
|
|
|
# @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?
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
elsif params[:ingroup]
|
|
|
|
elsif params[:ingroup]
|
|
|
|
@group = CourseGroup.find(params[:search_group_id])
|
|
|
|
@group = CourseGroup.find(params[:search_group_id])
|
|
|
|
@results = searchmember_by_name(student_homework_score(@group.id,0,0,"desc"), q)
|
|
|
|
results = searchmember_by_name(student_homework_score(@group.id,0,0,"desc"), q)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@is_remote = true
|
|
|
|
@is_remote = true
|
|
|
|
@result_count = @results.count
|
|
|
|
@result_count = results.count
|
|
|
|
@results = paginateHelper @results, 10
|
|
|
|
@results = paginateHelper results, 10
|
|
|
|
@search_name = q
|
|
|
|
@search_name = q
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|