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

dev_course
cxt 6 years ago
commit ae7dba89d0

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

@ -1,6 +1,6 @@
PDFKit.configure do |config| PDFKit.configure do |config|
# config.wkhtmltopdf = ENV["WKHTMLTOPDF_EXEC"] || 'wkhtmltopdf' config.wkhtmltopdf = ENV["WKHTMLTOPDF_EXEC"] || 'wkhtmltopdf'
config.wkhtmltopdf = ENV["WKHTMLTOPDF_EXEC"] || '/usr/bin/wkhtmltopdf' # config.wkhtmltopdf = ENV["WKHTMLTOPDF_EXEC"] || '/usr/bin/wkhtmltopdf'
config.default_options = { config.default_options = {
encoding: "UTF-8", encoding: "UTF-8",
page_size: 'A4', page_size: 'A4',

Loading…
Cancel
Save