From 35a1c8b9c20ffe28af6d3b2641d49c0cee55c614 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Sep 2017 11:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=BC=80=E5=90=AF=E8=AF=84?= =?UTF-8?q?=E6=B5=8B83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 455b360a5..d02293a6c 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -404,7 +404,7 @@ class ShixunsController < ApplicationController myshixun.update_column(:gpid, gshixun.id) if myshixun.try(:gpid).blank? # 为了防止多次fork rep = Repository.create!(:myshixun_id => myshixun.id, :identifier => gshixun.name,:project_id => -1, :shixun_id => -2) rep.update_column(:type, "Repository::Gitlab") - rep_url = Base64.urlsafe_encode64(git_shixun_url_ip @shixun, "educoder") # 注意:educoder为默认给实训创建版本库的用户,如果换成别的用户,名字要相应的修改 + rep_url = Base64.urlsafe_encode64(git_shixun_url_ip @shixun, (@shixun.try(:fork_from).blank? ? "educoder" : "eduforge")) # 注意:educoder为默认给实训创建版本库的用户,如果换成别的用户,名字要相应的修改 logger.info("start openGameInstance") uri = "#{shixun_tomcat}/bridge/game/openGameInstance" logger.info("end openGameInstance")