From 8a88b57a321d21ce050d40c3898f18ded89c0af7 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Mon, 1 Jul 2019 17:27:10 +0800 Subject: [PATCH] fix bug --- app/helpers/exercises_helper.rb | 2 +- app/templates/exercise_export/exercise_export.css | 1 - app/templates/exercise_export/exercise_user.html.erb | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb index 1442e1da3..437965ca6 100644 --- a/app/helpers/exercises_helper.rb +++ b/app/helpers/exercises_helper.rb @@ -734,6 +734,6 @@ module ExercisesHelper #实训题学生代码的行数 def content_line(content) - content.split(/\r?\n/).length + content.split(/\r?\n/).length + 1 end end diff --git a/app/templates/exercise_export/exercise_export.css b/app/templates/exercise_export/exercise_export.css index b7f4892c1..407a39b1f 100644 --- a/app/templates/exercise_export/exercise_export.css +++ b/app/templates/exercise_export/exercise_export.css @@ -315,7 +315,6 @@ table td{ /*}*/ textarea{ width:100%; - height:100%; resize:none; border:none; background-color:#eee; diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb index ea782e23b..52a083eab 100644 --- a/app/templates/exercise_export/exercise_user.html.erb +++ b/app/templates/exercise_export/exercise_user.html.erb @@ -322,6 +322,7 @@ <% else %> <% latest_code = game.try(:lastest_code) %> <% end %> + <% con_rows = content_line(latest_code) %>

@@ -330,7 +331,7 @@

- +