个人主页的加入课程为-1
This commit is contained in:
parent
987a8da994
commit
74c50e155a
|
@ -335,7 +335,7 @@ module UsersHelper
|
|||
return Course.where("tea_id = ?",user.id).count()
|
||||
end
|
||||
def get_join_course_count(user)
|
||||
return user.coursememberships.count() - get_create_course_count(user)
|
||||
((user.coursememberships.count() - get_create_course_count(user)) < 0) ? 0 : user.coursememberships.count() - get_create_course_count(user)
|
||||
end
|
||||
def get_homework_commons_count(user)
|
||||
return HomeworkCommon.where("user_id = ?",user.id).count()
|
||||
|
|
Loading…
Reference in New Issue