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))) %>