<%= course.id %> <%= link_to(course.name, course_path(course.id)) %> <%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %> <%= studentCount(course) %> <%= course.homework_commons.count%> <%= student_works_num(course) %> <%= visable_attachemnts_incourse(course).count%> <%= course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", course.boards.first.id, nil).count %> <%= course.course_activities.count%> <%= course.time %> <%= link_to( course.is_excellent == 1 || course.excellent_option == 1 ? "取消精品" : "设为精品", { :controller => 'admin', :action => 'set_excellent_course', :id => course.id },:remote=>true, :class => 'icon-del') %>