优秀作品排行中,不允许访问的,就取消链接。老师设置了完全公开的作品,就有链接
This commit is contained in:
parent
f0e3fe8ff7
commit
ca094a13b5
|
@ -154,8 +154,18 @@
|
|||
<% end %>
|
||||
<% student_works.each_with_index do |sw, i| %>
|
||||
<div class="fl mr10 w100" style="text-align:center;">
|
||||
<a href="javascript:void(0);" class="linkBlue"><%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
|
||||
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%></p>
|
||||
<a href="javascript:void(0);" class="linkBlue">
|
||||
<% 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 => "学生头像" %>
|
||||
<p class="w100 hidden">
|
||||
<%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
|
||||
</p>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
|
||||
<p class="w100 hidden">
|
||||
<a href="javascript:void(0);" title="该作业的作品暂未公开"><%=sw.user.show_name %></a>
|
||||
</p>
|
||||
<% end %>
|
||||
</a>
|
||||
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
|
||||
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
|
||||
|
|
|
@ -153,8 +153,18 @@
|
|||
<% end %>
|
||||
<% student_works.each_with_index do |sw, i| %>
|
||||
<div class="fl mr10 w100" style="text-align:center;">
|
||||
<a href="javascript:void(0);" class="linkBlue"><%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
|
||||
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%></p>
|
||||
<a href="javascript:void(0);" class="linkBlue">
|
||||
<% 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 => "学生头像" %>
|
||||
<p class="w100 hidden">
|
||||
<%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
|
||||
</p>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
|
||||
<p class="w100 hidden">
|
||||
<a href="javascript:void(0);" title="该作业的作品暂未公开"><%=sw.user.show_name %></a>
|
||||
</p>
|
||||
<% end %>
|
||||
</a>
|
||||
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
|
||||
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
|
||||
|
|
|
@ -157,8 +157,18 @@
|
|||
<% end %>
|
||||
<% student_works.each_with_index do |sw, i| %>
|
||||
<div class="fl mr10 w100" style="text-align:center;">
|
||||
<a href="javascript:void(0);" class="linkBlue"><%= 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 => "学生头像" %>
|
||||
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => homework_common.id)%></p>
|
||||
<a href="javascript:void(0);" class="linkBlue">
|
||||
<% 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 => "学生头像" %>
|
||||
<p class="w100 hidden">
|
||||
<%= link_to sw.user.show_name, student_work_index_path(:homework => homework_common.id)%>
|
||||
</p>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
|
||||
<p class="w100 hidden">
|
||||
<a href="javascript:void(0);" title="该作业的作品暂未公开"><%=sw.user.show_name %></a>
|
||||
</p>
|
||||
<% end %>
|
||||
</a>
|
||||
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
|
||||
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
|
||||
|
|
Loading…
Reference in New Issue