From 99b33babeb3168488eb17d19df930ba93426eedc Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 28 Sep 2016 16:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BD=9C=E4=B8=9A=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=8A=A0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index f234a383a..3a23c9f88 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -1,5 +1,6 @@ <% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
+ <% cache [:user_homework_activity,activity.id.to_s+"-"+User.current.logged?.to_s+"-"+is_teacher.to_s+"-"+course_activity.to_s+"-"+(User.current.member_of_course?(activity.course)).to_s+"-"+activity.updated_at.to_i.to_s] do%>
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> @@ -60,7 +61,7 @@
- + <% end %> <%= render :partial => 'users/homework_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id, :hw_status => hw_status, :is_teacher => is_teacher} %>