From 07ff8d2eb745708e7b7cf3c0cef13076ecddafad Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 16 Oct 2015 15:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=EF=BC=8C=E9=9D=9E=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=88=90=E5=91=98=20=E8=AF=BE=E7=A8=8B=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=B8=AD=E6=98=BE=E7=A4=BA=20--=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=88=E4=BD=9C=E5=93=81=E6=95=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 ++ app/views/users/_course_homework.html.erb | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b18d0c706..d21eb48a9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2366,6 +2366,8 @@ module ApplicationHelper end end end + else + link_to "提交(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue" end end diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 31502c081..2d3bc68de 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -24,12 +24,10 @@ 匿评已结束 <% end%>
- <% if User.current.member_of_course?(activity.course) %> -
- <% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %> - <%= user_for_homework_common activity,is_teacher %> -
- <% end %> +
+ <% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %> + <%= user_for_homework_common activity,is_teacher %> +
<% if activity.homework_type == 2 && is_teacher%>