课程成员搜索忽略大小写
This commit is contained in:
parent
ead0ffb2f4
commit
1598bf6b4d
|
@ -233,10 +233,10 @@ module CoursesHelper
|
|||
#searchPeopleByRoles(project, StudentRoles)
|
||||
mems = []
|
||||
if name != ""
|
||||
name = name.to_s.downcase
|
||||
members.each do |m|
|
||||
|
||||
username = m.user[:lastname].to_s + m.user[:firstname].to_s
|
||||
if(m.user[:login].to_s.include?(name) || m.user.user_extensions[:student_id].to_s.include?(name) || username.include?(name))
|
||||
username = m.user[:lastname].to_s.downcase + m.user[:firstname].to_s.downcase
|
||||
if(m.user[:login].to_s.downcase.include?(name) || m.user.user_extensions[:student_id].to_s.downcase.include?(name) || username.include?(name))
|
||||
mems << m
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue