<%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
<%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%>
TO
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
<% if homework_common.homework_detail_manual%>
<% if homework_common.homework_detail_manual.comment_status == 0 %>
未发布
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
<% if homework_common.anonymous_comment == 0%>
未开启匿评
<% else %>
匿评已禁用
<% end %>
<% if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
作品提交中
<% elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
作品补交中
<% end %>
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
<% if homework_common.anonymous_comment == 0%>
匿评中
<% else %>
匿评已禁用
<% end %>
教师评阅中
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
<% if homework_common.anonymous_comment == 0%>
匿评已结束
<% else %>
匿评已禁用
<% end %>
教师评阅中
<% end%>
<% end%>
<%= user_for_homework_common homework_common,is_teacher %>
<% if homework_common.homework_type == 2 && is_teacher%>
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
<% end %>
<% if homework_common.homework_type == 2%>
语言:
<%= homework_common.language_name%>
<% end %>
<%= l(:label_end_time)%>:<%= homework_common.end_time%> 23:59
<% if homework_common.homework_detail_manual.comment_status == 0 %>
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
<% end %>
<%= homework_common.description.html_safe %>
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
<% if is_teacher%>
<% comment_status = homework_common.homework_detail_manual.comment_status%>
-
-
<%= link_to l(:button_edit),edit_homework_common_path(homework_common,:is_in_course => is_in_course,:course_activity=>-1), :class => "postOptionLink"%>
-
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => is_in_course,:course_activity=>-1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
-
<%= link_to("评分设置", score_rule_set_homework_common_path(homework_common, :is_in_course => is_in_course),:class => "postOptionLink", :remote => true) %>
<% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
-
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true)%>
<% end %>
<% if homework_common.anonymous_comment == 0%>
-
<%= homework_anonymous_comment(homework_common, is_in_course) %>
<% end %>
<% if homework_common.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
-
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(homework_common,:is_in_course => is_in_course),:class => "postOptionLink", :remote => true)%>
<% end %>
<% end%>