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%>