非课程成员 --课程动态中不显示 提交 ,匿评等信息

tmp
huang 10 years ago
parent e747599925
commit c11905707d

@ -2349,6 +2349,7 @@ module ApplicationHelper
#根据传入作业确定显示为编辑作品还是新建作品,或者显示作品数量 #根据传入作业确定显示为编辑作品还是新建作品,或者显示作品数量
def user_for_homework_common homework,is_teacher def user_for_homework_common homework,is_teacher
if User.current.member_of_course?(homework.course)
if is_teacher #老师显示作品数量 if is_teacher #老师显示作品数量
link_to "提交(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue" link_to "提交(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue"
else #学生显示提交作品、修改作品等按钮 else #学生显示提交作品、修改作品等按钮
@ -2367,6 +2368,8 @@ module ApplicationHelper
end end
end end
end
def student_anonymous_comment homework def student_anonymous_comment homework
if homework.homework_detail_manual if homework.homework_detail_manual
case homework.homework_detail_manual.comment_status case homework.homework_detail_manual.comment_status

@ -24,10 +24,12 @@
<span class="grey_btn_cir ml10">匿评已结束</span> <span class="grey_btn_cir ml10">匿评已结束</span>
<% end%> <% end%>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<% if User.current.member_of_course?(activity.course) %>
<div class="homepagePostSubmit"> <div class="homepagePostSubmit">
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %> <% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
<%= user_for_homework_common activity,is_teacher %> <%= user_for_homework_common activity,is_teacher %>
</div> </div>
<% end %>
<% if activity.homework_type == 2 && is_teacher%> <% if activity.homework_type == 2 && is_teacher%>
<div class="homepagePostSubmit"> <div class="homepagePostSubmit">

Loading…
Cancel
Save