dev_bj
daiao 5 years ago
parent 6b13b450b1
commit c91c3b9574

@ -17,6 +17,7 @@ class GamesService
myshixun = Myshixun.min.find(game.myshixun_id) myshixun = Myshixun.min.find(game.myshixun_id)
shixun = Shixun.min.find(myshixun.shixun_id) shixun = Shixun.min.find(myshixun.shixun_id)
logger.info("#########container: #{shixun_container_limit(shixun)}")
unless ((myshixun.user_id == current_user.id || current_user.business? || current_user.id == shixun.try(:user_id) || unless ((myshixun.user_id == current_user.id || current_user.business? || current_user.id == shixun.try(:user_id) ||
current_user.is_certification_teacher) && (shixun.operable?)) || current_user.admin? current_user.is_certification_teacher) && (shixun.operable?)) || current_user.admin?
Rails.logger.info("######403???") Rails.logger.info("######403???")
@ -532,8 +533,6 @@ class GamesService
shixun = Shixun.select([:id, :evaluate_script, :webssh, :exec_time, :sigle_training, :identifier, :status]).find(myshixun.shixun_id) shixun = Shixun.select([:id, :evaluate_script, :webssh, :exec_time, :sigle_training, :identifier, :status]).find(myshixun.shixun_id)
game_challenge = Challenge.select([:id, :position, :picture_path]).find(game.challenge_id) game_challenge = Challenge.select([:id, :position, :picture_path]).find(game.challenge_id)
logger.info("#########container: #{shixun_container_limit(shixun)}")
# 更新评测次数 # 更新评测次数
game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1)) game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1))
# 清空代码评测信息 # 清空代码评测信息

Loading…
Cancel
Save