复制实训

chromesetting
daiao 5 years ago
parent f3f0d57da4
commit 5514594800

@ -265,7 +265,12 @@ class ShixunsController < ApplicationController
project_fork(@new_shixun, @repo_path, current_user.login)
ShixunMember.create!(:user_id => User.current.id, :shixun_id => @new_shixun.try(:id), :role => 1)
# 如果是jupyter先创建一个目录,为了挂载(因为后续数据集开启Pod后环境在没销毁前你上传数据集是挂载不上目录的因此要先创建目录方便中间层挂载)
if @new_shixun.is_jupyter?
folder = EduSetting.get('shixun_folder')
path = "#{folder}/#{@new_shixun.identifier}"
FileUtils.mkdir_p(path, :mode => 0777) unless File.directory?(path)
end
# 同步复制关卡
if @shixun.challenges.present?
@shixun.challenges.each do |challenge|

Loading…
Cancel
Save