|
|
|
@ -739,7 +739,7 @@ class GamesController < ApplicationController
|
|
|
|
|
experience = 0
|
|
|
|
|
game_status = @game.status
|
|
|
|
|
had_done = @game.had_done
|
|
|
|
|
game_challenge = Challenge.select([:id, :score, :position, :shixun_id, :web_route]).find(@game.challenge_id)
|
|
|
|
|
game_challenge = Challenge.select([:id, :score, :position, :shixun_id, :web_route, :show_type]).find(@game.challenge_id)
|
|
|
|
|
|
|
|
|
|
if params[:resubmit].blank? # 非重新评测
|
|
|
|
|
if game_status == 2 # 通关
|
|
|
|
@ -764,10 +764,16 @@ class GamesController < ApplicationController
|
|
|
|
|
# 区分评测过未评测过,未评测过按需求取数据
|
|
|
|
|
testset_detail max_query_index.to_i, game_challenge
|
|
|
|
|
|
|
|
|
|
# 处理生成图片类型文件
|
|
|
|
|
picture = (@game.picture_path.nil? ? 0 : @game.id)
|
|
|
|
|
# 针对web类型的实训
|
|
|
|
|
web_route = game_challenge.try(:web_route)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
mirror_name = @shixun.mirror_name
|
|
|
|
|
|
|
|
|
|
e_record = EvaluateRecord.where(:identifier => sec_key).first
|
|
|
|
|