名师列表排序
This commit is contained in:
parent
6ccb79a210
commit
39c753fd25
|
@ -183,7 +183,8 @@ module OrganizationsHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def excellent_teachers
|
def excellent_teachers
|
||||||
User.where("excellent_teacher =?",true)
|
User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
||||||
|
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and u.excellent_teacher =1 order by course_count desc")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue