diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb
index 0e056c972..2cf1810ad 100644
--- a/app/views/organizations/_org_course_homework.html.erb
+++ b/app/views/organizations/_org_course_homework.html.erb
@@ -154,8 +154,18 @@
<% end %>
<% student_works.each_with_index do |sw, i| %>
-
<%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
- <%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
+
+ <% if User.current.member_of_course?(activity.course) || User.current.admin? || activity.is_open == 1 %>
+ <%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
+
+ <%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
+
+ <% else %>
+ <%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
+
+ <%=sw.user.show_name %>
+
+ <% end %>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
分数:<%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index d42dc152d..9dd5eaa7a 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -153,8 +153,18 @@
<% end %>
<% student_works.each_with_index do |sw, i| %>
-
<%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
- <%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
+
+ <% if User.current.member_of_course?(activity.course) || User.current.admin? || activity.is_open == 1 %>
+ <%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
+
+ <%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
+
+ <% else %>
+ <%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
+
+ <%=sw.user.show_name %>
+
+ <% end %>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
分数:<%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index 0c2856c89..9f3847735 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -157,8 +157,18 @@
<% end %>
<% student_works.each_with_index do |sw, i| %>
-
<%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => homework_common.id), :alt => "学生头像" %>
- <%= link_to sw.user.show_name, student_work_index_path(:homework => homework_common.id)%>
+
+ <% if User.current.member_of_course?(homework_common.course) || User.current.admin? || homework_common.is_open == 1 %>
+ <%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => homework_common.id), :alt => "学生头像" %>
+
+ <%= link_to sw.user.show_name, student_work_index_path(:homework => homework_common.id)%>
+
+ <% else %>
+ <%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
+
+ <%=sw.user.show_name %>
+
+ <% end %>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
分数:<%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分