Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
jingquan huang 5 years ago
commit e48b935043

@ -9,6 +9,8 @@ module GitHelper
# 版本库文件内容,带转码
def git_fle_content(repo_path, path)
begin
logger.info("##########repo_path: #{repo_path}")
logger.info("##########path: #{path}")
content = GitService.file_content(repo_path: repo_path, path: path)
logger.info("@@@@@@@@@@@@@@@@@@#{content}")

@ -430,7 +430,10 @@ module ExercisesHelper
end
ex_shixun_answer_content = answers_content&.where(exercise_shixun_challenge_id: exercise_cha.id)
if ex_shixun_answer_content.blank? #把关卡的答案存入试卷的实训里
logger.info("############_________exercise_cha.challenge&.path___________###############{exercise_cha.challenge&.path}")
cha_path = challenge_path(exercise_cha.challenge&.path)
logger.info("############_________cha_path___________###############{cha_path}")
game_challenge = game.game_codes.search_challenge_path(cha_path)&.first
if game_challenge.present?
game_code = game_challenge

@ -29,7 +29,7 @@ json.shixun_detail do
if game.try(:lastest_code).blank?
cha_path = challenge_path(shixun_challenge.challenge&.path)
latest_code = git_fle_content(game&.myshixun.repo_path,cha_path)
latest_code = git_fle_content(game.myshixun.repo_path,cha_path)
else
latest_code = game.try(:lastest_code)
end

Loading…
Cancel
Save