班级作业:评分设置中“最终评分”设置为“助教评分+学生匿评”不可用

This commit is contained in:
cxt 2016-12-17 14:36:32 +08:00
parent f7f1c68576
commit 21377fa45a
5 changed files with 3 additions and 3 deletions

View File

@ -1017,7 +1017,7 @@ class StudentWorkController < ApplicationController
end end
end end
unless (params[:anonymous_appeal].to_i == 1 && @homework.anonymous_appeal == 1 && params[:appeal_penalty].to_i == homework_detail_manual.homework_detail_manual) || (params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal == 0) unless (params[:anonymous_appeal].to_i == 1 && @homework.anonymous_appeal == 1 && params[:appeal_penalty].to_i == homework_detail_manual.appeal_penalty) || (params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal == 0)
if params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal != 0 if params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal != 0
homework_detail_manual.appeal_penalty = 0 homework_detail_manual.appeal_penalty = 0
StudentWork.where("homework_common_id = #{@homework.id} and work_status != 0").each do |student_work| StudentWork.where("homework_common_id = #{@homework.id} and work_status != 0").each do |student_work|

View File

@ -31,6 +31,7 @@
</tr> </tr>
<% @stundet_works.each_with_index do |student_work, i|%> <% @stundet_works.each_with_index do |student_work, i|%>
<% score_open = @homework.score_open == 1 || student_work.user == User.current %> <% score_open = @homework.score_open == 1 || student_work.user == User.current %>
<a name="<%= student_work.id%>"></a>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%> <%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%>
<tr> <tr>
<td colspan="12"> <td colspan="12">

View File

@ -76,6 +76,7 @@
<%# end %> <%# end %>
<% @stundet_works.each_with_index do |student_work, i| %> <% @stundet_works.each_with_index do |student_work, i| %>
<% score_open = @is_teacher || @homework.score_open == 1 || student_work.user == User.current %> <% score_open = @is_teacher || @homework.score_open == 1 || student_work.user == User.current %>
<a name="<%= student_work.id%>"></a>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %> <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %>
<tr> <tr>
<td colspan="12"> <td colspan="12">

View File

@ -6,7 +6,6 @@
<%# elsif @homework.homework_type == 3 %> <%# elsif @homework.homework_type == 3 %>
<%#= render :partial => 'evaluation_un_group_work', :locals => {:student_work => student_work, :index => index} %> <%#= render :partial => 'evaluation_un_group_work', :locals => {:student_work => student_work, :index => index} %>
<%# else %> <%# else %>
<a name="<%= student_work.id%>"></a>
<tr class="hworkListRow" id="student_work_<%= student_work.id%>"> <tr class="hworkListRow" id="student_work_<%= student_work.id%>">
<td class="hworkList40 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td> <td class="hworkList40 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
<td class="hworkPortrait pr10 float-none"> <td class="hworkPortrait pr10 float-none">

View File

@ -1,5 +1,4 @@
<!-- 匿评作品列表,显示某一个作品的信息 --> <!-- 匿评作品列表,显示某一个作品的信息 -->
<a name="<%= student_work.id%>"></a>
<tr class="hworkListRow" id="student_work_<%= student_work.id%>"> <tr class="hworkListRow" id="student_work_<%= student_work.id%>">
<% if @homework.homework_type != 3 %> <% if @homework.homework_type != 3 %>
<% is_my_work = student_work.user == User.current%> <% is_my_work = student_work.user == User.current%>