% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
<% teacher_num = searchTeacherAndAssistant(@course).count %>
<% student_num = studentCount(@course) %>
<% course_file_num = visable_attachemnts_incourse(@course).count%>
<% if is_excellent_course(@course) %>
<% end %>
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
<%= @course.is_public == 0 ? "私有课程" : "公开课程" %>
<% if is_excellent_course(@course) %>
<% end %>
ID:<%= @course.id%>
<%= @course.name %>
<%# if @course.is_public == 0%>
<%# end %>
<%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 %>