dev_course
SylorHuang 6 years ago
parent 28737321fc
commit dcec641b5b

@ -424,13 +424,13 @@ module ExercisesHelper
end
ex_shixun_answer_content = answers_content&.where(exercise_shixun_challenge_id: exercise_cha.id)
if ex_shixun_answer_content.blank? #把关卡的答案存入试卷的实训里
cha_path = challenge_path exercise_cha.challenge.path
game_challenge = game.game_codes.search_challenge_path(cha_path).first
cha_path = challenge_path exercise_cha.challenge&.path
game_challenge = game.game_codes.search_challenge_path(cha_path)&.first
if game_challenge.present?
game_code = game_challenge
code = game_code.try(:new_code)
else
code = git_fle_content(exercise_cha.shixun.repo_path,cha_path)
code = git_fle_content(exercise_cha.shixun&.repo_path,cha_path)
end
sx_option = {
:exercise_question_id => q.id,

Loading…
Cancel
Save