|
|
|
@ -23,10 +23,16 @@
|
|
|
|
|
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %>
|
|
|
|
|
</span>
|
|
|
|
|
<span style="float: right">
|
|
|
|
|
<% if(User.current.logged? && (!Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)) %>
|
|
|
|
|
<% if User.current.logged? && is_cur_course_student(@course) %>
|
|
|
|
|
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
|
|
|
|
<% if cur_user_homework!= nil && cur_user_homework.count == 0 %>
|
|
|
|
|
<%= link_to l(:label_commit_homework),new_homework_attach_path(bid) %>
|
|
|
|
|
<% if cur_user_homework!= nil && cur_user_homework.empty? %>
|
|
|
|
|
<% if bid.comment_status == 0 %>
|
|
|
|
|
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span title="只有开启匿评之前才能创建作业哦!">
|
|
|
|
|
<a style="color:#8e8e8e;">提交作业</a>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span style="color: green; float: right">
|
|
|
|
|
<%= l(:lable_has_commit_homework)%>
|
|
|
|
|