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

dev_forum
cxt 5 years ago
commit 5b4d9e17d3

@ -51,9 +51,8 @@ class GamesController < ApplicationController
# 统计评测时间
record_onsume_time = EvaluateRecord.where(game_id: @game.id).first.try(:consume_time)
# power判断用户是否有权限查看隐藏测试集(TPM管理员平台认证的老师花费金币查看者)
# myshixun_manager
myshixun_manager = current_user.manager_of_shixun?(@shixun) || (current_user.is_teacher? && current_user.pro_certification?)
# myshixun_manager判断用户是否有权限查看隐藏测试集(TPM管理员平台认证的老师花费金币查看者)
myshixun_manager = @identity < USER::EDU_GAME_MANAGER
# 选择题和编程题公共部分
@base_date = {st: @st, discusses_count: discusses_count, game_count: game_count, myshixun: @myshixun,

@ -635,7 +635,7 @@ class ShixunsController < ApplicationController
end
page = params[:page] || 1
limit = params[:limit] || 20
@total_count = @users.count
@user_count = @users.count
@users = @users.page(page).per(limit)
end

@ -1,8 +1,11 @@
#json.partial! "users/users_list", users: @users
json.total_count @total_count
json.user_count @user_count
json.users do
json.array! @users do |user|
json.user_id user.id
json.identify user.identity
json.nickname user.lastname
json.nickname user.real_name
json.school_name user.school_name
end
end

Loading…
Cancel
Save