优化课程列表成员数计算
This commit is contained in:
parent
3a249e7196
commit
d8d8473811
|
@ -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
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
</p>
|
||||
<p class="stats">
|
||||
<%= 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))) %>
|
||||
</p>
|
||||
|
||||
<!--gcm-->
|
||||
|
|
Loading…
Reference in New Issue