% if bids.blank? %>
<%#= l(:label_uncommit_homework) %>
暂无作业!
<% else %>
<% bids.each do |bid|%>
<%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %>
|
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author)) %>
<%= l(:label_user_create_project_homework) %>
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %>
|
<% if User.current.logged? && is_cur_course_student(@course) %>
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
<% if bid.open_anonymous_evaluation == 1 %>
<% case bid.comment_status %>
<% when 0 %>
未开启匿评
<% when 1 %>
匿评中..
<% when 2 %>
匿评结束
<% end %>
<% end%>
<% if cur_user_homework && cur_user_homework.empty? %>
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
<% else %>
已 提 交
<% end %>
<% end %>
<% if (User.current.admin?||User.current.allowed_to?(:as_teacher,@course)) %>
<% if bid.open_anonymous_evaluation == 1 && bid.homeworks.count >= 2%>
<%end%>
<%= link_to(
l(:button_edit),
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}
) %>
<%#= link_to(
l(:button_delete),
{:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del'
) %>
<% end %>
|
<% bidding_project = bid.biding_projects.all
temp = []
bidding_project.each do |pro|
if pro.project && pro.project.project_status
temp << pro
end
temp
end
%>
<% if bid.homework_type == 1%>
<%= l(:label_x_homework_project, :count => bid.homeworks.count) %>
(
<%= link_to bid.homeworks.count, course_for_bid_path(bid.id) %>
)
<% else %>
<%= l(:label_x_homework_project, :count => temp.count) %>
(
<%= link_to temp.count, course_for_bid_path(bid.id) %>
)
<% end %>
|
<% if bid.reward_type.nil? or bid.reward_type == 1 %>
<%= l(:label_bids_reward_method) %>
<%= l(:label_call_bonus) %>
<%= l(:label_RMB_sign) %>
<%= bid.budget%>
<% elsif bid.reward_type == 2 %>
<%= l(:label_bids_reward_method) %>
<%= bid.budget%>
<% end %>
|
<%=h sanitize(bid.description.html_safe) %>
|
<%= l(:label_end_time) %>
:
<%= bid.deadline %>
<% if betweentime(bid.deadline) < 0 %>
<%= l(:label_commit_limit)%>
<% else %>
<% end %>
|
|
<% end %>
<% end %>