修改课程老师、学生数量显示为实际数字,而不是+

This commit is contained in:
sw 2014-12-05 11:30:19 +08:00
parent a64cae5da3
commit f2cfa6d4a1
1 changed files with 2 additions and 17 deletions

View File

@ -114,28 +114,13 @@ module CoursesHelper
# 学生人数计算
# add by nwb
def studentCount course
count = searchStudent(course).count#course.student.count
if count <= 5
result = count.to_s
elsif count < 10 && count > 5
result = "5+"
else
result = (count-count % 10).to_s + "+"
end
result
searchStudent(course).count.to_s#course.student.count
end
#课程成员数计算
def memberCount course
count = searchStudent(course).count + searchTeacherAndAssistant(course).count
if count <= 5
result = count.to_s
elsif count < 10 && count > 5
result = "5+"
else
result = (count-count % 10).to_s + "+"
end
result
count.to_s
end
def eventToLanguageCourse event_type, course