@ -71,7 +71,7 @@
<a href="javascript:void(0);" class="tab_type">参考答案</a>
<a href="javascript:void(0);" class="tab_type">参考答案</a>
</li>
</li>
<% end %>
<% end %>
<% if @is_teacher && @homework.homework_type == 4 && @homework.homework_group_reviews.count > 0 %>
<% if @is_teacher && @homework.homework_type == 4 && @homework.homework_group_reviews.size > 0 %>
<li id="edu-tab-nav-5" index="5">
<li id="edu-tab-nav-5" index="5">
<a href="javascript:void(0);" class="tab_type">
<a href="javascript:void(0);" class="tab_type">
查重结果
查重结果
@ -100,16 +100,16 @@
<% end %>
<% end %>
<%= link_to "导出成绩", student_work_index_path(:homework => @homework.id, :order => @order, :sort => @b_sort, :name => @name, :group => @group, :comment => @comment, :status => @status, :format => 'xls'), :class => 'fr mt3 ml15 white-btn orange-btn', :id => "export_student_work" %>
<%= link_to "导出成绩", student_work_index_path(:homework => @homework.id, :order => @order, :sort => @b_sort, :name => @name, :group => @group, :comment => @comment, :status => @status, :format => 'xls'), :class => 'fr mt3 ml15 white-btn orange-btn', :id => "export_student_work" %>
<% if @homework.homework_detail_manual.try(:comment_status) == 0 || @homework.homework_group_settings.where("publish_time is null or publish_time > '#{Time.now}'").count > 0 %>
<% if @homework.homework_detail_manual.try(:comment_status) == 0 || @homework.homework_group_settings.where("publish_time is null or publish_time > '#{Time.now}'").size > 0 %>
<%= link_to '立即发布', publish_notice_homework_common_path(@homework), :remote => true, :class => "white-btn orange-btn fr ml15 mt3" %>
<%= link_to '立即发布', publish_notice_homework_common_path(@homework), :remote => true, :class => "white-btn orange-btn fr ml15 mt3" %>
<% end %>
<% end %>
<% if (@homework.homework_detail_manual.try(:comment_status) == 1 && @homework.end_time > Time.now) || @homework.homework_group_settings.where("publish_time < '#{Time.now}' and end_time > '#{Time.now}'").count > 0 %>
<% if (@homework.homework_detail_manual.try(:comment_status) == 1 && @homework.end_time > Time.now) || @homework.homework_group_settings.where("publish_time < '#{Time.now}' and end_time > '#{Time.now}'").size > 0 %>
<%= link_to '立即截止', end_notice_homework_common_path(@homework), :remote => true, :class => "white-btn orange-btn fr ml15 mt3" %>
<%= link_to '立即截止', end_notice_homework_common_path(@homework), :remote => true, :class => "white-btn orange-btn fr ml15 mt3" %>
<% end %>
<% end %>
<% if @homework.publish_time.present? && @homework.publish_time < Time.now && @homework.end_time > Time.now && (@homework.homework_type == 1 || @homework.homework_type == 3) %>
<% if @homework.publish_time.present? && @homework.publish_time < Time.now && @homework.end_time > Time.now && (@homework.homework_type == 1 || @homework.homework_type == 3) %>
<a href="javascript:void(0)" class="white-btn orange-btn fr ml15 mt3" onclick="cancel_publish('<%= cancel_publish_homework_common_path(@homework) %>')">撤销发布</a>
<a href="javascript:void(0)" class="white-btn orange-btn fr ml15 mt3" onclick="cancel_publish('<%= cancel_publish_homework_common_path(@homework) %>')">撤销发布</a>
<% end %>
<% end %>
<% if @homework.homework_type == 4 && @homework.publish_time.present? && @homework.publish_time < Time.now && @homework.homework_group_reviews.count == 0 %>
<% if @homework.homework_type == 4 && @homework.publish_time.present? && @homework.publish_time < Time.now && @homework.homework_group_reviews.size == 0 %>
<a href="<%= homework_code_repeat_homework_common_path(@homework) %>" data-remote="true" class="fr white-btn edu-greenline-btn ml15 mt3">代码查重</a>
<a href="<%= homework_code_repeat_homework_common_path(@homework) %>" data-remote="true" class="fr white-btn edu-greenline-btn ml15 mt3">代码查重</a>
<% end %>
<% end %>
</div>
</div>
@ -185,7 +185,7 @@
<span class="fl mr25">
<span class="fl mr25">
<a href="javascript:void(0);" id="comment_no_limit" class="<%= @comment.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
<a href="javascript:void(0);" id="comment_no_limit" class="<%= @comment.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
</span>
</span>
<% has_comment = StudentWorksScore.where(:student_work_id => student_works.map(&:id), :reviewer_role => [1, 2]).group_by(&:student_work_id).count %>
<% has_comment = StudentWorksScore.where(:student_work_id => student_works.map(&:id), :reviewer_role => [1, 2]).group_by(&:student_work_id).size %>
<input id="not_comment" class="magic-checkbox fl" type="checkbox" value="0" name="comment[]" <%= !@comment.blank? && @comment.include?('0') ? 'checked' : '' %>>
<input id="not_comment" class="magic-checkbox fl" type="checkbox" value="0" name="comment[]" <%= !@comment.blank? && @comment.include?('0') ? 'checked' : '' %>>
<label for="not_comment" class="fl mr25">未评(<%= @student_work_count - has_comment %>)</label>
<label for="not_comment" class="fl mr25">未评(<%= @student_work_count - has_comment %>)</label>
<input id="has_comment" class="magic-checkbox fl" type="checkbox" value="1" name="comment[]" <%= !@comment.blank? && @comment.include?('1') ? 'checked' : '' %>>
<input id="has_comment" class="magic-checkbox fl" type="checkbox" value="1" name="comment[]" <%= !@comment.blank? && @comment.include?('1') ? 'checked' : '' %>>
@ -198,11 +198,11 @@
<a href="javascript:void(0);" id="status_no_limit" class="<%= @status.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
<a href="javascript:void(0);" id="status_no_limit" class="<%= @status.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
</span>
</span>
<input id="work_status_1" class="magic-checkbox fl" type="checkbox" value="0" name="status[]" <%= !@status.blank? && @status.include?('0') ? 'checked' : '' %>>
<input id="work_status_1" class="magic-checkbox fl" type="checkbox" value="0" name="status[]" <%= !@status.blank? && @status.include?('0') ? 'checked' : '' %>>
<label for="work_status_1" class="fl mr25">未提交(<%= @all_student_works.where(:work_status => 0).count %>)</label>
<label for="work_status_1" class="fl mr25">未提交(<%= @all_student_works.where(:work_status => 0).size %>)</label>
<input id="work_status_2" class="magic-checkbox fl" type="checkbox" value="1" name="status[]" <%= !@status.blank? && @status.include?('1') ? 'checked' : '' %>>
<input id="work_status_2" class="magic-checkbox fl" type="checkbox" value="1" name="status[]" <%= !@status.blank? && @status.include?('1') ? 'checked' : '' %>>
<label for="work_status_2" class="fl mr25">按时提交(<%= student_works.where(:work_status => 1).count %>)</label>
<label for="work_status_2" class="fl mr25">按时提交(<%= student_works.where(:work_status => 1).size %>)</label>
<input id="work_status_3" class="magic-checkbox fl" type="checkbox" value="2" name="status[]" <%= !@status.blank? && @status.include?('2') ? 'checked' : '' %>>
<input id="work_status_3" class="magic-checkbox fl" type="checkbox" value="2" name="status[]" <%= !@status.blank? && @status.include?('2') ? 'checked' : '' %>>
<label for="work_status_3" class="fl mr25">延时提交(<%= student_works.where(:work_status => 2).count %>)</label>
<label for="work_status_3" class="fl mr25">延时提交(<%= student_works.where(:work_status => 2).size %>)</label>
</li>
</li>
<li class="clearfix">
<li class="clearfix">
<span class="fl mr10 color-grey-8">分班情况:</span>
<span class="fl mr10 color-grey-8">分班情况:</span>
@ -210,9 +210,9 @@
<a href="javascript:void(0);" id="group_no_limit" class="<%= @group.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
<a href="javascript:void(0);" id="group_no_limit" class="<%= @group.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
</span>
</span>
<p class="fl pb10" style="display: block;max-width: 995px;">
<p class="fl pb10" style="display: block;max-width: 995px;">
<% groups.each do |group| %>
<% groups.includes(:members). each do |group| %>
<input id="group_<%= group.id %>" class="magic-checkbox fl" type="checkbox" value="<%= group.id %>" name="group[]" <%= !@group.blank? && @group.include?(group.id) ? 'checked' : '' %>>
<input id="group_<%= group.id %>" class="magic-checkbox fl" type="checkbox" value="<%= group.id %>" name="group[]" <%= !@group.blank? && @group.include?(group.id) ? 'checked' : '' %>>
<label for="group_<%= group.id %>" class="fl mr25"><%= group.name %>(<%= group.members.count %>)</label>
<label for="group_<%= group.id %>" class="fl mr25"><%= group.name %>(<%= group.members.size %>)</label>
<% end %>
<% end %>
<% if !@group_teacher %>
<% if !@group_teacher %>
<input id="group_0" class="magic-checkbox fl" type="checkbox" value="0" name="group[]">
<input id="group_0" class="magic-checkbox fl" type="checkbox" value="0" name="group[]">
@ -255,7 +255,7 @@
<% my_work = cur_user_works_for_homework @homework %>
<% my_work = cur_user_works_for_homework @homework %>
<% if @homework.homework_detail_manual.comment_status == 3 %>
<% if @homework.homework_detail_manual.comment_status == 3 %>
<% unless my_work.nil? %>
<% unless my_work.nil? %>
<% if my_work.user.student_works_evaluation_distributions.where(:student_work_id => @homework.student_works.map(&:id)).count != 0 %>
<% if my_work.user.student_works_evaluation_distributions.where(:student_work_id => @homework.student_works.map(&:id)).size != 0 %>
<span class="edu-filter-btn edu-filter-btn-orange mb15">你在匿评开启之前提交了作品,你的作品正在匿评中</span>
<span class="edu-filter-btn edu-filter-btn-orange mb15">你在匿评开启之前提交了作品,你的作品正在匿评中</span>
<% else %>
<% else %>
<span class="edu-filter-btn edu-filter-btn-orange mb15">你在匿评开启之后才提交作品,你的作品没有参与匿评</span>
<span class="edu-filter-btn edu-filter-btn-orange mb15">你在匿评开启之后才提交作品,你的作品没有参与匿评</span>
@ -278,8 +278,8 @@
<% end %>
<% end %>
<p class="color-grey-8 font-12 clearfix mb15">
<p class="color-grey-8 font-12 clearfix mb15">
<span class=""><%= @homework.student_works.where("work_status != 0").count %> 已交</span>
<span class=""><%= @homework.student_works.where("work_status != 0").size %> 已交</span>
<span class="ml30"><%= @homework.course.student.count - @homework.student_works.where("work_status != 0").size %>
<span class="ml30"><%= @homework.course.student.size - @homework.student_works.where("work_status != 0").size %>
未交</span>
未交</span>
<% if @homework.homework_detail_manual %>
<% if @homework.homework_detail_manual %>
<% if @homework.homework_detail_manual.comment_status == 1 %>
<% if @homework.homework_detail_manual.comment_status == 1 %>