|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
<% course_file_num = visable_attachemnts_incourse(@course).size %>
|
|
|
|
|
<% course_modules = @course.course_modules.where(:hidden => 0) %>
|
|
|
|
|
<%# is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
|
|
|
|
<%# homework_num = visable_course_homework @course %>
|
|
|
|
@ -64,29 +63,35 @@
|
|
|
|
|
<% when "shixun_homework" %>
|
|
|
|
|
<li class="clearfix" id="sy_03_4">
|
|
|
|
|
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => 4) %>" class="fl"><i class="iconfont icon-daima mr20 fl"></i><span class="task-hide activity-left-name"><%= course_module.module_name %></span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% homework_count = visable_course_homework(@course, 4, @is_teacher, nil) %>
|
|
|
|
|
<% if homework_count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= homework_count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<%= render :partial => "courses/course_homework_catagories", :locals => {:is_teacher => @is_teacher} %>
|
|
|
|
|
<% when "common_homework" %>
|
|
|
|
|
<li class="clearfix" id="sy_03_1">
|
|
|
|
|
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => 1) %>" class="fl"><i class="iconfont icon-putongzuoye mr20 fl"></i><span class="task-hide activity-left-name"><%= course_module.module_name %></span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% homework_count = visable_course_homework(@course, 1, @is_teacher, nil) %>
|
|
|
|
|
<% if homework_count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= homework_count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<% when "group_homework" %>
|
|
|
|
|
<li class="clearfix" id="sy_03_3">
|
|
|
|
|
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => 3) %>" class="fl"><i class="iconfont icon-fenzuzuoye mr20 fl"></i><span class="task-hide activity-left-name"><%= course_module.module_name %></span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% homework_count = visable_course_homework(@course, 3, @is_teacher, nil) %>
|
|
|
|
|
<% if homework_count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= homework_count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<% when "graduation" %>
|
|
|
|
@ -96,53 +101,65 @@
|
|
|
|
|
</li>
|
|
|
|
|
<ul>
|
|
|
|
|
<li id="sy_07_01" class="clearfix">
|
|
|
|
|
<% count = @course.graduation_topics.count %>
|
|
|
|
|
<a href="<%= graduation_topics_path(:course => @course.id) %>" class="fl">
|
|
|
|
|
<span class="fl ml38 devide_class task-hide">毕设选题</span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% count = @course.graduation_topics.count %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li id="sy_07_02" class="clearfix">
|
|
|
|
|
<% count = visible_task_count @course, @is_teacher %>
|
|
|
|
|
<a href="<%= graduation_tasks_path(:course => @course.id) %>" class="fl">
|
|
|
|
|
<span class="fl ml38 devide_class task-hide">毕设任务</span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% count = visible_task_count @course, @is_teacher %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% when "exercise" %>
|
|
|
|
|
<% count = visable_course_exercise @course, @is_teacher %>
|
|
|
|
|
<li class="clearfix" id="sy_04">
|
|
|
|
|
<a href="<%= exercise_index_path(:course_id => @course.id) %>" class="fl"><i class="iconfont icon-shijuan mr20 fl"></i><span class="task-hide activity-left-name"><%= course_module.module_name %></span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% count = visable_course_exercise @course, @is_teacher %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<% when "poll" %>
|
|
|
|
|
<% count = visable_course_poll @course, @is_teacher %>
|
|
|
|
|
<li class="clearfix" id="sy_06">
|
|
|
|
|
<a href="<%= poll_index_path(:course_id => @course.id) %>" class="fl"><i class="iconfont icon-wenjuan mr20 fl"></i><span class="task-hide activity-left-name"><%= course_module.module_name %></span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% count = visable_course_poll @course, @is_teacher %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= count %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<% when "attachment" %>
|
|
|
|
|
<li class="clearfix" id="sy_05">
|
|
|
|
|
<a href="<%= course_files_path(@course) %>" class="fl"><i class="iconfont icon-ziyuan mr20 fl"></i><span class="task-hide activity-left-name"><%= course_module.module_name %></span>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% course_file_num = visable_attachemnts_incourse(@course).size %>
|
|
|
|
|
<% if course_file_num > 0 %>
|
|
|
|
|
<span class="fr mr30 courseNewNum"><%= course_file_num %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<% when "board" %>
|
|
|
|
|
<div id="board_children_list">
|
|
|
|
|
<%= render :partial => 'layouts/board_children_list', :locals => {:course_module => course_module} %>
|
|
|
|
|
<%= render :partial => 'layouts/board_children_list', :locals => {:course_module => course_module,
|
|
|
|
|
:is_teacher => @is_teacher} %>
|
|
|
|
|
</div>
|
|
|
|
|
<% when "course_group" %>
|
|
|
|
|
<div id="group_children_list">
|
|
|
|
|