<% content_for :header_tags do %> <%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %> <%= javascript_include_tag "resizeable_table" %> <%= stylesheet_link_tag "/assets/codemirror/codemirror" %> <%= import_ke(enable_at: true, prettify: false, init_activity: true) %> <% end %> <% is_group_project_homework = @contestwork.work_type == 3 && @contestwork.work_detail_group.base_on_project %>
<% if @is_teacher%>
  • 导出
    • <%= link_to "导出提交成绩", contestant_works_path(:work => @contestwork.id,:order => @order, :sort => @b_sort, :name => @name, :group => @group, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => "export_student_work"%>
    • <% if @contestwork.contestant_works.has_committed.empty?%> 导出作业附件 <%#= link_to "导出作业附件", "javascript:void(0)", class: "hworkExport resourcesGrey", :onclick => "alert('没有学生提交作业,无法下载附件')" %> <% else%> <%= link_to "导出作业附件", zipdown_assort_path(obj_class: @contestwork.class, obj_id: @contestwork, format: :json), remote: true, class: "hworkExport resourcesGrey", :id => "download_homework_attachments" %> <% end%>
<% end%>
<%= render :partial => 'work_post_brief', :locals => {:homework => @contestwork, :is_teacher => @is_teacher} %>
<%= render :partial => 'users/contest_work_post_reply', :locals => {:activity => @contestwork, :user_activity_id => @contestwork.id, :hw_status => 3, :is_teacher => @is_teacher} %>
<%= render :partial => "contestant_work_list"%>
<% if @contestwork.work_type == 3 && @contestwork.work_detail_group.base_on_project %>
<% student_work_ids = @contestwork.contestant_works.has_committed.blank? ? "(-1)" : "(" + @contestwork.contestant_works.has_committed.map{|st| st.id}.join(",") + ")" %> <% student_work_projects = @contestwork.contestant_work_projects.where("contestant_work_id in #{student_work_ids} or contestant_work_id is null") %> <% project_ids = student_work_projects.blank? ? "(-1)" : "(" + student_work_projects.map{|pro| pro.project_id}.join(",") + ")" %> <% projects = Project.where("id in #{project_ids}").order("updated_on desc") %> <%= render :partial => "relate_projects", :locals => {:projects => projects}%>
<% end %>