效果展示问题

dev_unstable^2
daiao 6 years ago
parent d04e9a1057
commit 8d7762d5e7

@ -176,6 +176,9 @@ class ChallengesController < ApplicationController
ActiveRecord::Base.transaction do
tab = params[:tab].to_i
@challenge.update_attributes(challenge_params)
if params[:challenge][:show_type].to_i == -1
@challenge.update_attributes(picture_path: nil, web_route: nil)
end
if tab == 0 && @challenge.st == 0
@challenge.challenge_tags.delete_all
if params[:challenge_tag].present?

@ -764,15 +764,10 @@ class GamesController < ApplicationController
# 区分评测过未评测过,未评测过按需求取数据
testset_detail max_query_index.to_i, game_challenge
picture = 0
web_route = nil
# 有效果展示时
if game_challenge.show_type.to_i != -1
# 处理生成图片类型文件
picture = (@game.picture_path.nil? ? 0 : @game.id)
# 针对web类型的实训
web_route = game_challenge.try(:web_route)
end
# 处理生成图片类型文件
picture = (@game.picture_path.nil? ? 0 : @game.id)
# 针对web类型的实训
web_route = game_challenge.try(:web_route)
mirror_name = @shixun.mirror_name

Loading…
Cancel
Save