% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
<% teacher_num = TeacherAndAssistantCount(@course) %>
<% student_num = studentCount(@course) %>
<% if is_excellent_course(@course) %>
<% end %>
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
ID:<%= @course.id %><%= @course.is_public == 0 ? "(私有)" : "(公开)" %>
<% if is_excellent_course(@course) %>
<% end %>
<% unless is_teacher %>
<% end %>
<%= @course.name %>
<% if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0 %>
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0 %>
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0 %>
<%else %>
<%end %>
<% if is_teacher %>
-
- <%= link_to "课程配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %>
- <%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %>
- <%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %>
<% end %>