From d8d84738112561cd02e40575c6870919a161fa47 Mon Sep 17 00:00:00 2001
From: nwb
Date: Mon, 21 Jul 2014 13:52:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=BE=E7=A8=8B=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=88=90=E5=91=98=E6=95=B0=E8=AE=A1=E7=AE=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/courses_helper.rb | 6 +++---
app/views/courses/_course.html.erb | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index e971970bc..84aff1c25 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -26,11 +26,11 @@ module CoursesHelper
end
# 返回学生数量,即roles表中定义的Reporter
- def studentCount project
- searchStudent(project).count
+ #def studentCount project
+ # searchStudent(project).count
# or
# searchStudent(project).count
- end
+ # end
# 判断用户是否是课程的管理员
# add by nwb
diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb
index 6b720229a..8e1a7950d 100644
--- a/app/views/courses/_course.html.erb
+++ b/app/views/courses/_course.html.erb
@@ -43,7 +43,8 @@
<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %>
- <%= content_tag('span', l(:label_x_member, :count => @course.members.count)) %>
+ <%#= content_tag('span', l(:label_x_member, :count => @course.members.count)) %>
+ <%= content_tag('span', l(:label_x_member, :count => studentCount(@course)+teacherCount(@course))) %>