<%= link_to(image_tag(url_to_avatar(@homework.user), :width => "42", :height => "42"), user_path(@homework.user), :class => "problem_pic fl") %>
<%= @homework.name%>
<% if @is_teacher%>
<%= homework_anonymous_comment(@homework)%>
<%= link_to(l(:button_edit),edit_homework_common_path(@homework), :class => "fr mr10 work_edit") %>
<% else%>
<%= student_anonymous_comment @homework %>
<%= student_new_homework @homework %>
<% end %>
<%= @homework.description.html_safe %>
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
<% if @is_teacher%>
">
输入
|
输出
|
<% @homework.homework_tests.each do |test|%>
">
<%=test.input%>
|
<%= test.output%>
|
<% end%>
<% end%>
开发语言:
<% if @homework.homework_detail_programing.language.to_i == 1%>
C
<% elsif @homework.homework_detail_programing.language.to_i == 2%>
C++
<% end%>
<% end%>
<% unless @homework.attachments.empty?%>
附件:
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
<% end%>
扣分标准:
<% if @homework.homework_type == 1%>
<%= scoring_rules @homework.late_penalty,@homework.id,@is_teacher,@homework.homework_detail_manual.absence_penalty%>
<% else%>
<%= scoring_rules @homework.late_penalty,@homework.id,@is_teacher%>
<% end%>
截止时间:<%= @homework.end_time%>
<% if betweentime(@homework.end_time) < 0 %>
<%= l(:label_commit_limit)%>
<% else %>
<% end %>