dev_forum
SylorHuang 6 years ago
parent e60d6f7abb
commit 148ac868e7

@ -2,6 +2,7 @@ class ExerciseUserPdfService
include ExercisesHelper include ExercisesHelper
include ApplicationHelper include ApplicationHelper
include StudentWorksHelper include StudentWorksHelper
include GitHelper
attr_reader :exercise, :ex_user, :request_url attr_reader :exercise, :ex_user, :request_url

@ -333,6 +333,7 @@ textarea{
} }
.ex-scores{ .ex-scores{
height: auto ; height: auto ;
word-break: break-all;
} }

@ -316,20 +316,23 @@
</tbody> </tbody>
</table> </table>
<% end %> <% end %>
<% if game.try(:lastest_code).present? && game.challenge.st == 0 %> <% if game.try(:lastest_code).blank? %>
<% con_rows = content_line(game.lastest_code) %> <% cha_path = challenge_path(game.challenge&.path) %>
<div class="mbt20"> <% latest_code = git_fle_content(game.myshixun.repo_path,cha_path) %>
<p class="bgc" > <% else %>
<% latest_code = game.try(:lastest_code) %>
<% end %>
<div class="mbt20">
<p class="bgc" >
<span class="pd10" style="display:inherit;"> <span class="pd10" style="display:inherit;">
<span class="fl">最近通过的代码</span> <span class="fl">最近通过的代码</span>
<span class="pull-right"><%= game.challenge.path %></span> <span class="pull-right"><%= game.challenge&.path %></span>
</span> </span>
</p> </p>
<div class="bg-e pd10"> <div class="bg-e pd10">
<textarea class="" id="content_show_<%= game.id %>" name="content" rows="<%= con_rows %>"><%= game.lastest_code %></textarea> <textarea class="" id="content_show_<%= game.id %>" name="content"><%= latest_code %></textarea>
</div>
</div> </div>
<% end %> </div>
</div> </div>
</div> </div>
<% end %> <% end %>

Loading…
Cancel
Save