|
|
|
@ -33,7 +33,7 @@ class GamesController < ApplicationController
|
|
|
|
|
is_teacher = @user.is_teacher?
|
|
|
|
|
|
|
|
|
|
# 实训超时设置
|
|
|
|
|
time_limit = @shixun.exec_time
|
|
|
|
|
time_limit = game_challenge.exec_time
|
|
|
|
|
|
|
|
|
|
# 上一关、下一关
|
|
|
|
|
prev_game = @game.prev_of_current_game(@shixun.id, @game.myshixun_id, game_challenge.position)
|
|
|
|
@ -66,7 +66,7 @@ class GamesController < ApplicationController
|
|
|
|
|
shixun_tomcat = edu_setting('cloud_bridge')
|
|
|
|
|
service_host = edu_setting('vnc_url')
|
|
|
|
|
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
|
|
|
|
|
params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(container_limit(@shixun.mirror_repositories))}"}
|
|
|
|
|
params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}"}
|
|
|
|
|
res = uri_post uri, params
|
|
|
|
|
if res && res['code'].to_i != 0
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:99)")
|
|
|
|
@ -547,7 +547,7 @@ class GamesController < ApplicationController
|
|
|
|
|
br_params = {:tpiID => "#{@myshixun.id}", :tpiGitURL => "#{gitUrl}", :buildID => "#{@game.id}",
|
|
|
|
|
:instanceChallenge => "#{step}", :testCases => "#{testCases}", :resubmit => "#{resubmit}",
|
|
|
|
|
:times => params[:first].to_i, :podType => @shixun.webssh, :content_modified => content_modified,
|
|
|
|
|
:containers => "#{Base64.urlsafe_encode64(container_limit(@shixun.mirror_repositories))}",
|
|
|
|
|
:containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}",
|
|
|
|
|
:persistenceName => @shixun.identifier, :tpmScript => "#{tpmScript}",
|
|
|
|
|
:timeLimit => "#{@shixun.exec_time}", :isPublished => (@shixun.status < 2 ? 0 : 1) }
|
|
|
|
|
|
|
|
|
|