|
|
|
@ -426,12 +426,12 @@ class GamesController < ApplicationController
|
|
|
|
|
game_code = GameCode.where(:game_id => @game.try(:id), :path => path).first
|
|
|
|
|
if game_code.present?
|
|
|
|
|
content = game_code.try(:new_code)
|
|
|
|
|
@content = if @myshixun.mirror_name.select{|a| a.include?("MachineLearning") || a.include?("Python")}.present? && content.present?
|
|
|
|
|
content.gsub(/\t/, ' ')
|
|
|
|
|
else
|
|
|
|
|
content
|
|
|
|
|
end
|
|
|
|
|
update_file_content(@content, @myshixun.repo_path, path, current_user.mail, current_user.full_name, "game passed reset")
|
|
|
|
|
# @content = if @myshixun.mirror_name.select{|a| a.include?("MachineLearning") || a.include?("Python")}.present? && content.present?
|
|
|
|
|
# content.gsub(/\t/, ' ')
|
|
|
|
|
# else
|
|
|
|
|
# content
|
|
|
|
|
# end
|
|
|
|
|
update_file_content(content, @myshixun.repo_path, path, current_user.mail, current_user.full_name, "game passed reset")
|
|
|
|
|
else
|
|
|
|
|
tip_exception("代码重置失败,代码为空")
|
|
|
|
|
end
|
|
|
|
|