<% 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 @course.syllabus %> <%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey' %>  >  <% end %> <%=link_to @course.name, course_path(@course), :class => 'sy_cgrey' %>

<% if is_teacher %>
<% end %>

邀请码
<%=@course.generate_invite_code %>

<%=@course.name %>

<%=@course.is_public == 0 ? '私有' : '公开' %>

教师:<%= course_teacher_link teacher_num %> 学生:<%= course_student_link student_num %> 资源:<%= link_to course_file_num, course_files_path(@course), :class => 'sy_cblue',:id=>'courses_files_count_info' %>

主讲老师:<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cblue') %> 学时:<%= @course.class_period %>学时 学期:<%= current_time_and_term @course %> 单位:<%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %>

<% unless is_teacher %>
<%= join_in_course_header(@course, User.current) %>
<% end %>