diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb index 51cede682..0e056c972 100644 --- a/app/views/organizations/_org_course_homework.html.erb +++ b/app/views/organizations/_org_course_homework.html.erb @@ -158,7 +158,7 @@
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %> -分数:<%=format("%.1f",score<0 ? 0 : score) %>分
+分数:<%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分
<% if i == 4 %> <% break %> diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 7c5aa5e4f..d42dc152d 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -157,7 +157,7 @@ <% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %> -分数:<%=format("%.1f",score<0 ? 0 : score) %>分
+分数:<%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分
<% if i == 4 %> <% break %> diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index 8329e8432..0c2856c89 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -161,7 +161,7 @@ <% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %> -分数:<%=format("%.1f",score<0 ? 0 : score) %>分
+分数:<%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分
<% if i == 4 %> <% break %>