diff --git a/app/services/exercise_user_pdf_service.rb b/app/services/exercise_user_pdf_service.rb index ee055ac66..f0f7c1ac1 100644 --- a/app/services/exercise_user_pdf_service.rb +++ b/app/services/exercise_user_pdf_service.rb @@ -2,6 +2,7 @@ class ExerciseUserPdfService include ExercisesHelper include ApplicationHelper include StudentWorksHelper + include GitHelper attr_reader :exercise, :ex_user, :request_url diff --git a/app/templates/exercise_export/exercise_export.css b/app/templates/exercise_export/exercise_export.css index 1cfa57c80..c2b054666 100644 --- a/app/templates/exercise_export/exercise_export.css +++ b/app/templates/exercise_export/exercise_export.css @@ -333,6 +333,7 @@ textarea{ } .ex-scores{ height: auto ; + word-break: break-all; } diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb index bb50f7edf..ea782e23b 100644 --- a/app/templates/exercise_export/exercise_user.html.erb +++ b/app/templates/exercise_export/exercise_user.html.erb @@ -316,20 +316,23 @@ <% end %> - <% if game.try(:lastest_code).present? && game.challenge.st == 0 %> - <% con_rows = content_line(game.lastest_code) %> -
-

+ <% if game.try(:lastest_code).blank? %> + <% cha_path = challenge_path(game.challenge&.path) %> + <% latest_code = git_fle_content(game.myshixun.repo_path,cha_path) %> + <% else %> + <% latest_code = game.try(:lastest_code) %> + <% end %> +

+

最近通过的代码 - <%= game.challenge.path %> + <%= game.challenge&.path %> -

-
- -
+

+
+
- <% end %> +
<% end %>