From f2cfa6d4a1489232a6c6697dac63051866def00e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 5 Dec 2014 11:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B=E8=80=81?= =?UTF-8?q?=E5=B8=88=E3=80=81=E5=AD=A6=E7=94=9F=E6=95=B0=E9=87=8F=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=BA=E5=AE=9E=E9=99=85=E6=95=B0=E5=AD=97=EF=BC=8C?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AF+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index d06bf7d38..d2b92c6e1 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -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