diff --git a/app/services/cnmoocs_service.rb b/app/services/cnmoocs_service.rb index 40f75a8c..33f166da 100644 --- a/app/services/cnmoocs_service.rb +++ b/app/services/cnmoocs_service.rb @@ -7,7 +7,7 @@ class CnmoocsService limit = params[:pageSize] || 16 offset = page * limit.to_i shixuns = Shixun.select([:id, :identifier, :name, :myshixuns_count, :averge_star, :challenges_count, :trainee]). - where(status: 0, hidden: 0) + where(status: 2, hidden: 0) shixun_count = shixuns.count pageCount = ((shixun_count / limit.to_f) == (shixun_count / limit)) ? (shixun_count / limit) : ((shixun_count / limit) + 1) Rails.logger.info("#####{pageCount}")