% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
<% teacher_num = TeacherAndAssistantCount(@course) %>
<% 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") %>
<% if @course.syllabus%>
<%= @course.syllabus.title + " •" %>
<% end %>
<%= @course.name %><%=@course.is_public == 0 ? '(私有)' : '(公开)' %>
<% if is_excellent_course(@course) %>
<% end %>
邀请码:
<%=@course.generate_invite_code %>
<% unless is_teacher %>
<% end %>
<% if is_teacher %>
-
<% if @course.syllabus %>
- <%= link_to "查看课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %>
<% end %>
- <%= 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 %>