重置问题

dev_forum
jingquan huang 6 years ago
parent 23cf280a54
commit 1edc9a9827

@ -578,19 +578,7 @@ class ShixunsController < ApplicationController
onclick_time: Time.now, commit_id: commit_id) onclick_time: Time.now, commit_id: commit_id)
uid_logger("myshixun_id is #{myshixun.id}") uid_logger("myshixun_id is #{myshixun.id}")
# 如果实训是纯选择题则不需要去fork仓库以及中间层的相关操作了
unless is_choice_type
# fork仓库
project_fork(myshixun, @repo_path, current_user.login)
rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path )
uid_logger("start openGameInstance")
uri = "#{cloud_bridge}/bridge/game/openGameInstance"
logger.info("end openGameInstance")
params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: myshixun.repo_name.split("/").last}
uid_logger("openGameInstance params is #{params}")
interface_post uri, params, 83, "实训云平台繁忙繁忙等级83"
end
# 其它创建关卡等操作 # 其它创建关卡等操作
challenges = @shixun.challenges challenges = @shixun.challenges
# 之所以增加user_id是为了方便统计查询性能 # 之所以增加user_id是为了方便统计查询性能
@ -605,6 +593,20 @@ class ShixunsController < ApplicationController
end end
end end
# 如果实训是纯选择题则不需要去fork仓库以及中间层的相关操作了
unless is_choice_type
# fork仓库
project_fork(myshixun, @repo_path, current_user.login)
rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path )
uid_logger("start openGameInstance")
uri = "#{cloud_bridge}/bridge/game/openGameInstance"
logger.info("end openGameInstance")
params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: myshixun.repo_name.split("/").last}
uid_logger("openGameInstance params is #{params}")
interface_post uri, params, 83, "实训云平台繁忙繁忙等级83"
end
@current_task = myshixun.current_task(myshixun.games) @current_task = myshixun.current_task(myshixun.games)
uid_logger("## shixun exec: myshixun id is #{myshixun.id}") uid_logger("## shixun exec: myshixun id is #{myshixun.id}")
rescue Exception => e rescue Exception => e

Loading…
Cancel
Save