<%= l(:label_totle)%>
<%= @obj_count%>
<%= l(:label_homework_count)%>
<%#= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
<% @homeworks.each do |homework|%>
<%= link_to(image_tag(url_to_avatar(homework.user), :width => "42", :height => "42"), user_path(homework.user), :class => "problem_pic fl") %>
<%= link_to(homework.user.lastname+homework.user.firstname, user_path(homework.user),:class => 'problem_name fl',:target => "_blank") %>
<%= l(:label_user_create_project_homework) %>:
<%= link_to(homework.name, student_work_index_path(:homework => homework.id), :class => 'problem_tit fl fb c_dblue',:target => "_blank") %>
<%= l(:lebel_homework_commit)%>
( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )
<% if @is_teacher%>
<%= homework_anonymous_comment(homework)%>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
<%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
<% elsif @is_student%>
<%= 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%>
<%= l(:label_end_time)%>:<%= homework.end_time%>
<% if betweentime(homework.end_time) < 0 %>
<%= l(:label_commit_limit)%>
<% else %>
<% end %>
<% end%>