<%# course_model %> <%# course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> <% course_file_num = visable_attachemnts_incourse(@course).count%> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% homework_num = visable_course_homework @course %> <%= h html_title %> <%= csrf_meta_tag %> <%= favicon %> <%= javascript_heads %> <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus'%> <%= javascript_include_tag "course","avatars","header","attachments",'prettify' %> <%= yield :header_tags -%>
<%=render :partial => 'layouts/course_base_info' %>
    <% unless show_nav?(@course.course_activities.count) %>
  • 动态<%=@course.course_activities.count %>
  • <% end %> <% unless show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
  • <% count = @course.boards.first ? (@course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", @course.boards.first.id, nil).count) : 0 %> 讨论区<%=count %> <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
  • <% end %> <% unless show_nav?(@course.homework_commons.count) %>
  • 作业<%=homework_num %> <%= link_to( "",homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_course_homework_new)}") if is_teacher %>
  • <% end %> <% unless show_nav?(@course.news.count) %>
  • 通知<%=@course.news.count %> <%= link_to( "",new_course_news_path(@course,:is_new=>1), :class => 'sy_class_add', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
  • <% end %> <% unless show_nav?(course_file_num) %>
  • 资源库<%=course_file_num %> <% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %> <% end %>
  • <% end %> <% unless show_nav?(course_feedback_count) %>
  • 留言<%=course_feedback_count %> <%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}"%>
  • <% end %> <% unless show_nav?(course_poll_count) %>
  • @course.id) %>">问卷调查<%=course_poll_count %> <%= link_to( "", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'sy_class_add', :title =>"#{l(:label_new_poll)}") if is_teacher %>
  • <% end %> <% count = User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count %> <% unless show_nav?(count) %>
  • 在线测验<%=count %> <%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
  • <% end %> <% group_count = @course.course_groups.count %> <% if !show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
  • 分班<%=group_count %>
  • <% end %> <% statistics_count = 0 %> <% unless show_nav?(statistics_count) %>
  • 统计
  • <% end %> <%# 工具栏展开 %> <% if @course.homework_commons.count == 0 || @course.news.count == 0 || course_file_num == 0 || course_poll_count == 0 || @course.exercises.count == 0 || course_feedback_count == 0 || @course.exercises.count == 0 || (@course.boards.first ? @course.boards.first.topics.count : 0) == 0 || statistics_count == 0%>
  • 更多
  • <% end %>
<%# 课程活跃度 %> <%= render :partial => 'courses/course_activity_users', :locals => {:course => @course} %> <%# 课程英雄榜 %> <%= render :partial => 'courses/course_heroes', :locals => {:course => @course} %>

班级推荐

<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
<%# 更新访问数,刷新的时候更新访问次数 %> <% update_visiti_count @course %>
访问计数 <%= @course.visits.to_i %> (自2016年5月)
<%= yield %>
<%= render :partial => 'layouts/footer' %>
<%= render :partial => 'layouts/new_feedback' %> <%= call_hook :view_layouts_base_body_bottom %>