From 21377fa45a5dc4a61aa1c2b0e82d3683032b6a8e Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 14:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BD=9C=E4=B8=9A=EF=BC=9A?= =?UTF-8?q?=E8=AF=84=E5=88=86=E8=AE=BE=E7=BD=AE=E4=B8=AD=E2=80=9C=E6=9C=80?= =?UTF-8?q?=E7=BB=88=E8=AF=84=E5=88=86=E2=80=9D=E8=AE=BE=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?=E2=80=9C=E5=8A=A9=E6=95=99=E8=AF=84=E5=88=86+=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=8C=BF=E8=AF=84=E2=80=9D=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- app/views/student_work/_evaluation_title.html.erb | 1 + app/views/student_work/_evaluation_un_title.html.erb | 1 + app/views/student_work/_evaluation_un_work.html.erb | 1 - app/views/student_work/_evaluation_work.html.erb | 1 - 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index b5f300986..806a2e13b 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1017,7 +1017,7 @@ class StudentWorkController < ApplicationController 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 homework_detail_manual.appeal_penalty = 0 StudentWork.where("homework_common_id = #{@homework.id} and work_status != 0").each do |student_work| diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 57cccc51a..eacdb5e16 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -31,6 +31,7 @@ <% @stundet_works.each_with_index do |student_work, i|%> <% score_open = @homework.score_open == 1 || student_work.user == User.current %> + <%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%> diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index 99c8d86eb..a55d90f68 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -76,6 +76,7 @@ <%# end %> <% @stundet_works.each_with_index do |student_work, i| %> <% score_open = @is_teacher || @homework.score_open == 1 || student_work.user == User.current %> + <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %> diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 0feaf1ea4..71a1c7788 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -6,7 +6,6 @@ <%# elsif @homework.homework_type == 3 %> <%#= render :partial => 'evaluation_un_group_work', :locals => {:student_work => student_work, :index => index} %> <%# else %> - <%=index + 1 %> diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index 0666e7882..169fe5ea7 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -1,5 +1,4 @@ - <% if @homework.homework_type != 3 %> <% is_my_work = student_work.user == User.current%>