Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_auth
cxt 5 years ago
commit 61e4185fb3

@ -44,6 +44,12 @@ class Competitions::CompetitionsController < Competitions::BaseController
def common_header
@competition = current_competition
@competition_modules = @competition.unhidden_competition_modules
# 未登录、未获奖用户,不展示获奖证书栏目
if !current_user.logged? || !current_competition.finished? || !current_competition.competition_prize_users.exists?(user: current_user)
@competition_modules = @competition_modules.select { |mod| mod.name != '获奖证书' }
end
@user = current_user
current_competition.increment!(:visits)

Loading…
Cancel
Save